npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@abeedoo/ghost-cli

v1.0.1

Published

Minimal CLI for managing Ghost CMS posts, pages, and tags

Readme

@abeedoo/ghost-cli

Minimal CLI for managing Ghost CMS posts, pages, and tags. Zero dependencies.

npm · GitHub

Install

npm install -g @abeedoo/ghost-cli

Or use with npx:

npx @abeedoo/ghost-cli list posts

Setup

Get your Admin API key from Ghost Admin → Settings → Integrations → Add custom integration.

Configure credentials using any of these methods (checked in priority order):

1. Environment variables

export GHOST_URL=https://your-ghost-site.com
export GHOST_ADMIN_API_KEY=your-id:your-secret

2. --env flag

ghost-cli --env /path/to/config list posts

3. .ghost-cli file (recommended)

Create a .ghost-cli file in your project root:

GHOST_URL=https://your-ghost-site.com
GHOST_ADMIN_API_KEY=your-id:your-secret

Add .ghost-cli to your .gitignore — it contains secrets.

4. .env file

Falls back to .env if no .ghost-cli file is found:

GHOST_URL=https://your-ghost-site.com
GHOST_ADMIN_API_KEY=your-id:your-secret

Multi-site config

Your .ghost-cli file can contain multiple sites using [section] headers:

# Default site (used when no --site flag)
GHOST_URL=https://myblog.com
GHOST_ADMIN_API_KEY=id:secret

[staging]
GHOST_URL=https://staging.myblog.com
GHOST_ADMIN_API_KEY=id:secret

[client-blog]
GHOST_URL=https://client.example.com
GHOST_ADMIN_API_KEY=id:secret

Use with the --site flag:

ghost-cli --site staging list posts
ghost-cli --site client-blog publish my-post
ghost-cli list posts                          # uses default

Commands

List content

ghost-cli list posts                    # all posts
ghost-cli list posts --status draft     # drafts only
ghost-cli list posts --status published # published only
ghost-cli list pages                    # all pages

Create a draft

ghost-cli draft my-post-slug "My Post Title" content.md

Creates a draft post from a markdown file. If the file starts with # Title, the first line is stripped (the title comes from the argument). If a post with that slug already exists, it's replaced.

Publish / Unpublish

ghost-cli publish my-post-slug
ghost-cli unpublish my-post-slug

Get post details

ghost-cli get my-post-slug

Shows title, status, URL, preview link, tags, and excerpt.

Update content

ghost-cli update my-post-slug updated-content.md

Replaces the post content from a markdown file. Preserves title, tags, and status.

Delete

ghost-cli delete my-post-slug

List tags

ghost-cli tags

Shows all tags with post counts, sorted by usage.

How It Works

Uses Ghost's Admin API with JWT authentication. The CLI constructs JWTs from your Admin API key using Node's built-in crypto module — no external dependencies.

Posts are created using Ghost's mobiledoc format with a markdown card, which means your markdown is rendered by Ghost's markdown engine (including code blocks, links, images, etc.).

License

MIT — Clifford Meece