KosmoKrator

cms

Ghost CMS CLI for AI Agents

Use the Ghost CMS CLI from KosmoKrator to call Ghost CMS tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 5 read 2 write API key auth

Ghost CMS CLI Setup

Ghost CMS can be configured headlessly with `kosmokrator integrations:configure ghost`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure ghost --set api_key="$GHOST_API_KEY" --set url="$GHOST_URL" --enable --read allow --write ask --json
kosmokrator integrations:doctor ghost --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key GHOST_API_KEY Secret secret yes Admin API Key
url GHOST_URL URL url yes API Base URL

Call Ghost CMS Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call ghost.ghost_list_posts '{
  "page": 1,
  "limit": 1,
  "filter": "example_filter",
  "tag": "example_tag",
  "author": "example_author",
  "status": "example_status",
  "order": "example_order",
  "fields": "example_fields"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:ghost ghost_list_posts '{
  "page": 1,
  "limit": 1,
  "filter": "example_filter",
  "tag": "example_tag",
  "author": "example_author",
  "status": "example_status",
  "order": "example_order",
  "fields": "example_fields"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs ghost --json
kosmo integrations:docs ghost.ghost_list_posts --json
kosmo integrations:schema ghost.ghost_list_posts --json
kosmo integrations:search "Ghost CMS" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Ghost CMS.

ghost.ghost_list_posts

Read read

List blog posts from Ghost CMS. Supports filtering by tag, author, status, and free-text search. Returns paginated results with post titles, slugs, status, and metadata.

Parameters
page, limit, filter, tag, author, status, order, fields, include

Generic CLI call

kosmo integrations:call ghost.ghost_list_posts '{"page":1,"limit":1,"filter":"example_filter","tag":"example_tag","author":"example_author","status":"example_status","order":"example_order","fields":"example_fields"}' --json

Provider shortcut

kosmo integrations:ghost ghost_list_posts '{"page":1,"limit":1,"filter":"example_filter","tag":"example_tag","author":"example_author","status":"example_status","order":"example_order","fields":"example_fields"}' --json

ghost.ghost_get_post

Read read

Get a single Ghost blog post by ID. Returns full post content, metadata, tags, and authors.

Parameters
id, fields, include, formats

Generic CLI call

kosmo integrations:call ghost.ghost_get_post '{"id":"example_id","fields":"example_fields","include":"example_include","formats":"example_formats"}' --json

Provider shortcut

kosmo integrations:ghost ghost_get_post '{"id":"example_id","fields":"example_fields","include":"example_include","formats":"example_formats"}' --json

ghost.ghost_create_post

Write write

Create a new blog post in Ghost CMS. Supports setting title, HTML content, status (draft or published), featured flag, tags, and authors.

Parameters
title, html, status, featured, tags, authors, excerpt, feature_image

Generic CLI call

kosmo integrations:call ghost.ghost_create_post '{"title":"example_title","html":"example_html","status":"example_status","featured":true,"tags":"example_tags","authors":"example_authors","excerpt":"example_excerpt","feature_image":"example_feature_image"}' --json

Provider shortcut

kosmo integrations:ghost ghost_create_post '{"title":"example_title","html":"example_html","status":"example_status","featured":true,"tags":"example_tags","authors":"example_authors","excerpt":"example_excerpt","feature_image":"example_feature_image"}' --json

ghost.ghost_update_post

Write write

Update an existing blog post in Ghost CMS. Provide the post ID and any fields to change (title, content, status, featured flag, tags).

Parameters
id, title, html, status, featured, tags, excerpt, feature_image, updated_at

Generic CLI call

kosmo integrations:call ghost.ghost_update_post '{"id":"example_id","title":"example_title","html":"example_html","status":"example_status","featured":true,"tags":"example_tags","excerpt":"example_excerpt","feature_image":"example_feature_image"}' --json

Provider shortcut

kosmo integrations:ghost ghost_update_post '{"id":"example_id","title":"example_title","html":"example_html","status":"example_status","featured":true,"tags":"example_tags","excerpt":"example_excerpt","feature_image":"example_feature_image"}' --json

ghost.ghost_list_pages

Read read

List static pages from Ghost CMS. Supports filtering, pagination, and ordering. Pages are non-blog content like "About", "Contact", etc.

Parameters
page, limit, filter, status, order, fields, include

Generic CLI call

kosmo integrations:call ghost.ghost_list_pages '{"page":1,"limit":1,"filter":"example_filter","status":"example_status","order":"example_order","fields":"example_fields","include":"example_include"}' --json

Provider shortcut

kosmo integrations:ghost ghost_list_pages '{"page":1,"limit":1,"filter":"example_filter","status":"example_status","order":"example_order","fields":"example_fields","include":"example_include"}' --json

ghost.ghost_list_members

Read read

List newsletter members from Ghost CMS. Supports filtering by subscription status, email search, and pagination. Returns member names, emails, labels, and subscription info.

Parameters
page, limit, filter, order, fields

Generic CLI call

kosmo integrations:call ghost.ghost_list_members '{"page":1,"limit":1,"filter":"example_filter","order":"example_order","fields":"example_fields"}' --json

Provider shortcut

kosmo integrations:ghost ghost_list_members '{"page":1,"limit":1,"filter":"example_filter","order":"example_order","fields":"example_fields"}' --json

