Skip to main content

Overview

Manage CoinPaprika CLI configuration, including API key storage and settings display. The config command has three subcommands:
  • show — Display current configuration
  • set-key — Save your API key
  • reset — Delete configuration file

Subcommands

show

Display the current CLI configuration, including API key status and configuration file location.

Usage

coinpaprika-cli config show

Options

--output
string
default:"table"
Output format: table or json
--raw
boolean
default:"false"
JSON output without _meta wrapper

Examples

# Show current config
coinpaprika-cli config show

# JSON output
coinpaprika-cli config show --output json

Response Fields

config_file
string
Path to the configuration file (e.g., ~/.config/coinpaprika-cli/config.toml)
api_key
string
Masked API key (e.g., sk-...abc123), or null if no key is set
key_source
string
Where the API key is loaded from: file, env, flag, or none
coinpaprika_url
string
API base URL (api.coinpaprika.com for free tier, api-pro.coinpaprika.com for paid)

set-key

Save your CoinPaprika API key to the configuration file.

Usage

coinpaprika-cli config set-key <api_key>

Arguments

api_key
string
required
Your CoinPaprika API key (get one at coinpaprika.com/api/pricing)

Examples

# Set API key
coinpaprika-cli config set-key sk-YOUR-API-KEY-HERE

# Use with onboard command instead (interactive)
coinpaprika-cli onboard

Output

API key saved to /home/user/.config/coinpaprika-cli/config.toml
Key: sk-...abc123

reset

Delete the CLI configuration file, removing all saved settings including the API key.

Usage

coinpaprika-cli config reset

Examples

# Delete configuration
coinpaprika-cli config reset

Output

Configuration deleted.
This action cannot be undone. You’ll need to set your API key again using config set-key or onboard.

Configuration File Location

The config file is stored at:
  • Linux/macOS: ~/.config/coinpaprika-cli/config.toml
  • Windows: %APPDATA%\coinpaprika-cli\config.toml

File Format (TOML)

api_key = "sk-your-api-key-here"

API Key Priority

When multiple API keys are provided, the CLI uses this priority order:
1

Command-line flag

coinpaprika-cli ticker btc-bitcoin --api-key sk-YOUR-KEY
Highest priority
2

Environment variable

export COINPAPRIKA_API_KEY=sk-YOUR-KEY
3

Configuration file

coinpaprika-cli config set-key sk-YOUR-KEY
Lowest priority (but most convenient)

Examples

First-time setup

# Option 1: Interactive onboarding (recommended)
coinpaprika-cli onboard

# Option 2: Direct key setup
coinpaprika-cli config set-key sk-YOUR-API-KEY

# Verify configuration
coinpaprika-cli config show

Check which key source is active

coinpaprika-cli config show --output json | jq -r '.key_source'
# Output: file, env, flag, or none

Temporarily use a different key

# Without changing config file
coinpaprika-cli ticker btc-bitcoin --api-key sk-TEMP-KEY

Remove your key

# Delete entire config
coinpaprika-cli config reset

# Or manually edit the file
vim ~/.config/coinpaprika-cli/config.toml

status

Check API health and response time

key-info

Check API key status and usage

plans

View pricing plans

Notes

  • API keys are required for Starter, Business, and Enterprise plans
  • Free tier works without an API key (20,000 calls/month)
  • Keys are stored in plain text in the config file (file permissions: 600)
  • Use environment variables in CI/CD to avoid committing keys

Build docs developers (and LLMs) love