tene CLI Reference

Canonical reference for every tene command, flag, exit code, and JSON schema. Published at https://tene.sh/cli.

Global Flags

All commands inherit the following persistent flags from the root:

FlagShortTypeDefaultDescription
--jsonboolfalseEmit JSON to stdout
--quiet-qboolfalseMinimal output (errors only)
--env-estringactive envTarget environment
--dirstringcwdProject directory
--no-colorboolfalseDisable colorized output
--no-keychainboolfalseSkip OS keychain (CI/CD)

Exit Codes

CodeNameMeaning
0SuccessCommand completed
1GenericErrorUncategorized error
2UsageErrorWrong flag / arg shape (Cobra default)
2STDOUT_SECRET_BLOCKEDtene get on non-TTY without --unsafe-stdout / TENE_ALLOW_STDOUT_SECRETS=1
3VAULT_NOT_FOUND.tene/vault.db missing in the project directory
4AUTH_REQUIREDMaster password / keychain failed
5SECRET_NOT_FOUNDKEY does not exist in the target environment
6DECRYPT_FAILEDCiphertext + key mismatch
7INTERACTIVE_REQUIREDNo password source on non-TTY
127COMMAND_NOT_FOUNDtene run -- <cmd> target binary not in PATH

Commands

tene init [project-name]

Create an encrypted vault and generate AI editor context files.

Default (no flags): writes CLAUDE.md, .cursor/rules/tene.mdc, .windsurfrules, GEMINI.md, AGENTS.md to the project root.

Flags: --claude, --cursor, --windsurf, --gemini, --codex to generate a single editor file.

Side effects: creates .tene/vault.db (encrypted), adds .tene/ to .gitignore, stores master key in OS keychain (unless --no-keychain), issues a 12-word BIP-39 recovery key.

tene set KEY VALUE · tene set KEY --stdin

Encrypt and store a secret.

Flags:

tene get KEY

Decrypt and print a secret.

⚠️ Security: refuses non-TTY stdout by default. This prevents accidental leakage into AI agent context windows, log aggregators, and shell history.

Flags:

Environment override: TENE_ALLOW_STDOUT_SECRETS=1 also permits non-TTY stdout.

Exit codes: 0 (printed), 2 (STDOUT_SECRET_BLOCKED), 5 (SECRET_NOT_FOUND).

Preferred alternative: tene run -- <cmd> — never prints plaintext.

tene run -- COMMAND [ARGS...]

Inject all secrets from the active (or --env) environment as environment variables, then execute the command. Child stdout / stderr / stdin are inherited; tene's own diagnostic messages go to stderr so the child's stdout remains clean.

Exit code: the child process's exit code is propagated unchanged.

JSON output (--json): emits a single-line JSON object to stderr (not stdout, because stdout is the child process): {"injectedCount":N,"environment":"env","command":"..."}.

tene list

List secret names in the active (or --env) environment. Values are masked in human output; the --json form also returns preview fields masked.

JSON schema (tene list --json):

{
  "ok": true,
  "project": "my-app",
  "environment": "default",
  "count": 3,
  "secrets": [
    {
      "name": "STRIPE_KEY",
      "preview": "*****",
      "version": 1,
      "updatedAt": "2026-04-22T12:00:00Z"
    }
  ]
}

AI-safe: never returns plaintext values.

tene delete KEY

Delete a secret from the active (or --env) environment. Prompts for confirmation unless --quiet is set.

tene import .env | backup.tene.enc

One-shot migration:

Flags: --encrypted (import mode toggles based on file extension but --encrypted forces the encrypted-backup path).

tene export [--encrypted] [--file path]

Export vault contents.

⚠️ Without --encrypted, this prints every secret as plaintext. Avoid using in AI context. Use --encrypted --file backup.tene.enc to produce a portable encrypted backup.

tene env [name] | env list | env create NAME

Multi-environment workflow:

tene passwd

Change the master password. Vault is re-encrypted with the new key.

tene recover

Restore the master key from a 12-word BIP-39 mnemonic. Useful if the OS keychain is wiped or the password is forgotten.

tene whoami

Print the active vault path, environment, and project name.

tene version

Print version, commit, and build date.

tene update

Check for and install the latest release (re-runs install.sh).

tene completion [bash|zsh|fish|powershell]

Emit a shell completion script to stdout.

source <(tene completion bash)                                 # Bash (one-off)
tene completion bash > $(brew --prefix)/etc/bash_completion.d/tene  # Bash (Homebrew)
tene completion zsh > "${fpath[1]}/_tene"                      # Zsh
tene completion fish > ~/.config/fish/completions/tene.fish    # Fish
tene completion powershell | Out-String | Invoke-Expression    # PowerShell

Environment Variables (Input)

VariablePurpose
TENE_MASTER_PASSWORDNon-interactive master password (CI/CD)
TENE_ALLOW_STDOUT_SECRETS=1 or =true allows tene get on non-TTY
NO_COLORAny non-empty value disables color (also via --no-color)

JSON Schema Conventions

Man Page

After Homebrew install (brew install tomo-kay/tene/tene), the man page is available:

man tene

Resources