Bring Keyra to your terminal. Push, pull, and share secrets without leaving your workflow.
The core tool. Push, pull, and share secrets directly from your terminal.
npm install -g keyra-cliInstall
npm install -g keyra-cliAuthenticate
keyra-cli login --api-url https://keyra.devOpens your browser for device-code authentication, then prompts you to create an encryption passphrase. This passphrase encrypts all your secrets locally — remember it.
Link a project
keyra-cli initRun inside your project directory. Prompts for a project name (defaults to the folder name). If a .env file exists, offers to import its variables into the vault.
Push your secrets
keyra-cli pushReads .env from the current directory, encrypts each variable with your passphrase (AES-256-GCM), and uploads the ciphertext to your vault.
Pull anywhere
keyra-cli pullDownloads encrypted variables from the vault, decrypts them locally, and writes them to .env. Use --file to specify a different output file (e.g. keyra-cli pull --file .env.production).
| Command | Description |
|---|---|
| keyra-cli login | Authenticate via browser with device-code flow. Defaults to https://keyra.dev. |
| keyra-cli logout | Clear stored credentials from ~/.keyra/config.json. |
| keyra-cli init | Link the current directory to a Keyra project and optionally import an existing .env. |
| keyra-cli push | Encrypt and upload your local .env to the vault. |
| keyra-cli pull | Download and decrypt vault variables to a local .env file. Defaults to .env. |
| keyra-cli share | Create a one-time encrypted share link for your .env. Outputs a link and a separate decryption key. |
| keyra-cli validate | Check that your local .env has all the variables defined in the vault. Exits with code 1 on missing keys — CI/CD ready. |
| keyra-cli status | Show the current project name, vault variable count, and diff between local and vault keys. |
| keyra-cli list | List all your projects with variable counts and last-synced dates. Alias: ls. |
| keyra-cli guard | Install a Git pre-commit hook that blocks accidental .env file commits. |
| keyra-cli scan | Check secrets against the HaveIBeenPwned breach database. Scans a local .env file or a vault project. |
Don't have an account yet?