TheDocumentation 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.
login command stores your Buttondown API key locally so you don’t need to pass it with every command.
Usage
Interactive Mode
Runbuttondown login without flags to enter your API key interactively:
Non-Interactive Mode
Provide your API key directly with the--api-key flag:
Options
Your Buttondown API key. If provided, skips the interactive prompt.Get your API key from Settings → API in your Buttondown account.
Force re-login even if already authenticated. Use this to switch to a different API key.
Already Logged In
If you’re already logged in, the command will let you know:Changing API Keys
To log in with a different API key, use the--force flag:
--api-key:
Where is the API Key Stored?
Your API key is stored in your system’s configuration directory using Configstore:- macOS:
~/Library/Preferences/buttondown-cli-nodejs/ - Linux:
~/.config/buttondown-cli-nodejs/ - Windows:
%APPDATA%\buttondown-cli-nodejs\
Security Best Practices
- Never commit your API key to version control
- Don’t share your API key with others
- Rotate your API key regularly from Buttondown settings
- If you suspect your key has been compromised, regenerate it immediately in Buttondown
Error Handling
If the API key is empty or invalid:login command validates that the key is not empty, but it doesn’t verify the key with Buttondown. You’ll discover if the key is invalid when you run pull or push commands.
Examples
First-time setup
Switch accounts
Next Steps
After logging in:- Run buttondown pull to download your existing content
- Run buttondown create to start a new email
- Run buttondown push to upload local changes