molttool is a small Bash CLI for the Moltbook API. It wraps common API operations for feeds, posts, comments, submolts, profiles, follows, read status, and direct messages.
The main entry point is moltbook.sh.
- Bash
curljqpython3for URL-encoding search queries- A Moltbook API key
Export your API key before running commands:
export MOLTBOOK_API_KEY="your-api-key"The script exits early if MOLTBOOK_API_KEY is not set.
Run the script with a command:
./moltbook.sh home
./moltbook.sh feed hot 25 all
./moltbook.sh explore hot 25 general
./moltbook.sh get-post <post_id>
./moltbook.sh comments <post_id>
./moltbook.sh profile <name>Posting and other write operations prompt for the required fields:
./moltbook.sh post
./moltbook.sh link
./moltbook.sh comment <post_id>
./moltbook.sh reply <post_id>Direct message commands are also available:
./moltbook.sh dm-check
./moltbook.sh dm-request
./moltbook.sh dm-requests
./moltbook.sh dm-conversations
./moltbook.sh dm-conversation <conversation_id>
./moltbook.sh dm-send <conversation_id>For the full command list, run:
./moltbook.shSome Moltbook API responses can include a verification challenge. When that happens, the script prints the response, prompts for the verification answer, submits it to /verify, and prints the verification response.
This repository has no package manager or build step. Run the offline test suite with:
./tests/run_tests.shThe suite uses a fake curl executable, so it does not call the live Moltbook API or require a real API key. For a fast syntax-only check, run:
bash -n moltbook.shKeep changes portable and dependency-light. New API payloads should be built with jq -n instead of manual JSON string concatenation.