PostNitro CLI — Create & Schedule Social Posts from Your Terminal
One command in, a designed post out. The PostNitro CLI creates on-brand carousels, single-image posts, and short videos, optionally adds AI-generated images, and schedules them to LinkedIn, Instagram, TikTok, and Threads — without a browser, a design tool, or a single manual step. Every command speaks JSON, which makes it as comfortable for AI agents and CI pipelines as it is for you.
npm install -g @postnitro/cli — and your terminal becomes a content studio.
Package
@postnitro/cli on npm
Interface
JSON in, JSON out — script-safe
Creates
Carousels, images & videos — PNG/PDF/MP4
Schedules to
LinkedIn, Instagram, TikTok, Threads
Why Put a Content Engine in Your Terminal?
Post Without Leaving the Shell
"postnitro carousel generate --context '5 remote work tips' --wait" is a finished, on-brand, ready-to-download carousel. No tabs, no drag-and-drop, no export dialog.
Built for AI Agents
Clean JSON on stdout, JSON errors on stderr, no colors or interactive prompts to parse around. Claude Code, Cursor, and any agent that can shell out can drive it reliably — or install it as a skill and let the agent teach itself.
Automate in CI and Cron
Publish release announcements from your deploy pipeline, or run a nightly job that turns tomorrow's content calendar into scheduled posts. Exit codes and JSON output make failures easy to catch.
AI Writes It — or You Do
Generate from a topic, an article URL, or an X post, or import your own slide JSON for full control — including infographic layouts with data columns. Both paths render through your templates and brand kit.
AI Images, One Flag Away
Add --generate-images with a short visual brief and AI images are created and baked into your slides before rendering — backgrounds or in-line, strategic slides or all of them.
Idea to Scheduled Post in One Command
generate-and-schedule writes the content, waits for the render, and books it on your calendar with per-platform captions — and import-and-schedule does the same for your own slides. A whole content workflow in a single shell command.
Set Defaults Once, Then Forget Them
Save your template, brand, preset, and output format with defaults set. Every later command just needs the content — and if your workspace has exactly one candidate, the CLI picks it automatically.
Same Key, Same Credits, Every Surface
The CLI is a thin wrapper over the Embed API and shares your key and credit balance with the REST API and MCP server. Start in the terminal, switch surfaces whenever you like.
Install in Seconds
Requires Node.js 18+ and a PostNitro account on a paid plan.
From Zero to a Scheduled Post in Four Commands
1. Authenticate once
Get your API key from PostNitro → Profile → Embed → Generate API Key, then save it. You can also use the POSTNITRO_API_KEY environment variable or --api-key per command (recommended for CI).
2. Save your defaults
List your templates, brands, and AI presets, then save your favorites so create commands only need content.
3. Generate — and get files back
--wait polls until the render finishes and prints the final JSON: file URLs, a designId for scheduling, and an editorUrl deep link to keep editing in PostNitro.
4. Schedule it — PostNitro publishes for you
Take the designId from the output and book the post to your connected LinkedIn, Instagram, TikTok, or Threads accounts — or save it as a draft. That's the whole pipeline: idea → design → scheduled post, without leaving the terminal.
Don't Just Create Posts — Schedule Them Too
Designing the post is only half the job, so PostNitro now finishes it: schedule posts or save drafts directly to LinkedIn, Instagram, TikTok, and Threads, with per-platform captions and settings. Generate or import a design, attach it to a time slot, and PostNitro publishes it for you — from the API, the MCP server, or the CLI, with no separate scheduling tool.
Real Workflows, Copy-Paste Ready
Turn a blog post into a LinkedIn carousel
Point --type article at a URL and the AI extracts the key points into swipeable slides.
Generate and schedule in one shot
Content written, design rendered, post booked — one command. If scheduling fails, you get the designId back so you can retry without re-spending credits.
Import and schedule in one shot
The import-side counterpart: your exact slides go from JSON to a booked post in a single command. Same safety net — if scheduling fails after the import succeeds, you get the designId back to retry without re-spending credits.
Import your own slides
Full editorial control: pass your slides as JSON inline or from a file, and PostNitro renders them into your template and brand.
A single image post with AI artwork
Image posts mirror carousels — one slide object instead of an array, with the same AI-image flags available.
Schedule a design you already have
Creation gives you a designId; scheduling attaches it to your calendar with per-platform captions. Manage the whole queue — list, update, delete — without leaving the shell.
Kick off now, fetch later
Skip --wait for long generations or batch jobs: creation returns an embedPostId immediately, and status/output pick the result up whenever you're ready.
Made for AI Agents
The CLI was designed agent-first: predictable flags, machine-readable output, and destructive actions gated behind --yes. Install the PostNitro skill and your coding agent learns the whole workflow — discovery, defaults, creation, scheduling — without you writing a prompt.
- JSON on stdout (exit 0) on success; structured JSON errors on stderr (exit 1)
- No interactive prompts, spinners, colors, or tables — nothing to trip up a parser
- Inline JSON or file input for complex payloads; inline always wins
- Install via "npx skills add postnitro/postnitro-agent", or as a Claude Code plugin
The Full Command Surface
Everything the Embed API can do, as composable commands. Run any command with --help for details.
| Group | Commands | What it's for |
|---|---|---|
| Setup | auth set-key · auth status · auth clear · defaults get · defaults set | Save your API key and default template, brand, preset, and output format. |
| Discovery | template list · brand list · preset list · social list | Find the IDs for your templates, brand kits, AI presets, and connected social accounts. |
| Carousels | carousel generate · carousel import · carousel status · carousel output · carousel import-template | Create multi-slide posts with AI or from your own slides, and fetch results. |
| Image posts | image generate · image import · image status · image output · image import-template | The single-image equivalents — same flags, one slide object instead of an array. |
| Videos | video generate · video import · video status · video output · video import-template | Turn slides into a video — each slide is a scene. Adds --video-duration and --audio-id; renders to MP4 or stops at the design. |
| Audio | audio list · audio delete | Resolve the audioId a video or reel needs, and remove tracks you no longer use. Uploading happens in the PostNitro app. |
| Brand kits | brand create · brand get · brand update | Manage the logo, name, and handle stamped on your designs. |
| Scheduling | schedule create · schedule list · schedule get · schedule update · schedule delete | Book posts and drafts with per-platform captions and settings; manage the queue. |
| One-shots | generate-and-schedule · import-and-schedule | Create, wait, and schedule in a single command — for carousels or image posts. |
| Social accounts | social list · social get · social disconnect | Inspect connected LinkedIn, Instagram, TikTok, and Threads accounts. |
Errors Your Scripts Can Actually Handle
Every failure is a structured JSON object on stderr with a non-zero exit code — no parsing log prose, no guessing. Your pipeline branches on exit status; your agent reads the message and fixes its own call.
| Common error | Fix |
|---|---|
No API key found | Pass --api-key, set POSTNITRO_API_KEY, or run auth set-key |
Missing --brand-id ... multiple candidates | Pass the ID explicitly or save one with defaults set — the error lists the candidates |
Scheduled at is in the past | Use an ISO-8601 time at least 5 minutes ahead, with a trailing Z |
Slides must be an array with at least 3 entries | Provide starting + body + ending slides |
An IMAGE post takes a single slide object, not an array | Use --slide (object) for images, --slides (array) for carousels |
Refusing to delete ... without --yes | Add --yes to confirm destructive actions — nothing destructive runs by accident |
Your Terminal Can Post to LinkedIn Now
Install the CLI, save your defaults, and turn any topic, article, or content calendar into scheduled, on-brand posts — from the shell, a script, or your AI agent.
Get Your API KeyFour Output Formats
A single document — the default, and the right shape for LinkedIn document posts.
One image per slide, ready for direct upload anywhere.
Skips rendering entirely and returns the editable design — fastest when you only need to schedule or keep editing.
A rendered video — video posts only, and the only rendered format they accept. Needs a duration (5 to under 60 seconds); an audio track is optional.
Every completed output includes a designId (what scheduling expects) and an editorUrl deep link to open the design in the PostNitro editor. Response type doesn't change credit cost. MP4 belongs to video posts alone, and a video accepts nothing but MP4 or DESIGN.
Credits & Pricing
| Plan | Price | Credits/Month | Typical Usage |
|---|---|---|---|
| Monthly | $10/mo | 250 credits/mo | Full CLI access and regular automation |
| Higher tiers | See plans page | More credits | Teams, agencies, and high-volume pipelines |
| Operation | Credits per Slide |
|---|---|
| Content import | 1 credit per slide |
| AI generation | 2 credits per slide |
The CLI shares credits with the Embed API and MCP server. AI-generated images draw on a separate organization image quota and don't change a post's credit cost.
Get Your API KeyCLI vs MCP vs Embed API vs Embed SDK
CLI | MCP Server | Embed API | Embed SDK | |
|---|---|---|---|---|
| Best for | Terminal workflows, shell scripts, CI, and agents that shell out | AI assistants creating posts conversationally | Custom backends and no-code automation platforms | Letting your users design carousels inside your app |
| Interface | Commands with flags — JSON in, JSON out | Natural language via an MCP client | REST over HTTPS | Embeddable visual editor |
| Setup | npm install -g @postnitro/cli | One config block or CLI command | API key + any HTTP client | npm package + API key |
| Scheduling | Yes — including one-shot generate-and-schedule | Yes — full CRUD via tools | Yes — via the Schedule API | No — design only |
| Same key & credits | Yes | Yes | Yes | Yes |
They're all the same engine. Use the CLI in terminals and pipelines, MCP inside AI assistants, the REST API from your own code, and the SDK when your users need a visual editor.
Frequently Asked Questions
One Command Away from Automated Content
npm install -g @postnitro/cli — then generate, render, and schedule your first carousel in under five minutes.
Get Your API Key