Overview
The Quicknode CLI is the qn command-line tool for working with Quicknode product APIs from a terminal, shell script, or CI job.
Install
Install qn with the recommended command for your system. The install tabs are selected from your browser user agent when possible, and you can choose any install path manually.
Recommended for macOS. Homebrew also works on Linux.
brew install quicknode/tap/qn
After installation, check the version:
qn --version
Then authenticate and verify access:
qn auth login
qn auth whoami
Run your first read commands:
qn chain list
qn endpoint list
qn endpoint list --format json
Product coverage
Use the CLI to inspect and manage:
- Admin API: Endpoints, teams, usage, billing, logs, metrics, endpoint security, rate limits, and account tags.
- Streams: Stream listing, creation, inspection, lifecycle actions, and filter testing.
- Webhooks: Webhook listing, template creation, inspection, lifecycle actions, and enabled counts.
- Key-Value Store: Sets and lists for state, watchlists, cursors, filters, and small lookup tables.
When to use the CLI
Use the CLI when the terminal is the fastest interface for the job.
Common workflows include:
- List endpoints, URLs, logs, and metrics while debugging.
- Check account usage, billing records, chains, teams, and tags.
- Create or inspect Streams and Webhooks during development.
- Read and update Key-Value Store data from scripts.
- Run repeatable CI checks with explicit credentials and structured output.
For application code, use the Quicknode SDK or the product REST APIs directly.
Authenticate
Create an API key in the Quicknode dashboard, then run:
qn auth login
qn auth whoami
qn resolves credentials in this order:
--api-key <KEY>--config-file <PATH>~/.config/qn/config.toml
The CLI does not read API keys from environment variables. For scripts and CI, pass --api-key from a secret store or write a config file outside your repository and pass --config-file.
For one command, pass the key explicitly:
qn --api-key YOUR_API_KEY endpoint list --format json
For CI, write a config file outside the repository and point the CLI at it:
mkdir -p "$RUNNER_TEMP/qn"
printf '[api]\nkey = "%s"\n' "$QUICKNODE_API_KEY" > "$RUNNER_TEMP/qn/config.toml"
qn --config-file "$RUNNER_TEMP/qn/config.toml" endpoint list --format json
Output
Set the output format with --format or -o.
| Format | Use |
|---|---|
table | Human-readable terminal tables. This is the default when stdout is a terminal. |
json | Scripts, jq, tests, and API-shaped output. |
yaml | Readable structured output. |
md | Markdown tables for issues, pull requests, and docs. |
toon | Compact structured output. This is the default when stdout is not a terminal. |
Examples:
qn endpoint list --format json
qn usage summary --from 7d -o yaml
qn endpoint list --wide
Agent context
Use qn agent context to print a self-contained usage guide for AI agents and automated tools. It makes no network request and does not require authentication.
qn agent context
qn agent context -o json
The command is designed for agent context windows, including Claude and other tools that can ingest Markdown or JSON.
Shell completions
Generate completions for your shell:
qn completions zsh > ~/.zfunc/_qn
qn completions bash > /etc/bash_completion.d/qn
qn completions fish > ~/.config/fish/completions/qn.fish
qn completions powershell > qn.ps1
qn completions elvish > qn-completions.elv
Common commands
qn stream list --limit 20
qn webhook enabled-count
qn kv set ls
qn usage summary --from 7d
qn billing invoices
Confirmations
Commands that can delete, archive, pause, revoke, or otherwise change resources prompt before acting.
qn endpoint archive 123
qn stream delete 123
qn webhook pause 123
In non-interactive environments, confirmation-gated commands exit before sending a request unless you explicitly opt out of prompts. Keep documentation examples prompt-safe by default.
Next steps
- Use Examples for common product workflows.
- See the examples in Admin API, Streams, Webhooks, and Key-Value Store for full API behavior.