Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/buttondown/cli/llms.txt

Use this file to discover all available pages before exploring further.

Installation

Get started with Buttondown CLI by installing it globally or using it directly with npx.

Prerequisites

Before installing Buttondown CLI, ensure you have:
1

Node.js 18 or higher

Buttondown CLI requires Node.js version 18 or higher. Check your version:
node --version
If you need to install or update Node.js, visit nodejs.org
2

Buttondown Account

You’ll need an active Buttondown account to use the CLI
3

API Key

Get your API key from your Buttondown settings. You’ll need this to authenticate the CLI

Install Buttondown CLI

Choose your preferred package manager to install Buttondown CLI:
npm install -g @buttondown/cli
The -g flag installs the CLI globally, making the buttondown command available system-wide.

Using npx (No Installation)

If you prefer not to install the CLI globally, you can use it directly with npx:
px @buttondown/cli <command>
For example:
px @buttondown/cli login
px @buttondown/cli pull
Using npx will download the CLI each time you run it, which may be slower than a global installation. For frequent use, we recommend installing globally.

Verify Installation

After installation, verify that Buttondown CLI is installed correctly:
buttondown --version
This should display the current version number (e.g., 1.0.9). You can also view all available commands:
buttondown --help

Troubleshooting

Command Not Found

If you get a “command not found” error after global installation, your npm global bin directory may not be in your PATH.
1

Find your npm bin directory

npm bin -g
2

Add to your PATH

Add the output directory to your PATH in your shell configuration file (~/.bashrc, ~/.zshrc, etc.):
export PATH="$PATH:/path/to/npm/bin"
3

Reload your shell

source ~/.bashrc  # or ~/.zshrc

Permission Errors

If you encounter permission errors during installation with npm, you have a few options:
  1. Use npx instead (no installation required)
  2. Fix npm permissions following the official npm guide
  3. Use a version manager like nvm or volta

Next Steps

Once you’ve installed Buttondown CLI, head to the Quick Start guide to authenticate and sync your first newsletter.

Build docs developers (and LLMs) love