Skip to main content
Full reference for the Krypt CLI (@kryptorg/cli v2.1.1). If you’re new to Krypt, start with the Quickstart.

krypt login

Authenticates the CLI with your Krypt account using an API key.

Usage

Options

Examples

Your API key is stored in ~/.krypt/config.json with 0600 permissions. Generate keys at krypthq.com/dashboard/api-keys. Keys are shown only once — store them somewhere safe.

krypt logout

Removes your stored credentials by clearing ~/.krypt/config.json.

Usage

Examples


krypt whoami

Displays the currently authenticated user and their associated projects.

Usage

Examples

When authenticated via API key, email is unavailable because keys don’t carry user identity. Use the dashboard to see your full account details.

krypt list

Lists all projects in your Krypt account.

Usage

ls is an alias:

Examples


krypt init

Links the current directory to a Krypt project. Creates a .krypt config file in the directory.

Usage

Options

Examples

Add .krypt to your .gitignore — it contains your project binding but should not be shared across clones.

krypt push

Uploads your local .env file to Krypt over TLS. Secrets are encrypted with AES-256 at rest on the server.

Usage

Options

Examples

Pushing overwrites all secrets in the target environment. There is no merge — the remote state becomes an exact copy of your local .env.

krypt pull

Downloads secrets from Krypt and writes them to .env in the current directory.

Usage

Options

Examples

If a .env file already exists, it is overwritten. Back up local changes before pulling if needed.

krypt run

Executes a command with your project’s secrets injected as environment variables. No .env file is written to disk.

Usage

Options

Examples

Your shell expands $VAR before Krypt sees it. If your command includes literal dollar signs, wrap it in single quotes:

krypt diff

Compares secrets between two environments of the same project. Displays a colour-coded side-by-side table showing matching, mismatched, and missing keys.

Usage

Options

Examples

In a real terminal, matching rows are green, mismatched rows are yellow, and missing rows are red. Values are truncated to 36 characters.
The diff output reveals plaintext secret values in your terminal. Run this in a private session and avoid piping output to shared logs.

krypt share

Invites a teammate to a project by email.

Usage

Options

Examples

Inviting team members requires a Pro plan. The invited user receives an email and must accept before they can access project secrets. See Roles and permissions for what each role can do.

Configuration

The CLI stores its configuration at ~/.krypt/config.json with 0600 permissions (readable only by your user). To point the CLI at a custom API endpoint, set the KRYPT_API_URL environment variable:
This is useful for self-hosted Krypt deployments or development against a local server.

Exit codes

Help

Every command supports --help for inline usage information: