Skip to content

CLI reference

This document contains the help content for the murk command-line program.

Command Overview:

Encrypted secrets manager for developers — one file, age encryption, git-friendly

Usage: murk <COMMAND>

  • init — Initialize a new vault and generate a keypair
  • env — Write a .envrc for direnv integration
  • restore — Restore MURK_KEY from a BIP39 recovery phrase
  • recover — Re-derive recovery phrase from current MURK_KEY
  • add — Add or update a secret
  • generate — Generate a random secret and store it
  • rotate — Rotate secrets with new values
  • rm — Remove a secret
  • get — Get a single decrypted value
  • edit — Edit secrets in $EDITOR
  • ls — List all key names
  • export — Export all secrets as shell export statements
  • import — Import secrets from a .env file
  • describe — Add or update a key description
  • info — Show public schema and key info
  • skeleton — Export schema-only vault with no secrets or recipients
  • exec — Run a command with secrets injected as environment variables
  • agent — Agent-oriented commands (schema-only output for AI agent prompts)
  • mcp — Run an MCP (Model Context Protocol) stdio server for AI agents
  • policy — Manage the agent access policy
  • circle — Manage recipients
  • group — Manage recipient groups
  • verify — Verify vault integrity without exporting secrets
  • doctor — Check the surrounding repo for hygiene issues
  • scan — Scan files for leaked secret values
  • diff — Show secret changes vs a git ref
  • setup-merge-driver — Configure git to use murk’s merge driver for .murk files
  • completion — Generate or install shell completions

Initialize a new vault and generate a keypair

Usage: murk init [OPTIONS]

  • --vault <VAULT> — Vault filename

    Default value: .murk

Write a .envrc for direnv integration

Usage: murk env [OPTIONS]

  • --vault <VAULT> — Vault filename

    Default value: .murk

Restore MURK_KEY from a BIP39 recovery phrase

Usage: murk restore [OPTIONS]

  • --vault <VAULT> — Vault filename, for the restored-identity recipient check

    Default value: .murk

Re-derive recovery phrase from current MURK_KEY

Usage: murk recover

Add or update a secret

Usage: murk add [OPTIONS] <KEY>

  • <KEY> — Secret key name
  • --desc <DESC> — Description for this key

  • --group <GROUP> — Who can read it: a group name, everyone (default), or me

  • --tag <TAG> — Tag for grouping (repeatable)

  • --vault <VAULT> — Vault filename

    Default value: .murk

Generate a random secret and store it

Usage: murk generate [OPTIONS] <KEY>

  • <KEY> — Secret key name
  • --length <LENGTH> — Length in bytes (default 32)

    Default value: 32

  • --hex — Output as hex instead of base64

  • --desc <DESC> — Description for this key

  • --group <GROUP> — Who can read it: a group name, everyone (default), or me

  • --tag <TAG> — Tag for grouping (repeatable)

  • --vault <VAULT> — Vault filename

    Default value: .murk

Rotate secrets with new values

Usage: murk rotate [OPTIONS] [KEY]

  • <KEY> — Secret key name (omit for –all)
  • --all — Rotate all secrets in the vault

  • --generate — Generate random values instead of prompting

  • --length <LENGTH> — Length in bytes for generated values (default 32)

    Default value: 32

  • --hex — Output generated values as hex instead of base64

  • --list — List keys needing rotation instead of rotating (exits 1 if any)

  • --json — Output the listing as JSON (with –list; always exits 0)

  • --vault <VAULT> — Vault filename

    Default value: .murk

Remove a secret

Usage: murk rm [OPTIONS] <KEY>

  • <KEY> — Secret key name
  • --vault <VAULT> — Vault filename

    Default value: .murk

Get a single decrypted value

Usage: murk get [OPTIONS] <KEY>

  • <KEY> — Secret key name
  • --vault <VAULT> — Vault filename

    Default value: .murk

Edit secrets in $EDITOR

Usage: murk edit [OPTIONS] [KEY]

  • <KEY> — Edit a single key (omit to edit all)
  • --scoped — Edit scoped overrides instead of shared secrets

  • --group <GROUP> — Edit values for this group instead of shared secrets

  • --vault <VAULT> — Vault filename

    Default value: .murk

List all key names

Usage: murk ls [OPTIONS]

  • --tag <TAG> — Filter by tag (repeatable)

  • --json — Output as JSON

  • --vault <VAULT> — Vault filename

    Default value: .murk

Export all secrets as shell export statements

Usage: murk export [OPTIONS]

  • --tag <TAG> — Filter by tag (repeatable)

  • --json — Output as JSON

  • --vault <VAULT> — Vault filename

    Default value: .murk

Import secrets from a .env file

