Ghost cli

From theheavenlyd3mon/hermes-profiles · View interactive version

Ghost cli is an AI agent skill from the GitHub repository theheavenlyd3mon/hermes-profiles. Manage Ghost CMS content from the terminal — create and list posts, pages, and tags, and fetch site info via the Ghost Admin API (v5/v6). Use when the user asks about ghost, cms, blog, blogging, posts, pages, tags, publishing, or site configuration.

How to use this skill

Skill file

ghost-cli — Ghost CMS from the Terminal

Manage content on a Ghost CMS site: view site info, list and create posts and pages, manage tags — all via the Ghost Admin API (v5/v6).

Setup

  1. Get your Admin API key from Ghost Admin → Settings → Advanced → Integrations (or Ghost Admin → Integrations). Create a custom integration to get a key in id:secret format.
  2. Set these environment variables:
export GHOST_URL="https://your-ghost-site.com"     # your Ghost site URL
export GHOST_ADMIN_KEY="your-id:your-secret"        # from Ghost Admin → Integrations

--help and --dry-run work without credentials (lazy auth).

Essential Commands

site — Get site information

ghost-cli site                               # show site title, URL, description
ghost-cli --json site                        # machine-readable JSON
ghost-cli --dry-run site                     # preview without API call

Shows: site title, URL, description.

posts — List blog posts

ghost-cli posts                              # 20 most recent posts
ghost-cli posts --limit 50                   # more results
ghost-cli posts --status published           # only published posts
ghost-cli posts --status draft               # only draft posts
ghost-cli posts --status scheduled           # only scheduled posts
ghost-cli posts --limit 10 --json            # 10 most recent as JSON

Shows: title, status, slug, and last-updated date for each post.

create-post — Create a new blog post

ghost-cli create-post --title "My First Post"                               # draft, no HTML
ghost-cli create-post --title "Hello World" --html "<p>Hello!</p>"          # with HTML content
ghost-cli create-post --title "Ready" --html "<p>Published</p>" --status published  # publish immediately
ghost-cli create-post --title "Scheduled" --html "<p>Later</p>" --status scheduled  # schedule
ghost-cli create-post --title "Custom Slug" --slug "my-custom-url"          # custom URL slug
ghost-cli create-post --title "Draft" --dry-run                             # preview without creating

Creates the post and returns its title, slug, and status.

pages — List pages

ghost-cli pages                              # 20 most recent pages
ghost-cli pages --limit 50                   # more results
ghost-cli pages --json                       # machine-readable JSON

Shows: title, status, slug, and last-updated date for each page.

tags — List tags

ghost-cli tags                               # 50 tags with post counts
ghost-cli tags --limit 100                   # more results
ghost-cli tags --json                        # machine-readable JSON

Shows: tag name, slug, and number of posts using each tag.

Global Flags

These flags work anywhere in the command — before or after the subcommand:

ghost-cli --json posts                       # JSON output
ghost-cli posts --json                       # same result, after subcommand
ghost-cli --dry-run create-post --title "Test"  # preview without API call
ghost-cli --quiet posts                      # suppress diagnostic output
ghost-cli --verbose site                     # verbose logging

| Flag | Effect |

|------|--------|

| --json | Output machine-readable JSON instead of human-readable text |

| --dry-run | Show what API call would be made without executing it |

| --quiet | Suppress non-essential diagnostic output |

| --verbose | Enable verbose/debug logging |

Known Gotchas

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.