Minimal CLI for managing Ghost CMS posts, pages, and tags. Zero dependencies.
npm install -g @abeedoo/ghoOr use with npx:
npx @abeedoo/gho list postsGet your Admin API key from Ghost Admin → Settings → Integrations → Add custom integration.
Configure credentials using any of these methods (checked in priority order):
export GHOST_URL=https://your-ghost-site.com
export GHOST_ADMIN_API_KEY=your-id:your-secretgho --env /path/to/config list postsCreate a .gho file in your project root:
GHOST_URL=https://your-ghost-site.com
GHOST_ADMIN_API_KEY=your-id:your-secret
Add .gho to your .gitignore — it contains secrets.
Falls back to .env if no .gho file is found:
GHOST_URL=https://your-ghost-site.com
GHOST_ADMIN_API_KEY=your-id:your-secretYour .gho file can contain multiple sites using [section] headers:
# Default site (used when no --site flag)
GHOST_URL=https://myblog.com
GHOST_ADMIN_API_KEY=id:secret
[staging]
GHOST_URL=https://staging.myblog.com
GHOST_ADMIN_API_KEY=id:secret
[client-blog]
GHOST_URL=https://client.example.com
GHOST_ADMIN_API_KEY=id:secret
Use with the --site flag:
gho --site staging list posts
gho --site client-blog publish my-post
gho list posts # uses defaultgho list posts # all posts
gho list posts --status draft # drafts only
gho list posts --status published # published only
gho list pages # all pagesgho draft my-post-slug "My Post Title" content.mdCreates a draft post from a markdown file. If the file starts with # Title, the first line is stripped (the title comes from the argument). If a post with that slug already exists, it's replaced.
gho publish my-post-slug
gho unpublish my-post-sluggho get my-post-slugShows title, status, URL, preview link, tags, and excerpt.
gho update my-post-slug updated-content.mdReplaces the post content from a markdown file. Preserves title, tags, and status.
gho delete my-post-sluggho tagsShows all tags with post counts, sorted by usage.
Uses Ghost's Admin API with JWT authentication. The CLI constructs JWTs from your Admin API key using Node's built-in crypto module — no external dependencies.
Posts are created using Ghost's mobiledoc format with a markdown card, which means your markdown is rendered by Ghost's markdown engine (including code blocks, links, images, etc.).
MIT — Clifford Meece