Usage: murk import [OPTIONS] [FILE]

  • <FILE> — Path to the .env file to import

    Default value: .env

  • --force — Overwrite existing secrets without prompting

  • --group <GROUP> — Assign imported secrets to this group (default: everyone)

  • --vault <VAULT> — Vault filename

    Default value: .murk

Add or update a key description

Usage: murk describe [OPTIONS] <KEY> <DESCRIPTION>

  • <KEY> — Secret key name
  • <DESCRIPTION> — Description text
  • --example <EXAMPLE> — Example value

  • --tag <TAG> — Tag for grouping (repeatable, replaces existing tags)

  • --rotate-every <DAYS> — Rotation interval, e.g. 90d or 90 (days); never clears it

  • --expires <DATE> — Hard expiry date, e.g. 2026-09-01; never clears it

  • --vault <VAULT> — Vault filename

    Default value: .murk

Show public schema and key info

Usage: murk info [OPTIONS]

  • --tag <TAG> — Filter by tag (repeatable)

  • --json — Output as JSON

  • --vault <VAULT> — Vault filename

    Default value: .murk

Export schema-only vault with no secrets or recipients

Usage: murk skeleton [OPTIONS]

  • -o, --output <OUTPUT> — Output file (prints to stdout if omitted)

  • --vault <VAULT> — Vault filename

    Default value: .murk

Run a command with secrets injected as environment variables

Usage: murk exec [OPTIONS] <COMMAND>...

  • <COMMAND> — Command and arguments to execute
  • --only <ONLY> — Only inject these specific keys (repeatable)

  • --tag <TAG> — Filter by tag (repeatable)

  • --clean-env — Strip inherited environment (only murk secrets + PATH)

  • --vault <VAULT> — Vault filename

    Default value: .murk

Agent-oriented commands (schema-only output for AI agent prompts)

Usage: murk agent <COMMAND>

  • plan — Emit schema-only context safe to paste into an AI agent prompt
  • exec — Run a command with strict agent-safe defaults (clears the inherited environment, strips MURK_KEY, requires –only)
  • grant — Mint a short-lived ephemeral key that can read only the named secrets
  • init — One-shot onboarding: optionally set the agent allow-list, mint a scoped grant, and print how to run the agent safely
  • ls — List active agent grants and their TTLs
  • revoke — Revoke an agent grant and rotate the keys it could read

Emit schema-only context safe to paste into an AI agent prompt

Usage: murk agent plan [OPTIONS]

  • --tag <TAG> — Filter by tag (repeatable)

  • --json — Output as JSON

  • -o, --output <OUTPUT> — Output file (prints to stdout if omitted)

  • --vault <VAULT> — Vault filename

    Default value: .murk

Run a command with strict agent-safe defaults (clears the inherited environment, strips MURK_KEY, requires –only)

Usage: murk agent exec [OPTIONS] --only <ONLY> <COMMAND>...

  • <COMMAND> — Command and arguments to execute
  • --only <ONLY> — Inject these specific keys (required — agent mode fails closed)

  • --vault <VAULT> — Vault filename

    Default value: .murk

Mint a short-lived ephemeral key that can read only the named secrets

Usage: murk agent grant [OPTIONS] --name <NAME> --only <ONLY>

  • --name <NAME> — Grant name (used to revoke it later)

  • --only <ONLY> — Keys this grant can read (required — fails closed)

  • --ttl <TTL> — Time to live, e.g. 30m, 2h, 7d (advisory — see agent revoke)

    Default value: 2h

  • --out <OUT> — Where to write the agent key: a path, or - for stdout

  • --vault <VAULT> — Vault filename

    Default value: .murk

One-shot onboarding: optionally set the agent allow-list, mint a scoped grant, and print how to run the agent safely

Usage: murk agent init [OPTIONS] --name <NAME> --only <ONLY>

  • --name <NAME> — Grant name (used to revoke it later)

  • --only <ONLY> — Keys the agent can read (required — fails closed)

  • --allow-tag <ALLOW_TAG> — Set the agent allow-list to these tags before granting (repeatable)

  • --ttl <TTL> — Time to live, e.g. 30m, 2h, 7d (advisory — see agent revoke)

    Default value: 2h

  • --out <OUT> — Where to write the agent key: a path, or - for stdout

  • --vault <VAULT> — Vault filename

    Default value: .murk

List active agent grants and their TTLs

Usage: murk agent ls [OPTIONS]

  • --json — Output as JSON

  • --vault <VAULT> — Vault filename

    Default value: .murk

Revoke an agent grant and rotate the keys it could read

Usage: murk agent revoke [OPTIONS] <NAME>

  • <NAME> — Grant name
  • --rotate — Rotate the keys it could read in the same session

  • --vault <VAULT> — Vault filename

    Default value: .murk

Run an MCP (Model Context Protocol) stdio server for AI agents

