The Paragraph CLI covers the same ground as the REST API, with JSON output for scripts and agents and an interactive menu for everyone else.

Install

npm install -g @paragraph-com/cli

Requires Node.js 18 or later.

Sign in

paragraph login

This opens Paragraph in your browser, where you pick the publication to connect and approve access. To use an API key instead, pass it with --token, pipe it in with --with-token, or set PARAGRAPH_API_KEY:

paragraph login --token <your-api-key>
echo "<your-api-key>" | paragraph login --with-token
PARAGRAPH_API_KEY=<your-api-key> paragraph post list

Run paragraph whoami to check which publication you're using. Credentials are stored in ~/.paragraph/config.json.

Posts

Posts are what the app calls articles. New posts are drafts until you publish them.

paragraph post create --title "October update" --file ./draft.md
paragraph post list --status draft
paragraph post get <id-or-slug> --field markdown > post.md
paragraph post update <id-or-slug> --file ./updated.md
paragraph post publish <id-or-slug>
paragraph post publish <id-or-slug> --newsletter   # also email subscribers
paragraph post publish <id-or-slug> --newsletter-only   # email subscribers, keep it off your website
paragraph post publish <id-or-slug> --newsletter --segment <segment-id>   # email one segment

post get accepts an ID, a URL, or @publication/slug. Other post commands include draft, archive, delete, test-email, feed, and by-tag, and destructive ones take --dry-run. To list one publication's posts with a tag, use post list --publication <slug> --tag <tag>.

Drafted content

Short-form drafts (X posts and X threads, LinkedIn posts, one-off emails, X articles) go to the publication's library. Nothing is sent until someone approves it, in the app or with paragraph content publish and paragraph schedule approve.