Wanted to share a new ghst CLI tool we’ve been working on - as a developer beta - which allows you to interact with Ghost publications from the command line.
In short, this allows you (or an LLM like Claude, or Codex) to automate tasks within Ghost using a set of pre-built tools. Pretty much everything you can do in Ghost Admin, you can do using this CLI.
For example:
Create/edit posts and publish them
Import or export members
Download/upload/activate themes
Find out which post got the most traffic last month
Post an update to the social web
Check your latest newsletter open rate
Create a new paid tier or special offer
Here’s a quick demo of how it works:
It’s pretty fun! While the demo shows off a lighthearted example of writing a post about cats, the point of the tool is not “AI can write content for you now” - but rather that you can automate site administration for whatever tasks matter to you.
Personally, I’ve found it really useful for making quick changes and updates to my site, or doing customer (member) support just by saying things like “go and give [Jamie Larson] a complimentary subscription” out loud.
But, this tool does come with a big disclaimer:
Important warning
CLI tools are powerful, and ghst includes support for destructive actions, such as deleting posts and members. There are multiple safety features, confirmation steps, and built-in guardrails to avoid accidents, but allowing AI agents to interact with CLI tools always comes with some risk that they may do something you don’t want them to.
For this reason, this tool is currently only recommended for use by developers who are comfortable navigating terminal apps, and LLM / bash permissions.
As always: It’s good practice to make sure you have backups
With that said,
I’ve been using this in production for a few weeks now, and it’s been a great experience so far. I’d love to hear what you think, and any open source contributions are welcomed!
hi @AlanSoon , I think that N8N is a bit old fashioned nowadays. Maybe have a look at claude code and see if how it can connect with notion and ghost so you will have your context and you can publish your articles, do curation, do almost everything honestly.
I’ve previously used Claude via Warp to automate Ghost, it and worked well without a CLI. It seemed to already know the Ghost Admin API and could use curl to make the requests.
But using Ghost this way has exposed a couple of bugs in the Admin API which remain unpatched.
If you don’t want to save a new revision of a post, that’s also broken. I submitted a patch for that three weeks ago. It’s still waiting for an initial response. https://github.com/TryGhost/Ghost/issues/26677 Both of these bugs stem from the same root assumption that since the Ghost Admin API works for the web interface it must work correctly in general. But the API allows some edge cases that are used by the web. If Ghost is going to provide truly first-class support for a CLI using the Admin API, these edge cases need to be addressed.
I’ve put together a very basic SKILL.md file to enable it in OpenClaw. I can now articulate changes to my site over a chat interface, and it (mostly) happens for me!
I’m continuing to update this today, I’ve just added a section on how you can make minor changes by grabbing the lexical content and editing it directly, for tweaking small things like URLs and spelling.
I practically live in terminal, and write most posts for my blog in Helix/Vim — and pull the ones I write in the editor as markdown via the Admin API — so I’m always glad to see first-class support for TUIs.