Usage: murk mcp [OPTIONS]

  • --vault <VAULT> — Vault filename

    Default value: .murk

  • --allow-exec — Enable the murk_exec tool (run commands with scoped secrets injected). Off by default: it runs arbitrary commands as this user — the injected secrets are grant-scoped, but the command itself is not sandboxed

Manage the agent access policy

Usage: murk policy <COMMAND>

  • show — Show the agent access policy (works without a key)
  • set — Set the agent allow-list: agents may only receive secrets carrying one of these tags
  • clear — Remove the policy — agent mode becomes unrestricted again

Show the agent access policy (works without a key)

Usage: murk policy show [OPTIONS]

  • --json — Output as JSON

  • --vault <VAULT> — Vault filename

    Default value: .murk

Set the agent allow-list: agents may only receive secrets carrying one of these tags

Usage: murk policy set [OPTIONS] --allow-tag <ALLOW_TAG>

  • --allow-tag <ALLOW_TAG> — Tag agents are allowed to receive (repeatable, required)

  • --vault <VAULT> — Vault filename

    Default value: .murk

Remove the policy — agent mode becomes unrestricted again

Usage: murk policy clear [OPTIONS]

  • --vault <VAULT> — Vault filename

    Default value: .murk

Manage recipients

Usage: murk circle [OPTIONS] [COMMAND]

  • authorize — Add a recipient to the vault
  • revoke — Remove a recipient from the vault
  • --json — Output as JSON

  • --vault <VAULT> — Vault filename

    Default value: .murk

Add a recipient to the vault

Usage: murk circle authorize [OPTIONS] <PUBKEY>

  • <PUBKEY> — Public key (age1…), ssh:path, ssh: (default ~/.ssh/id_ed25519.pub), or github:username
  • --name <NAME> — Display name for this recipient

  • --group <GROUP> — Also add the new recipient to this group

  • --force — Accept changed GitHub keys without confirmation

  • --allow-ssh-rsa — Allow ssh-rsa recipients (rejected by default — use ed25519)

  • --vault <VAULT> — Vault filename

    Default value: .murk

Remove a recipient from the vault

Usage: murk circle revoke [OPTIONS] <RECIPIENT>

  • <RECIPIENT> — Recipient pubkey or display name
  • --rotate — Rotate the secrets they had access to in the same session

  • --vault <VAULT> — Vault filename

    Default value: .murk

Manage recipient groups

Usage: murk group <COMMAND>

  • create — Create a new recipient group (you become its first member)
  • ls — List groups and their members
  • add — Add a member to a group
  • rm — Remove a member from a group, or delete the group entirely

Create a new recipient group (you become its first member)

Usage: murk group create [OPTIONS] <NAME>

  • <NAME> — Group name
  • --vault <VAULT> — Vault filename

    Default value: .murk

List groups and their members

Usage: murk group ls [OPTIONS]

  • --json — Output as JSON

  • --vault <VAULT> — Vault filename

    Default value: .murk

Add a member to a group

Usage: murk group add [OPTIONS] --member <MEMBER> <NAME>

  • <NAME> — Group name
  • --member <MEMBER> — Recipient pubkey or display name to add

  • --vault <VAULT> — Vault filename

    Default value: .murk

Remove a member from a group, or delete the group entirely

Usage: murk group rm [OPTIONS] <NAME>

  • <NAME> — Group name
  • --member <MEMBER> — Recipient pubkey or display name to remove (omit to delete the group)

  • --vault <VAULT> — Vault filename

    Default value: .murk

Verify vault integrity without exporting secrets

Usage: murk verify [OPTIONS]

  • --vault <VAULT> — Vault filename

    Default value: .murk

Check the surrounding repo for hygiene issues

Usage: murk doctor [OPTIONS]

  • --vault <VAULT> — Vault filename

    Default value: .murk

Scan files for leaked secret values

Usage: murk scan [OPTIONS] [PATHS]...

  • <PATHS> — Files or directories to scan (defaults to current directory)
  • --vault <VAULT> — Vault filename

    Default value: .murk

Show secret changes vs a git ref

Usage: murk diff [OPTIONS] [GIT_REF]

  • <GIT_REF> — Git ref to compare against

    Default value: HEAD

  • --show-values — Show actual values (not just key names)

  • --json — Output as JSON

  • --vault <VAULT> — Vault filename

    Default value: .murk

Configure git to use murk’s merge driver for .murk files

Usage: murk setup-merge-driver

Generate or install shell completions

Usage: murk completion <COMMAND>

  • generate — Print completions to stdout
  • install — Install completions to the standard path

Print completions to stdout

Usage: murk completion generate <SHELL>

  • <SHELL> — Shell to generate completions for

    Possible values: bash, elvish, fish, powershell, zsh

Install completions to the standard path

Usage: murk completion install <SHELL>

  • <SHELL> — Shell to install completions for

    Possible values: bash, elvish, fish, powershell, zsh