Skip to content

sky project keys ​

sky project keys manages project-scoped API keys.

For what an API key is - scoping, storage, revocation semantics, the Authorization: ApiKey header, and why you must never commit a key - see Dev API Keys. This page documents the command surface only.

Synopsis ​

bash
sky project keys create --project <slug> [--name <name>]
sky project keys list --project <slug>
sky project keys revoke --project <slug> --id <key-id> [--yes]

Project Selection ​

--project <slug> is required for all subcommands. Run sky project list to see your project slugs.

Subcommands ​

create ​

Creates a new project API key and prints the plaintext key once.

The output includes a warning that the key will not be shown again, plus a suggested export SKYSTATE_API_KEY=... line.

If you omit --name, the CLI uses an auto-generated name.

list ​

Lists the project's API keys with these fields:

  • key ID
  • name
  • prefix
  • created
  • last used
  • revoked

revoke ​

Revokes a key by ID. In an interactive terminal, the command asks for confirmation before revoking. Pass --yes to skip the prompt. In a non-interactive context without --yes, the command exits with an error.

Notes ​

  • sky project keys does not write local files.
  • sky onboarding may create a project API key for Node.js or curl snippets when you choose that option.