CLI (npm)
The PostHero CLI is an official command-line tool that wraps the REST API. It lets you create, schedule, and publish posts directly from your terminal — no code required.
Install
Authenticate
Paste your API key when prompted. You can generate one in Settings > API.
Create a post
Useful for
- Automating posts from CI/CD pipelines
- Shell scripts and cron jobs
- Publishing from any environment without a browser
Links
- CLI marketing page — full command reference and examples
- npm package — install and changelog
npm install -g @posthero/cli
posthero login
posthero posts create --text "Just shipped v2.0!" --platforms "linkedin:<accountId>" --now