ghost.ghost_get_current_user

Read read

Get the currently authenticated Ghost admin user. Useful for verifying API credentials and checking user role/permissions.

Parameters
fields

Generic CLI call

kosmo integrations:call ghost.ghost_get_current_user '{"fields":"example_fields"}' --json

Provider shortcut

kosmo integrations:ghost ghost_get_current_user '{"fields":"example_fields"}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

ghost.ghost_list_posts

List blog posts from Ghost CMS. Supports filtering by tag, author, status, and free-text search. Returns paginated results with post titles, slugs, status, and metadata.

Operation
Read read
Schema command
kosmo integrations:schema ghost.ghost_list_posts --json
ParameterTypeRequiredDescription
page integer no Page number (default: 1).
limit integer no Number of posts per page (default: 15, max: 100).
filter string no Ghost filter syntax, e.g. "tag:news+status:published" or "author:john". Use `+` for AND, `,` for OR.
tag string no Filter by tag slug (e.g. "news", "engineering"). Shorthand for filter "tag:{value}".
author string no Filter by author slug (e.g. "john"). Shorthand for filter "author:{value}".
status string no Filter by post status. Shorthand for filter "status:{value}".
order string no Sort order (default: "published_at desc"). Examples: "created_at desc", "title asc", "updated_at desc".
fields string no Comma-separated list of fields to return (e.g. "id,title,slug,status").
include string no Comma-separated related data to include: "tags", "authors", "tags,authors".

ghost.ghost_get_post

Get a single Ghost blog post by ID. Returns full post content, metadata, tags, and authors.

Operation
Read read
Schema command
kosmo integrations:schema ghost.ghost_get_post --json
ParameterTypeRequiredDescription
id string yes The post UUID.
fields string no Comma-separated list of fields to return (e.g. "id,title,html,status").
include string no Comma-separated related data to include: "tags", "authors", "tags,authors".
formats string no Content formats to return: "html", "plaintext", "mobiledoc" (default: "html").

ghost.ghost_create_post

Create a new blog post in Ghost CMS. Supports setting title, HTML content, status (draft or published), featured flag, tags, and authors.

Operation
Write write
Schema command
kosmo integrations:schema ghost.ghost_create_post --json
ParameterTypeRequiredDescription
title string yes Post title.
html string no Post content as HTML.
status string no Post status. Defaults to "draft" if not specified.
featured boolean no Whether the post is featured (default: false).
tags array no Array of tag objects or tag name strings, e.g. ["News", {"name": "Engineering"}].
authors array no Array of author objects or author email strings, e.g. ["[email protected]"].
excerpt string no Custom post excerpt / meta description.
feature_image string no URL for the featured/cover image.

ghost.ghost_update_post

Update an existing blog post in Ghost CMS. Provide the post ID and any fields to change (title, content, status, featured flag, tags).

Operation
Write write
Schema command
kosmo integrations:schema ghost.ghost_update_post --json
ParameterTypeRequiredDescription
id string yes The post UUID to update.
title string no New post title.
html string no New post content as HTML.
status string no Change post status (draft or published).
featured boolean no Set or unset the featured flag.
tags array no Replace post tags. Array of tag name strings, e.g. ["News", "Engineering"].
excerpt string no New custom excerpt / meta description.
feature_image string no New featured/cover image URL.
updated_at string no Last known updated_at timestamp for optimistic concurrency control. Prevents overwriting if the post was modified since you last read it.

ghost.ghost_list_pages

List static pages from Ghost CMS. Supports filtering, pagination, and ordering. Pages are non-blog content like "About", "Contact", etc.

Operation
Read read
Schema command
kosmo integrations:schema ghost.ghost_list_pages --json
ParameterTypeRequiredDescription
page integer no Page number (default: 1).
limit integer no Number of pages per page (default: 15, max: 100).
filter string no Ghost filter syntax, e.g. "status:published" or "slug:about". Use `+` for AND, `,` for OR.
status string no Filter by page status. Shorthand for filter "status:{value}".
order string no Sort order (default: "published_at desc"). Examples: "title asc", "created_at desc".
fields string no Comma-separated list of fields to return (e.g. "id,title,slug,status").
include string no Comma-separated related data to include: "tags", "authors", "tags,authors".

ghost.ghost_list_members

List newsletter members from Ghost CMS. Supports filtering by subscription status, email search, and pagination. Returns member names, emails, labels, and subscription info.

Operation
Read read
Schema command
kosmo integrations:schema ghost.ghost_list_members --json
ParameterTypeRequiredDescription
page integer no Page number (default: 1).
limit integer no Number of members per page (default: 15, max: 100).
filter string no Ghost filter syntax, e.g. "subscribed:true" or "email:@example.com". Use `+` for AND, `,` for OR.
order string no Sort order (default: "created_at desc"). Examples: "name asc", "email desc".
fields string no Comma-separated list of fields to return (e.g. "id,name,email,status").

ghost.ghost_get_current_user

Get the currently authenticated Ghost admin user. Useful for verifying API credentials and checking user role/permissions.

Operation
Read read
Schema command
kosmo integrations:schema ghost.ghost_get_current_user --json
ParameterTypeRequiredDescription
fields string no Comma-separated list of fields to return (e.g. "id,name,email,role").

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.