Usage

Most of the time you will use the interactive prompt to configure the CLI, connect a Ghost instance, disconnect and do your operations.

If you want to bypass the interactive prompts, you can use the CLI with pipeable commands.

Export content with export <resource>

For example if we already configured the URL and the Content API key, we can export all the posts to the ./posts folder with the following command:

ghost-blog-buster export posts --output ./posts

Options available

  • --host or -h: The URL of the blog (if not provided, it will check your config file that is filled by the interactive prompt)
  • --key or -k: The Content API key (if not provided, it will check your config file that is filled by the interactive prompt)
  • --output or -o: The destination folder. If no output is provided, content will go to stdout.

Full example:

ghost-blog-buster export posts --host https://astro-starter.digitalpress.blog --key e9b414c5d95a5436a647ff04ab --output ./posts

Available export

Display help

ghost-blog-buster --help

Export content from Admin API with export-admin <resource>

This export use the Admin API and require you to provide the Admin API key. An Admin API key is different from the Content API key. You can either use a Staff access token, visible at the bottom of a Ghost User profile or you can find it in your Ghost Admin panel, in the Integrations section.

This is useful if your Blog Posts contain a free preview, paid content and you want to export everything.

ghost-blog-buster export-admin posts --output ./posts

Options available

  • --host or -h: The URL of the blog (if not provided, it will check your config file that is filled by the interactive prompt)
  • --key or -k: The Content API key (if not provided, it will check your config file that is filled by the interactive prompt)
  • --output or -o: The destination folder. If no output is provided, content will go to stdout.

Full example:

ghost-blog-buster export-admin posts --host https://astro-starter.digitalpress.blog --key 1efedd9db174adee2d23d982:4b74dca0219bad629852191af326a45037346c2231240e0f7aec1f9371cc14e8 --output ./posts

Available export-admin <resource> resources:

  • posts
  • pages
  • members

Example piping commands

You can use > to pipe the content into a file or something else.

ghost-blog-buster export authors --host https://astro-starter.digitalpress.blog --key e9b414c5d95a5436a647ff04ab > authors.json