$ cli-blog docs

Installation

Install the CLI and Node SDK with npm, pnpm, or Bun, and add the Cli Blog agent skill.

Install the tool that matches where your publishing workflow runs. The Node SDK and CLI require Node.js 20 or newer. Browser delivery can use the REST API directly with a public key and does not require an npm package.

Install the CLI globally

npm install -g @cli-blog/cli

Verify the installation:

cli-blog --version
cli-blog posts list --demo --json

The demo command returns representative JSON without reading an API key.

Run the CLI without a global install

npx @cli-blog/cli posts list --demo --json

For authenticated commands, store the selected organization key in the trusted shell or CI secret store:

export CLI_BLOG_API_KEY="<private-api-key>"
cli-blog posts list --status draft --json

Use API keys before granting a private key to a local shell or build job.

Install the Node SDK

npm install @cli-blog/node

Create a client in a Node.js 20+ server, route handler, build job, CI task, or trusted script:

import { CliBlog } from "@cli-blog/node";

const apiKey = process.env.CLI_BLOG_API_KEY;
if (!apiKey) throw new Error("CLI_BLOG_API_KEY is required");

const blog = new CliBlog({ apiKey });

@cli-blog/node is ESM-first and includes its TypeScript declarations. It uses native Node.js fetch, Blob, and FormData and adds no production dependencies.

Do not import the Node SDK into a browser client. Use a public REST request for published delivery, and keep private SDK operations on the server.

Install the agent skill

Install the skill with the open Agent Skills CLI:

npx skills add https://github.com/cli-blog/cli-blog-skill --skill cli-blog

The installer detects supported agents and lets you choose where to install it. Add -g to use the skill across all projects:

npx skills add https://github.com/cli-blog/cli-blog-skill --skill cli-blog -g

Review the skill on skills.sh, or inspect its source and other installation options in the GitHub repository. The skill includes operating rules and references for choosing the REST API, Node SDK, or CLI. It does not install credentials or bypass the permissions of the selected key.

Choose the next guide

On this page