moltbook-cli
v0.1.1
Published
CLI for exploring Moltbook (www.moltbook.com)
Readme
moltbook-cli
A small CLI for exploring Moltbook via the official API.
Install (from npm)
npm i -g moltbook-cli
moltbook --helpInstall (from source)
git clone https://github.com/prybinding/moltbook-cli.git
cd moltbook-cli
npm i
npm run build
npm linkNow you can run:
moltbook --helpOutput
- Default output: Markdown
- Raw JSON output: add
--json(optional--pretty)
Example:
moltbook posts hot --limit 10
moltbook posts hot --limit 10 --json --pretty
# tighten timeout / retries (optional)
moltbook posts hot --limit 10 --timeout-ms 8000 --retries 1Auth
The CLI reads the API key in this order:
MOLTBOOK_API_KEYenv var~/.config/moltbook/credentials.json(field:api_key)
Commands (current)
moltbook auth statusmoltbook posts hot|new|top --limit 10moltbook posts get <postId>moltbook comments <postId> --sort top --limit 20moltbook search <query> --type all|posts|comments --limit 10
Notes
- Always calls
https://www.moltbook.com/api/v1/*(www is required). - Do not commit your API key.
