--- name: ecto description: Ghost.io Admin API CLI for managing blog posts, pages, tags, and content. --- # ecto - Ghost.io Admin API CLI Manage Ghost.io blogs via the Admin API. Supports multi-site configuration, markdown-to-HTML conversion, and JSON output for scripting. ## Quick Reference ### Authentication ```bash ecto auth add --url --key ecto auth list ecto auth default ecto auth remove ``` Environment overrides: `GHOST_URL`, `GHOST_ADMIN_KEY`, `GHOST_SITE` ### Posts ```bash ecto posts [--status draft|published|scheduled|all] [--limit N] [--json] ecto post [--json] [--body] ecto post create --title "Title" [--markdown-file file.md] [--stdin-format markdown] [--tag tag1,tag2] [--status draft|published] ecto post edit [--title "New Title"] [--markdown-file file.md] [--status draft|published] ecto post delete [--force] ecto post publish ecto post unpublish ecto post schedule --at "2025-01-25T10:00:00Z" ``` ### Pages ```bash ecto pages [--status draft|published|all] [--limit N] [--json] ecto page [--json] [--body] ecto page create --title "Title" [--markdown-file file.md] [--status draft|published] ecto page edit [--title "New Title"] [--markdown-file file.md] ecto page delete [--force] ecto page publish ``` ### Tags ```bash ecto tags [--json] ecto tag [--json] ecto tag create --name "Tag Name" [--description "desc"] ecto tag edit [--name "New Name"] [--description "desc"] ecto tag delete [--force] ``` ### Images ```bash ecto image upload [--json] ``` ### Site Info ```bash ecto site [--json] ecto settings [--json] ecto users [--json] ecto user [--json] ecto newsletters [--json] ecto newsletter [--json] ``` ### Webhooks ```bash ecto webhook create --event --target-url [--name "Hook Name"] ecto webhook delete [--force] ``` Events: `post.published`, `post.unpublished`, `post.added`, `post.deleted`, `page.published`, etc. ## Multi-Site Use `--site ` to target a specific configured site: ```bash ecto posts --site blog2 ``` ## Common Workflows Create and publish from markdown: ```bash ecto post create --title "My Post" --markdown-file post.md --tag blog --status published ``` Pipe content from stdin: ```bash echo "# Hello World" | ecto post create --title "Quick Post" --stdin-format markdown ``` Schedule a post: ```bash ecto post schedule future-post --at "2025-02-01T09:00:00Z" ``` Batch publish drafts: ```bash for id in $(ecto posts --status draft --json | jq -r '.posts[].id'); do ecto post publish "$id" done ``` ## Limitations - Ghost API does not support listing images or webhooks - Member/subscription management not available via Admin API - Read-only access to users ## Full Docs Run `ecto --ai-help` for comprehensive documentation.