PostKing CLI: Marketing Automation That Speaks Your Language
PostKing CLI puts your entire marketing stack in the terminal. Authenticate, generate posts, schedule content—no browser needed. Built for devs who ship.
Dana Willow
Senior Marketer sharing 15 years of marketing wisdom through an AI lens.
Published on March 9, 2026
Updated on October 10, 2026

Working with CLI
The PostKing CLI (pking) is a command-line tool that runs PostKing from your terminal: onboard a brand, generate posts in your voice, repurpose content, and schedule it. Below you'll find what it does, the commands to get started, and when to use the CLI versus the MCP server.
Most marketing platforms assume you want to live in their dashboard. Click here to draft a post. Click there to schedule it. Click 47 more times to actually create something.
That's why we built the PostKing CLI.
What the PostKing CLI Actually Does
The PostKing CLI (command name: pking) is a terminal-based tool that controls the entire PostKing platform. You can authenticate, onboard brands by crawling websites, generate AI-written posts for X, LinkedIn, Instagram, schedule content calendars, repurpose existing content, and manage everything from voice profiles to domain verification.
All without opening a browser.
Here's the practical breakdown. You authenticate once with your API key. Then you can crawl a company website to extract brand voice, generate 30 days of social posts in under a minute, schedule them across platforms, and walk away. Got existing blog posts or URLs you want to repurpose? The CLI handles that too. It turns long-form content into platform-specific snippets that sound like your brand.
The full source code lives on GitHub, and you can install it directly from npm in about 10 seconds.
Why We Built a CLI Instead of Just Another Dashboard
Developers think in scripts, not mouse clicks. When you're shipping fast, context-switching kills momentum. You're in your terminal deploying code, checking logs, running tests. Why should marketing require you to alt-tab into a web app?
According to the Stack Overflow Developer Survey, 87% of developers use the command line daily. It's not a preference. It's where work happens.
The CLI also solves a bigger problem: working with AI agents. If you're running autonomous agents that handle tasks while you sleep (and plenty of people are in 2026), those agents need programmatic access. They can't click buttons. They can execute commands, parse JSON, and make decisions based on structured output.
PostKing CLI speaks that language natively.
What You Can Do Right Now
Install the CLI with npm:
npm install -g postking-cli
Authenticate with your API key (grab one from your PostKing dashboard):
pking login
Onboard a brand by entering your website:
pking onboard --url https://yourstartup.com
The CLI scrapes the site, analyzes tone, extracts key messaging, and builds a voice profile. That profile powers every post it generates later, so your automated content doesn't sound like a generic bot wrote it.
Generate 10 LinkedIn posts based on that voice:
pking generate --platform linkedin --count 10
Schedule them across the next 2 weeks:
pking schedule --interval 2d
Done. You just automated 2 weeks of LinkedIn presence in 4 terminal commands.
Repurposing Content Without Copy-Paste Hell
If a blog post took you 6 hours to research, you should get more than one piece of content out of it. The CLI's repurpose function takes a URL, raw text, or a local markdown file and splits it into platform-specific posts.
Example: you wrote a 2,000-word guide on API design. Run this:
pking repurpose --url https://yourblog.com/api-design-guide --platforms twitter,linkedin
It'll extract key points, rewrite them in your brand voice, and output 5 tweets plus 3 LinkedIn posts. Each one stands alone, references the original post, and fits the character limits and norms of each platform.
No manual reformatting. No trying to remember which points you already posted.
Voice Profiles and Domain Verification
The voice profile system is what keeps your automated posts from sounding like everyone else's automated posts. When you onboard a brand, the CLI analyzes sentence structure, vocabulary, formality level, and messaging themes. It stores that as a JSON profile you can version-control (because of course you're putting this in git).
You can also manually tweak profiles:
pking voice edit --brand yourcompany
That opens an editor where you can adjust tone sliders, add forbidden phrases, or specify topics to prioritize. Save it, and every future post reflects those changes.
Domain verification works the same way it does in the web app, but you trigger it from the terminal:
pking verify-domain --domain yourstartup.com
It returns a DNS record to add. Once verified, your posts can include links back to your site without getting flagged by spam filters.
CLI or MCP: Which to Use
PostKing has no public REST API. You get two programmatic ways in: this CLI and an MCP server. They cover the same platform, so pick by where you work.
- Use the CLI when you want commands you can put in a shell script, a cron job, or a CI/CD pipeline. It suits repeatable jobs: generate, schedule, repurpose, done.
- Use the MCP server when you'd rather ask in plain language inside an AI client. It works in Claude, Hermes, and OpenClaw. See the Claude integration page, or read how to run PostKing inside Claude Desktop.
- Use both if you script the routine work and keep a chat window for the one-off stuff. They talk to the same brands and the same voice profiles.
My rule: if you'll run it more than twice, it belongs in a script. If you're still figuring out what you want, talk it through over MCP first.
Who This Is Actually For
If you're a solo founder running product, sales, and support, the CLI turns marketing into a maintenance task, not a daily time sink. You can script your entire content calendar in a Sunday afternoon and forget about it until next month.
If you're running a small dev team at a SaaS company, this integrates into your CI/CD pipeline. You can auto-generate release notes posts every time you tag a new version. Or set up a cron job that reposts your top-performing blog content every quarter.
NGOs and non-profits often run on volunteer time. A CLI tool means the one person who knows how to code can set up automation that keeps social channels active without a dedicated marketing hire.
And if you're building AI agents (which a lot of people are in 2026, according to research from McKinsey's State of AI report), the CLI gives your agents a marketing arm. They can monitor product metrics, detect milestones, and auto-publish updates without human input.
What You Should Actually Do Next
Install the CLI from npm. Run the onboard command on your website. Generate 5 posts and see if they sound like you.
If they don't, edit the voice profile. If they do, schedule a month's worth of content and reclaim those hours.
The GitHub repo (here) includes full docs, example scripts, and a changelog. If you find a bug or want a feature, open an issue. We're shipping updates weekly.
Marketing automation shouldn't mean generic content. It should mean your actual brand voice, scaled across platforms, without the manual labor.
That's what we built. Go use it.
PostKing CLI FAQ
How do I install the PostKing CLI?
Run npm install -g postking-cli, then pking login to authenticate with the API key from your PostKing dashboard.
What can I do with pking?
Onboard a brand from its website, generate posts in that brand's voice, schedule them, repurpose a URL, text, or markdown file into platform-specific posts, edit voice profiles, and verify a domain.
Will the posts sound like me?
That's the job of the voice profile. Onboarding analyzes your sentence structure, vocabulary, formality, and themes. Generate 5 posts, and if they don't sound like you, edit the profile and try again.
Should I use the CLI or the MCP server?
Use the CLI for scripts, cron jobs, and CI/CD. Use the MCP server if you work inside Claude, Hermes, or OpenClaw and want to ask in plain language. Plenty of people use both.
Is the CLI open source?
The source code is on GitHub, along with docs, example scripts, and a changelog. Found a bug? Open an issue.
About Dana Willow
Author
Senior Marketer sharing 15 years of marketing wisdom through an AI lens. Teaching founders to automate smarter.




