home / http-apis / ghost-cli

Ghost CLI

Official · Ghost
489

Ghost CLI for installing, configuring, updating, backing up, and operating self-hosted Ghost sites.

$npm install -g ghost-cli@latest
Language
JavaScript
Stars
489
Category
HTTP & APIs
Agent
AI Analysis

Ghost CLI is Ghost's server-side operations tool for setting up and maintaining self-hosted Ghost installs. It covers install and update workflows, process control, configuration, diagnostics, logs, and content backup or migration tasks for a site on disk.

What It Enables
  • Install Ghost on the recommended stack, run staged setup for nginx, SSL, MySQL, and systemd, and create local installs for theme development or testing.
  • Start, stop, restart, update, roll back, and list Ghost instances from the shell, with doctor checks before common operations.
  • Export or import site content, generate backups with content, members, themes, and media, inspect logs, and edit site configuration without using the admin UI.
Agent Fit
  • Useful for agents operating a known Ghost host because commands are direct, non-TUI, and expose global controls like --dir, --no-prompt, and --auto.
  • Automation is limited by human-oriented output: there is no general JSON mode, and inspection commands mainly return tables, formatted logs, and status text.
  • Best fit for server maintenance workflows around an existing Ghost install, where the agent also has filesystem access, any needed privileges, and Ghost admin credentials or staff tokens.
Caveats
  • Production setup is intentionally opinionated around Ghost's recommended stack, so support outside that path is limited.
  • Backup and export or import flows may prompt for admin credentials or rely on GHOST_CLI_STAFF_AUTH_TOKEN, and some setup or file operations need elevated privileges.