Ghost's admin UI is built for writing. It handles that job well. But a running publication involves far more than writing: deploying updated themes, uploading images, adjusting site settings, checking that what the API serves matches what you published, managing members, verifying credentials. Doing those things through a browser adds enough friction that routine maintenance starts getting skipped.

ghostctl is a CLI that speaks directly to the Ghost Admin API and Content API. It makes the routine parts of running a Ghost site scriptable, repeatable, and fast.

What it covers

  • Theme management: deploy, activate, and list themes without opening Ghost Admin
  • Content management: create, update, and list posts and pages
  • Image uploads: upload images and get back the CDN URL for use in scripts
  • Settings: read and update site settings from the command line
  • Export and import: back up content to local files and restore it
  • Sync checking: compare what the Admin API knows with what the Content API serves
  • Member and newsletter management: list and update subscribers
  • Webhook management: register and remove integrations

The everyday workflows

The commands that get used most often aren't the exotic ones. They're the small, repetitive ones:

  • Deploying a CSS change without navigating the Ghost theme upload flow
  • Checking which theme is currently active before pushing a new version
  • Uploading a profile image and getting the CDN URL back in one command
  • Listing recent posts to verify publish status without loading a browser tab
  • Running --dry-run before a settings change to confirm what will actually happen

How it works

ghostctl is a single compiled binary with no runtime dependencies. It reads site credentials from ~/.config/ghostctl/config.yaml, so once configured you can point it at any named site without specifying keys each time.

It supports named site contexts (--site), machine-readable output (--json, --yaml) and dry-run mode (--dry-run)

Getting started takes a few minutes:

  1. Download the binary from GitHub
    1. mac version: brew tap stumpyfr/tap && brew install ghostctl
  2. Run ghostctl auth to configure credentials for your site
  3. Run ghostctl doctor to verify the connection

Small details worth using

--dry-run on any write command prints exactly what would be sent to the API without sending it, useful before bulk operations or when testing a new script.

--json output pipes cleanly into jq or any scripting tool, making it straightforward to build shell scripts around Ghost content, especially when the goal is to automate something that would otherwise require a browser session: scheduled exports, image pipeline scripts, or deploy hooks tied to a CI run.

ghostctl diff compares admin and public versions of content, which surfaces cases where a post update didn't propagate correctly to the Content API.

ghostctl sync gives an overall view of whether your admin content and public content are in agreement, useful after migrations or bulk imports.

Why open source

ghostctl was built to manage a specific site, and open-sourced because the problem is not unique. Most Ghost publishers eventually hit the same friction points. If it covers your workflow as-is, use it. If it doesn't, the source is there to extend.


The source is on GitHub. Contributions welcome.