Command Reference
API Keys
Create, list, and revoke project API keys from the CLI.
Project API keys let you authenticate CI pipelines and other headless environments. See API Keys and Authentication for how keys work across the platform. These commands manage the same keys from the terminal.
API key management requires session login (inf auth login). A project API key cannot create, list, or revoke other keys.
inf api-key create
Create a project-scoped API key. The raw key value is shown once, at creation. Save it immediately, since it cannot be retrieved again.
inf api-key create <name> --project <project-id>Arguments
| Argument | Required | Description |
|---|---|---|
name | Yes | Human-readable name for the key, e.g. production-ci |
Options
| Option | Required | Description | Default |
|---|---|---|---|
--project <id> | Yes* | Project the key is scoped to | Active project |
--team <id> | No | Team that owns the key | Active team |
--permissions <list> | No | Comma-separated permissions: read, write, or both | read,write |
* Required unless INF_PROJECT_ID is set or an active project is already set (see Projects).
Creating an API key may require a verified phone number on your account. If you see a verification error, add a phone number from the dashboard and try again.
Examples
# Read and write key for the active project
inf api-key create production-ci --project proj_789ghi012jkl
# Read-only key
inf api-key create readonly-metrics --project proj_789ghi012jkl --permissions read
# Key for a specific team
inf api-key create ci-key --project proj_789ghi012jkl --team team_abc123inf api-key list
List API keys for a team. The raw key value is never shown again after creation, only its ID, name, and scopes.
inf api-key listAlias: inf api-key ls
Options
| Option | Required | Description | Default |
|---|---|---|---|
--team <id> | No | Team to list keys for | Active team |
Example
inf api-key list --team team_abc123inf api-key revoke
Revoke an API key so it can no longer authenticate requests. This cannot be undone.
inf api-key revoke <id>Alias: inf api-key rm
Arguments
| Argument | Required | Description |
|---|---|---|
id | Yes | API key ID to revoke (from inf api-key list) |
Options
| Option | Required | Description | Default |
|---|---|---|---|
--team <id> | No | Team that owns the key | Active team |
Example
inf api-key revoke key_abc123