Skip to main content
The Unkey CLI gives you direct access to the Unkey API from your terminal. Create and manage API keys, configure rate limits, set permissions, and query analytics, all without leaving the command line.
The CLI is early and provided on a best-effort basis. There are no breaking change guarantees for commands, flags, or output format. The underlying API is versioned and stable.

Installation

Authentication

Before using the CLI, authenticate with your root key:
This stores your key at ~/.unkey/config.toml. All subsequent commands use it automatically. You can also pass a key per-command or via environment variable:

Usage

All API operations live under the unkey api command, organized by resource:

Resources

Examples

Create an API and issue a key:
Verify a key:
Set up rate limiting:
Query analytics:
Manage permissions:

Output

By default, the CLI prints the request ID with latency, followed by the response data:
For scripting, use --output=json to get the raw API response envelope (meta + data) as JSON on stdout:

Global Flags

Every command accepts these flags:

Help

Every command has built-in help with descriptions, flag details, and examples:
Last modified on May 21, 2026