CLI
170 commands across 5 programs, 552 flags in total.
- klav2 flags
- └account
- └delete1 flag
- └kit1 flag
- └set-server
- └agent
- └approve13 flags
- └browser
- └forget
- └register2 flags
- └deny
- └fill12 flags
- └inject10 flags
- └label4 flags
- └list1 flag
- └pause3 flags
- └register7 flags
- └resume2 flags
- └revoke3 flags
- └run9 flags
- └search7 flags
- └secret-request
- └create25 flags
- └show2 flags
- └wait3 flags
- └show1 flag
- └status3 flags
- └task
- └end3 flags
- └request3 flags
- └show2 flags
- └wait3 flags
- └totp5 flags
- └approval
- └approve3 flags
- └deny
- └list2 flags
- └show1 flag
- └wait3 flags
- └client
- └connect11 flags
- └disconnect6 flags
- └list1 flag
- └restore2 flags
- └rules4 flags
- └env
- └create3 flags
- └import5 flags
- └link2 flags
- └ls2 flags
- └rm2 flags
- └scan1 flag
- └set5 flags
- └show3 flags
- └unlink2 flags
- └extension
- └host-status6 flags
- └install-host6 flags
- └uninstall-host6 flags
- └generate14 flags
- └generated
- └ls1 flag
- └rm1 flag
- └show
- └health8 flags
- └breach-check
- └import5 flags
- └inject10 flags
- └item
- └add16 flags
- └attach2 flags
- └edit11 flags
- └get3 flags
- └history2 flags
- └ls7 flags
- └purge1 flag
- └restore
- └rm
- └search1 flag
- └sites3 flags
- └lock1 flag
- └log13 flags
- └reset1 flag
- └verify1 flag
- └login4 flags
- └logout2 flags
- └mcp2 flags
- └presence
- └window1 flag
- └project
- └create1 flag
- └link4 flags
- └ls2 flags
- └unlink4 flags
- └proxy
- └cloud
- └reset1 flag
- └status1 flag
- └stop1 flag
- └grant34 flags
- └issuer
- └add10 flags
- └remove1 flag
- └local
- └init3 flags
- └revoke2 flags
- └status1 flag
- └pg-guard
- └enable2 flags
- └status1 flag
- └revoke1 flag
- └sandbox-secret-requests
- └enable2 flags
- └status1 flag
- └sandboxes2 flags
- └revoke3 flags
- └status1 flag
- └tunnels
- └enable2 flags
- └status1 flag
- └use1 flag
- └run5 flags
- └sandbox
- └ls3 flags
- └start7 flags
- └stop4 flags
- └secret-request
- └deny1 flag
- └fulfill20 flags
- └list2 flags
- └show1 flag
- └stop-issuer1 flag
- └stop-sandbox1 flag
- └signup5 flags
- └skill
- └install7 flags
- └show
- └status1 flag
- └uninstall5 flags
- └update4 flags
- └status1 flag
- └sync2 flags
- └task
- └approve4 flags
- └deny1 flag
- └end1 flag
- └list2 flags
- └show1 flag
- └totp2 flags
- └unlock2 flags
- └vault
- └create
- └ls1 flag
- klav-forward
- └down3 flags
- └env2 flags
- └mcp1 flag
- └run3 flags
- └secret-request
- └wait3 flags
- └serve6 flags
- └status2 flags
- └up10 flags
- klav-nitro-parent8 flags
- klav-proxy2 flags
- └enclave12 flags
- └init7 flags
- └serve10 flags
- └status1 flag
- klavd3 flags
klav
153 commands
Klav: an end-to-end encrypted password manager for people and agents.
- Framework
- clap
klav [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --password-stdin | boolean | — | — | Read the master password from the first line of stdin instead of a TTY prompt (for scripts). Values for `--secret-stdin` follow, one per line. (global) |
| --no-daemon | boolean | — | — | Do not use `klavd` even if it is running: unlock in this process. [env: KLAV_NO_DAEMON] (global) |
1 usage · in 1 flow
The account on this device: its server and its emergency kit.
- Framework
- clap
klav account1 usage · in 1 flow
Delete the account: everything it has on the server, 7 days after you ask (ADR 0037). Only at a terminal: you type the account email, then Touch ID if `klavd` uses it, then the master password. Not with `--no-daemon` where Touch ID is set up.
- Framework
- clap
klav account delete [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --cancel | boolean | — | — | Cancel the deletion asked for, from any device. Asks for Touch ID through `klavd`, or the master password, like resuming agents. |
0 usages · in 1 flow
Show the emergency kit again, with the server this device uses today (asks for the master password: the kit shows the Secret Key).
- Framework
- clap
klav account kit [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --emergency-kit | string | — | — | Write it to this new file (mode 0600) instead of the terminal. |
1 usage · in 1 flow
Move the account on this device to another server URL: a full log-in there with the master password, kept only if the server has this same account (ADR 0028 §4). Also the way out if a domain is down.
- Framework
- clap
klav account set-server <url>| Argument | Type | Description |
|---|---|---|
| url | string | The new server URL (taken as typed). |
1 usage · in 1 flow
AI agents: register one (agent side); list, approve or deny them (person side).
- Framework
- clap
klav agent1 usage · in 1 flow
Approve an agent, or change its grant (person side; Touch ID or the master password). `grant` is the same command.
- Framework
- clap
klav agent approve <agent> [flags]| Argument | Type | Description |
|---|---|---|
| agent | string | Agent name or ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --project … | string[] | — | — | Project to share: `vault/project` (repeatable). |
| --vault … | string[] | — | — | Share every project of a vault (repeatable). |
| --allow … | string[] | — | — | Allow permissions (comma-separated: list, fill, inject, totp, reveal, create, update, delete). |
| --ask … | string[] | — | — | Ask the person each time for these permissions. |
| --deny … | string[] | — | — | Deny these permissions. |
| --fill-domain … | string[] | — | — | Allow `fill` only on these hosts (`example.com`, `*.example.com`). |
| --env … | string[] | — | — | `inject` on one environment of the shared projects (ADR 0032 §4.3), e.g. `development=allow`, `staging=ask` (repeatable; `VAULT/PROJECT/ NAME=…` when two projects have it). A protected environment is never `allow`: it and the items it protects always ask, once per use. |
| --hours … | string[] | — | — | Only work inside this weekly window, e.g. `mon-fri 09:00-18:00 -06:00` (repeatable). |
| --expires | number | — | — | The grant stops working after this long (e.g. `8h`, `30d`). |
| --policy-file | string | — | — | A policy file (JSON, `docs/diseno.md` §5.2) used as the base. |
| --words | string | — | — | The six pairing words shown by the agent (asked if missing). Only for a pending agent: an active one's words are inside its grant. |
| --rotate-removed | boolean | — | — | An active agent: also change the key of each project taken away, and give the other agents that hold it a new grant. |
| --yes, -y | boolean | — | — | An active agent: sign the differences without asking `[y/N]` (a change that widens still asks for Touch ID or the master password). |
1 usage · in 1 flow
Name a browser so `klav mcp` can fill into it (`sdk:<name>`).
- Framework
- clap
klav agent browser0 usages · in 1 flow
Forget a registered browser.
- Framework
- clap
klav agent browser forget <name>| Argument | Type | Description |
|---|---|---|
| name | string | Session name. |
1 usage · in 1 flow
Register a browser (CDP address and tab) as `sdk:<name>`.
- Framework
- clap
klav agent browser register <name> [flags]| Argument | Type | Description |
|---|---|---|
| name | string | Session name. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --cdp | string | required | — | The browser's CDP address (`http://127.0.0.1:9222`). |
| --target | string | — | — | Tab (CDP target ID); default: the first tab. |
1 usage · in 1 flow
Deny a pending registration (person side).
- Framework
- clap
klav agent deny <agent>| Argument | Type | Description |
|---|---|---|
| agent | string | Agent name or ID. |
1 usage · in 1 flow
Type a login or card into a browser page, over CDP or through Klav's extension, as the agent (agent side): the values never come back.
- Framework
- clap
klav agent fill <reference> [flags]| Argument | Type | Description |
|---|---|---|
| reference | string | `klav://Vault/Project/Item` (username and password, or the card) or `…/Item/field`. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --reason | string | required | — | Why the agent needs it (mandatory; logged and shown to the person). |
| --wait | number | — | — | Wait this long for the person when it needs approval (e.g. `2m`). |
| --approval | string | — | — | Use this approval (the ID of a request the person approved, after `klav approval wait`); refused if it is for another action. |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). |
| --cdp | string | — | — | The browser's CDP address (`http://127.0.0.1:9222`). |
| --target | string | — | — | Tab (CDP target ID); default: the first tab. |
| --session | string | — | — | A browser registered with `klav agent browser register`. |
| --extension | boolean | — | — | The active tab of the person's browser, through Klav's extension. |
| --selector … | string[] | — | — | CSS selector for a field: `password=#pass` (repeatable). |
| --submit | boolean | — | — | Submit the form after filling. |
| --json | boolean | — | — | Print the report as JSON (field names and addresses, never values). |
| --config | string | — | — | Project file (default: nearest `klav.toml`). |
0 usages · in 1 flow
Write secrets into a new 0600 file, as the agent (agent side; never to stdout). Prefer `klav agent run` (env or `klav.toml`'s `[files]`) when the command does not need a standalone file on disk.
- Framework
- clap
klav agent inject [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --reason | string | required | — | Why the agent needs it (mandatory; logged and shown to the person). |
| --wait | number | — | — | Wait this long for the person when it needs approval (e.g. `2m`). |
| --approval | string | — | — | Use this approval (the ID of a request the person approved, after `klav approval wait`); refused if it is for another action. |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). |
| --in-file, -i | string | — | — | Template with `{{ klav://… }}` references. |
| --reference, -r | string | — | — | One reference whose value is written as is. |
| --out-file, -o | string | required | — | Output file, created with mode 0600. |
| --force | boolean | — | — | Replace the output file if it exists. |
| --ttl | number | — | — | Remove the file after this long (waits in the foreground). |
| --config | string | — | — | Project file for short references (default: nearest `klav.toml`). |
0 usages · in 1 flow
Set or clear your own E2E-encrypted label or machine/host note for an agent (person side, ADR 0047).
- Framework
- clap
klav agent label <agent> [flags]| Argument | Type | Description |
|---|---|---|
| agent | string | Agent name or ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --label | string | — | — | Friendly alias in your own words (e.g. "Proxmox proxy"). |
| --host | string | — | — | Machine, server or sandbox host (e.g. "pve-home"). |
| --clear | boolean | — | — | Remove the label and host for this agent. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
The account's agents (person side).
- Framework
- clap
klav agent list [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Pause every agent, or one, now (person side, ADR 0033 §7): the server refuses all they ask until you resume. No Touch ID: pausing must cost nothing. With `klavd` running, `--all` works locked.
- Framework
- clap
klav agent pause <agent?> [flags]| Argument | Type | Description |
|---|---|---|
| agent? | string | Agent name or ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --all | boolean | — | — | Every agent of the account. |
| --for | number | — | — | End the pause by itself after this long (e.g. `1h`); by default it lasts until you resume. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Register this machine as an agent of an account (agent side). Prints the six pairing words the person must see when approving it.
- Framework
- clap
klav agent register [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --name | string | required | — | Name of the agent (shown to the person; also its local name). |
| --server | string | — | — | Server URL (default: the server of the account on this device, else https://api.klav.dev). [env: KLAV_SERVER] |
| string | — | — | E-mail of the account to join (default: the account on this device). | |
| --note | string | — | — | A note for the person (e.g. what the agent is for). |
| --key-store | "auto" | "keychain" | "file" | — | auto | Where to keep the agent's private key. |
| --key-file | string | — | — | Key file for `--key-store file` (default: `$KLAV_HOME/agents/<name>.key`). |
| --json | boolean | — | — | Print the result as JSON on stdout: the agent ID, its public identity, the six words and when the request lapses. |
1 usage · in 1 flow
Resume every agent, or one, after a pause (person side; Touch ID or the master password). Resuming every agent leaves the agents you paused one by one paused.
- Framework
- clap
klav agent resume <agent?> [flags]| Argument | Type | Description |
|---|---|---|
| agent? | string | Agent name or ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --all | boolean | — | — | Every agent of the account. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Revoke an agent now and print what it saw (person side).
- Framework
- clap
klav agent revoke <agent> [flags]| Argument | Type | Description |
|---|---|---|
| agent | string | Agent name or ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --rotate | boolean | — | — | Also rotate the keys of its projects and re-issue the grants of the other agents that share them. |
| --yes, -y | boolean | — | — | Do not ask for confirmation. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Run a command with secrets in its environment, as the agent (agent side): `klav.toml`, an environment (`--env`) and `-e`; the output comes back with the values redacted.
- Framework
- clap
klav agent run <command> [flags]| Argument | Type | Description |
|---|---|---|
| command | string[] | The command and its arguments (after `--`). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --reason | string | required | — | Why the agent needs it (mandatory; logged and shown to the person). |
| --wait | number | — | — | Wait this long for the person when it needs approval (e.g. `2m`). |
| --approval | string | — | — | Use this approval (the ID of a request the person approved, after `klav approval wait`); refused if it is for another action. |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). |
| --config | string | — | — | Project file (default: the nearest `klav.toml`). |
| --var, -e … | string[] | — | — | Extra variable `NAME=REF` (repeatable). |
| --env … | string[] | — | — | The environment to inject (ADR 0032 §4.5): the project's environment of that name in the vault, plus `[env.NAME]` of `klav.toml`. Without it: `default_env`, the flat `[env]`, or the only environment. A protected one asks the person once for it and the protected items it uses. A `NAME=REF` here is read as `-e`. |
| --no-files | boolean | — | — | Do not write the `[files]` of `klav.toml`. |
| --timeout | number | — | 10m | Kill the command after this long. |
0 usages · in 1 flow
Find the items this agent may list, by title, user name, URL or tag (agent side, like `search_items` in `klav mcp`): exact `klav://` references and field names, never values.
- Framework
- clap
klav agent search <query?> [flags]| Argument | Type | Description |
|---|---|---|
| query? | string | Text in the title, user name or URL, or a tag (default: every item, up to `--limit`). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --vault | string | — | — | Only this vault. |
| --project | string | — | — | Only this project. |
| --kind | "login" | "card" | "identity" | "ssh-key" | "file" | "totp" | "note" | "api-key" | …+1 | — | — | Only this type (`search_items` calls it `type`). |
| --repo-only | boolean | — | — | Only items of granted projects linked to this Git repository. |
| --limit | number | — | 50 | At most this many items (max 200). |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Ask the person to save or update a secret in Klav without the value ever reaching this agent (agent side, ADR 0046).
- Framework
- clap
klav agent secret-request0 usages · in 1 flow
Propose a secret for the person to enter on their device without the value ever touching this agent.
- Framework
- clap
klav agent secret-request create [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --reason | string | required | — | Why this secret is needed (mandatory; shown to the person and logged). |
| --mode | "create" | "update" | — | create | `create` a new item (default) or `update` a secret field of an existing one. |
| --type | "api-key" | "database" | "login" | "note" | "ssh-key" | "totp" | — | — | Item kind in `create` mode (default: `api-key`). |
| --title | string | — | — | Suggested item title (`create` mode). |
| --ref | string | — | — | Target item reference or ID (`update` mode). |
| --field | string | — | — | Target secret field name (default depends on kind, e.g. `api_key`). |
| --project | string | — | — | Suggested granted project (`Vault/Project` or project ID, `create` mode). |
| --placeholder | string | — | — | Short hint for the hidden input (e.g. `sk_live_…`). |
| --setup-url | string | — | — | Provider dashboard URL (`https://…`) where the person can create or copy the key (never auto-opened, T235). |
| --base-url | string | — | — | Non-secret API base URL for `api-key` items. |
| --url … | string[] | — | — | Suggested login URL (repeatable; unchecked by default on the card, T234). |
| --notes | string | — | — | Suggested non-secret notes (`create` mode). |
| --env-environment | string | — | — | Environment item to propose linking the saved field into (for example `development`; requires --env-variable). |
| --env-variable | string | — | — | Environment variable to propose linking the saved field as (for example `DATABASE_URL`; requires --env-environment). |
| --proxy-profile | string | — | — | Optional proposed `klav-proxy` profile name (unchecked by default, T239). |
| --proxy-upstream | string | — | — | Upstream `https://…` URL for the proposed proxy profile. |
| --proxy-header | string | — | — | Header name for the proposed proxy profile (default: `authorization`). |
| --proxy-prefix | string | — | — | Prefix before the secret in the proxy header (default: `Bearer `). |
| --proxy-method … | string[] | — | — | Allowed HTTP methods for the proposed proxy profile (comma-separated). |
| --proxy-ask-method … | string[] | — | — | Ask-per-call HTTP methods for the proposed proxy profile (comma-separated). |
| --proxy-path-prefix … | string[] | — | — | Allowed path prefixes for the proposed proxy profile (repeatable, e.g. `/v1`). |
| --proxy-rate | number | — | — | Optional per-minute rate limit (`1..=600`) for the proposed proxy profile. |
| --wait | number | — | — | Wait this long for the person to decide (e.g. `2m`). |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). [env: KLAV_AGENT] |
| --json | boolean | — | — | Machine-readable JSON output. |
Check the current state of one of this agent's secret requests.
- Framework
- clap
klav agent secret-request show <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Secret request ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). [env: KLAV_AGENT] |
| --json | boolean | — | — | Machine-readable JSON output. |
Wait for the person to fulfill or deny a secret request. Exit codes: 0 fulfilled, 4 pending, 5 denied, 6 expired, 7 paused, 8 account deleting.
- Framework
- clap
klav agent secret-request wait <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Secret request ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --timeout | number | — | 10m | How long to wait (`10m` default). |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). [env: KLAV_AGENT] |
| --json | boolean | — | — | Machine-readable JSON output. |
An agent, its grant and what it saw according to the audit log (person side).
- Framework
- clap
klav agent show <agent> [flags]| Argument | Type | Description |
|---|---|---|
| agent | string | Agent name or ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
State of a registered agent (agent side).
- Framework
- clap
klav agent status [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). |
| --wait | boolean | — | — | Wait until the person approves or denies it. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Task requests: several items and permissions for one job, approved with one card (agent side, ADR 0021).
- Framework
- clap
klav agent task0 usages · in 1 flow
End a task of this agent when the job is done.
- Framework
- clap
klav agent task end <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Task ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --reason | string | required | — | Why (mandatory; logged). |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). [env: KLAV_AGENT] |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Ask the person for a task described in a file (`tarea.toml` or `.json`; `-` reads JSON from stdin). Exit code: 0 approved, 4 pending, 5 denied, 6 expired.
- Framework
- clap
klav agent task request <file> [flags]| Argument | Type | Description |
|---|---|---|
| file | string | The task file. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --wait | number | — | 10m | Wait for the person (default `10m` when given without a value). |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). [env: KLAV_AGENT] |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
A task of this agent: its state and what the person approved.
- Framework
- clap
klav agent task show <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Task ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). [env: KLAV_AGENT] |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Wait until the person decides on a task. Exit code: 0 approved, 4 still pending at `--timeout`, 5 denied (or ended by the person), 6 expired.
- Framework
- clap
klav agent task wait <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Task ID (the full `pending_task_id`). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --timeout | number | — | 10m | Give up after this long (a task request expires 10 minutes after it was made). |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). [env: KLAV_AGENT] |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Current one-time password of an item, as the agent (agent side; `totp` is `ask` by default).
- Framework
- clap
klav agent totp <reference> [flags]| Argument | Type | Description |
|---|---|---|
| reference | string | `klav://Vault/Project/Item` (or `Item` with `project` in klav.toml). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --reason | string | required | — | Why the agent needs it (mandatory; the person sees it). |
| --field | string | — | — | Field (default: the first one-time password field). |
| --wait | number | — | — | Wait this long for the person when it needs approval (e.g. `2m`). |
| --approval | string | — | — | Use this approval (the ID of a request the person approved, after `klav approval wait`); refused if it is for another action. |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). |
1 usage · in 1 flow
Requests of agents waiting for your approval (`ask` in their policy).
- Framework
- clap
klav approval1 usage · in 1 flow
Approve a request (Touch ID or the master password).
- Framework
- clap
klav approval approve <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Request ID (or its first characters). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --for | number | — | — | Approve the same action on the same item for this long (e.g. `15m`, at most `24h`) instead of once. |
| --add-to-task | boolean | — | — | «Add to the task»: add it to the agent's running task (same end time) and approve this request once. |
| --yes, -y | boolean | — | — | Do not ask for confirmation after showing the request. |
1 usage · in 1 flow
Deny a request.
- Framework
- clap
klav approval deny <id>| Argument | Type | Description |
|---|---|---|
| id | string | Request ID (or its first characters). |
1 usage · in 1 flow
Pending requests (`--all`: also the recent decided ones).
- Framework
- clap
klav approval list [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --all | boolean | — | — | Include decided and expired requests. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Show a pending request's card, deciding nothing: for an MCP tool call, the caller, profile and tool (ADR 0049 §5.4).
- Framework
- clap
klav approval show <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Request ID (or its first characters). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Wait, as the agent, until the person decides on its request (agent side). Exit code: 0 approved, 4 still pending at `--timeout`, 5 denied, 6 expired.
- Framework
- clap
klav approval wait <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Request ID (the full `pending_approval_id`). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --timeout | number | — | 10m | Give up after this long (the request itself expires 10 minutes after it was made). |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). [env: KLAV_AGENT] |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Agent clients (Claude Code, Claude Desktop, Codex, Cursor, VS Code): connect Klav's MCP server and skill to them, or disconnect it.
- Framework
- clap
klav client1 usage · in 1 flow
Connect a client: register its agent (or use the one it has), add the `klav` entry to its MCP settings (with a backup) and install the skill. Shows what it will change first.
- Framework
- clap
klav client connect <client> [flags]| Argument | Type | Description |
|---|---|---|
| client | ClientArg | The client. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --agent | string | — | — | Agent name (default: the client's name, e.g. `cursor`). |
| --no-skill | boolean | — | — | Do not install the skill. |
| --dry-run | boolean | — | — | Show what would change and change nothing. |
| --yes, -y | boolean | — | — | Write without asking (needed without a terminal). |
| --replace | boolean | — | — | Replace a `klav` entry Klav did not write, or one that changed since it did (a copy is kept). |
| --adopt | boolean | — | — | Keep a `klav` entry Klav did not write as Klav's, as it is, if it runs a `klav` program. |
| --expect-sha256 | string | — | — | Only write if the settings file still has this SHA-256 (the `file_sha256` of `--dry-run --json`). |
| --key-store | "auto" | "keychain" | "file" | — | auto | Where a new agent keeps its private key. |
| --mcp … | string[] | — | — | Instead of Klav's own MCP server: connect the client to these MCP profiles of your credential proxy on this Mac (ADR 0049 §3), one entry each (`http://127.0.0.1:8790/<profile>/…`), with a local client token signed into the proxy's grant. Comma-separated or repeated. |
| --proxy-port | number | — | 8790 | The port the credential proxy listens on, on this Mac. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Remove Klav's entry (and skill) from a client. The agent keeps its access: pause or revoke it for that.
- Framework
- clap
klav client disconnect <client> [flags]| Argument | Type | Description |
|---|---|---|
| client | ClientArg | The client. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --keep-skill | boolean | — | — | Leave the skill where it is. |
| --dry-run | boolean | — | — | Show what would change and change nothing. |
| --yes, -y | boolean | — | — | Do not ask (needed without a terminal). |
| --force | boolean | — | — | Also remove a Klav entry or skill that changed since Klav wrote it (a copy of the settings is kept). |
| --mcp … | string[] | — | — | Instead of Klav's own MCP server: remove the client's MCP gateway entries for these profiles (none named: every one) and take them from its local client token in the proxy's grant (ADR 0049 §3.1). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Which clients are here and how Klav is set up in each one. Changes nothing.
- Framework
- clap
klav client list [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Put back the client's settings file as it was before Klav's last change (from `$KLAV_HOME/client-backups`).
- Framework
- clap
klav client restore <client> [flags]| Argument | Type | Description |
|---|---|---|
| client | ClientArg | The client. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --force | boolean | — | — | Restore even if the file changed since Klav wrote it (its current content is kept as another backup). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Add, update or remove Klav's marked agent-rules block in a repository's `AGENTS.md` or `CLAUDE.md`.
- Framework
- clap
klav client rules <path?> [flags]| Argument | Type | Description |
|---|---|---|
| path? | string | Repository root (default: the current directory). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --file | string | — | — | Instruction file to write: `AGENTS.md`, `CLAUDE.md`, or another path inside the repository (relative paths start at the repository root). |
| --dry-run | boolean | — | — | Show what would change and change nothing. |
| --remove | boolean | — | — | Remove only Klav's marked block. |
| --json | boolean | — | — | Machine-readable JSON output. |
0 usages · in 1 flow
Environments of a project (ADR 0032): variables per environment, `.env` import and scan, and the repository link.
- Framework
- clap
klav env1 usage · in 1 flow
Create an environment. `production` and `prod` are protected unless `--no-protected`.
- Framework
- clap
klav env create <name> [flags]| Argument | Type | Description |
|---|---|---|
| name | string | The environment's name (`[a-z0-9][a-z0-9_-]{0,63}`). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --project | string | — | — | |
| --protected | boolean | — | — | Protected: presence every time, and `ask once` for agents. |
| --no-protected | boolean | — | — | Not protected (turning protection off asks for presence). |
1 usage · in 1 flow
Import a `.env` file (or `klav.toml`'s flat `[env]`, as references) into an environment, without printing any value.
- Framework
- clap
klav env import <file> [flags]| Argument | Type | Description |
|---|---|---|
| file | string | `.env` file, `klav.toml`, or `-` for stdin. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --env | string | required | — | The environment to import into (created if missing). |
| --project | string | — | — | |
| --dry-run | boolean | — | — | Show the review and change nothing. |
| --yes, -y | boolean | — | — | Accept every proposal and do not ask (the file is not deleted). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Link this Git repository to a project (it only suggests: never grants or skips a confirmation).
- Framework
- clap
klav env link <project?> [flags]| Argument | Type | Description |
|---|---|---|
| project? | string | Project (`Vault/Project`; default: `klav.toml`'s `project`). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --remote | string | — | — | The Git remote to read (default: `origin`, or the one chosen before for this repository). |
| --yes, -y | boolean | — | — | Do not ask (the remote must be clear, `klav.toml` is not written). |
1 usage · in 1 flow
The environments of a project: variables, protected, last edit.
- Framework
- clap
klav env ls [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --project | string | — | — | Project (`Vault/Project`, a name or an ID; default: `klav.toml`'s `project`, or every project). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Remove variables, or with none the whole environment (to the trash, after a confirmation).
- Framework
- clap
klav env rm <name> <vars?> [flags]| Argument | Type | Description |
|---|---|---|
| name | string | The environment's name. |
| vars? | string[] | Variables to remove. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --project | string | — | — | |
| --yes, -y | boolean | — | — | Do not ask (needed without a terminal). |
1 usage · in 1 flow
Find `.env` and `.env.*` files (not `.env.example`) under DIR, say whether git ignores or tracks each, and offer to import them. Never reads or prints their contents to list them.
- Framework
- clap
klav env scan <dir?> [flags]| Argument | Type | Description |
|---|---|---|
| dir? | string | Where to look (default: the current directory). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Set variables: a value by hidden prompt (`-s VAR`) or stdin (`--secret-stdin VAR`), or a reference (`--ref VAR=klav://…`).
- Framework
- clap
klav env set <name> [flags]| Argument | Type | Description |
|---|---|---|
| name | string | The environment's name. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --project | string | — | — | |
| --secret, -s … | string[] | — | — | Ask for VAR's value without echo (repeatable). |
| --secret-stdin … | string[] | — | — | Read VAR's value from the next line of stdin (repeatable). |
| --ref … | string[] | — | — | VAR points to a field of another item (repeatable). |
| --protected | boolean | — | — | Turn `protected` on or off with the same change. |
1 usage · in 1 flow
One environment: variable names and where each comes from. Values are masked unless `--reveal` (presence every time for a protected one).
- Framework
- clap
klav env show <name> [flags]| Argument | Type | Description |
|---|---|---|
| name | string | The environment's name. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --project | string | — | — | |
| --reveal | boolean | — | — | Print the values. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Remove this repository from a project's links.
- Framework
- clap
klav env unlink [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --project | string | — | — | Project (`Vault/Project`; default: `klav.toml`'s `project`). |
| --remote | string | — | — | The Git remote to read. |
1 usage · in 1 flow
Browser extension: native messaging host manifests.
- Framework
- clap
klav extension1 usage · in 1 flow
Where each installed browser's manifest points, and whether it runs this `KLAV_HOME`'s host (`--host`): finds an install from another path before replacing it. Changes nothing.
- Framework
- clap
klav extension host-status [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --browser … | ("chrome" | "chromium" | "brave" | "arc" | "edge" | "dia" | "ardia" | "firefox")[] | — | — | Only this browser (repeatable; default: every installed one). |
| --user-data-dir | string | — | — | A Chromium profile directory (`--user-data-dir` of the browser) instead of the browser's default one. |
| --extension-id … | string[] | — | — | Also allow this extension: a Chromium ID (store build) or a Firefox add-on ID (repeatable). |
| --dev | boolean | — | — | Also allow the development build for Chromium browsers (the unpacked `apps/extension/dist/chromium`). Its ID comes from a public key in the repository, so any unpacked extension can claim it: only on a machine where you load the extension yourself. |
| --host | string | — | — | Path of `klav-native-host` (default: next to `klav`, or in PATH). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Let the browser extension talk to `klavd`: write the native messaging host manifests (Chrome, Chromium, Brave, Arc, Edge, Dia, Ardia, Firefox) for this `KLAV_HOME`.
- Framework
- clap
klav extension install-host [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --browser … | ("chrome" | "chromium" | "brave" | "arc" | "edge" | "dia" | "ardia" | "firefox")[] | — | — | Only this browser (repeatable; default: every installed one). |
| --user-data-dir | string | — | — | A Chromium profile directory (`--user-data-dir` of the browser) instead of the browser's default one. |
| --extension-id … | string[] | — | — | Also allow this extension: a Chromium ID (store build) or a Firefox add-on ID (repeatable). |
| --dev | boolean | — | — | Also allow the development build for Chromium browsers (the unpacked `apps/extension/dist/chromium`). Its ID comes from a public key in the repository, so any unpacked extension can claim it: only on a machine where you load the extension yourself. |
| --host | string | — | — | Path of `klav-native-host` (default: next to `klav`, or in PATH). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Remove the native messaging host manifests.
- Framework
- clap
klav extension uninstall-host [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --browser … | ("chrome" | "chromium" | "brave" | "arc" | "edge" | "dia" | "ardia" | "firefox")[] | — | — | Only this browser (repeatable; default: every installed one). |
| --user-data-dir | string | — | — | A Chromium profile directory (`--user-data-dir` of the browser) instead of the browser's default one. |
| --extension-id … | string[] | — | — | Also allow this extension: a Chromium ID (store build) or a Firefox add-on ID (repeatable). |
| --dev | boolean | — | — | Also allow the development build for Chromium browsers (the unpacked `apps/extension/dist/chromium`). Its ID comes from a public key in the repository, so any unpacked extension can claim it: only on a machine where you load the extension yourself. |
| --host | string | — | — | Path of `klav-native-host` (default: next to `klav`, or in PATH). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Generate a password or a passphrase.
- Framework
- clap
klav generate [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --type, -t | "smart" | "random" | "memorable" | "pin" | — | — | What to generate (default: smart, which follows the site's rules with --site or --rules, and is a 20-character random password otherwise). |
| --site | string | — | — | Site the password is for: its bundled rules (smart). |
| --rules | string | — | — | The site's `passwordrules` text (smart), e.g. "minlength: 8; required: digit;". |
| --length, -l | number | — | 20 | Password length (random; preferred length for smart). |
| --words, -w | number | — | — | Words of a memorable passphrase (implies --type memorable). |
| --separator | string | — | - | Passphrase separator: 1 to 8 bytes, no ASCII letter or digit, no control or invisible character. |
| --no-capitalize | boolean | — | — | Passphrase words in lowercase. |
| --no-number | boolean | — | — | Passphrase without a digit. |
| --pin-length | number | — | 6 | Digits of a PIN. |
| --no-symbols | boolean | — | — | No symbols. |
| --no-digits | boolean | — | — | No digits. |
| --no-uppercase | boolean | — | — | No uppercase letters. |
| --avoid-ambiguous | boolean | — | — | Avoid look-alike characters (0/O, 1/l/I…). |
| --no-history | boolean | — | — | Do not keep the password in the generator history. |
0 usages · in 1 flow
The passwords Klav generated.
- Framework
- clap
klav generated1 usage · in 1 flow
List the passwords Klav generated, newest first (values hidden).
- Framework
- clap
klav generated ls [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Delete entries of the generator history.
- Framework
- clap
klav generated rm <index?> [flags]| Argument | Type | Description |
|---|---|---|
| index? | number[] | Positions in the list. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --all | boolean | — | — | Delete the whole history. |
1 usage · in 1 flow
Print one generated password (`N` from `klav generated ls`).
- Framework
- clap
klav generated show <index>| Argument | Type | Description |
|---|---|---|
| index | number | Position in the list. |
1 usage · in 1 flow
Vault health: reused, weak and old passwords, and breached ones if the breach check is on (values never shown).
- Framework
- clap
klav health [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --fix-with | string | — | — | «Fix my reused passwords» (ADR 0022 §6): offer this agent a task to change the passwords you reuse, one site after another. The agent gets the sites, never the list of reused passwords. Asks for Touch ID or the master password once. |
| --only … | string[] | — | — | With --fix-with: only these logins (reference, title or ID; repeatable). |
| --skip … | string[] | — | — | With --fix-with: leave these logins out (reference, title or ID; repeatable). |
| --for | number | — | — | With --fix-with: how long the agent has (5m to 24h; default 2h). |
| --task | string | — | — | With --fix-with: the task's title, as the agent will read it. |
| --reason | string | — | — | With --fix-with: the reason, as the agent will read it. |
| --yes, -y | boolean | — | — | With --fix-with: do not ask before offering (needed without a terminal). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Show, turn on or turn off the breach check (Have I Been Pwned, off by default; a setting of this device only).
- Framework
- clap
klav health breach-check <state?>| Argument | Type | Description |
|---|---|---|
| state? | "on" | "off" | `on` or `off`; without it, show the setting. |
0 usages · in 1 flow
Import from another password manager or a browser: new items are created, repeats merged, and no password is lost (ADR 0024).
- Framework
- clap
klav import <files> [flags]| Argument | Type | Description |
|---|---|---|
| files | string[] | Export files, detected by their content: Bitwarden (`.json`, `.csv`), 1Password (`.1pux`, `.csv`), Google Authenticator (photos of its QR codes as `.png`, or `-` to paste its `otpauth-migration://` links on stdin) and browser CSVs (Chrome, Edge, Brave, Firefox, Safari). Several files are imported together. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --from | string | — | — | Where the files come from, when detection is not enough: bitwarden, 1password, google, chrome (edge, brave), firefox, safari or csv. |
| --vault | string | — | — | Destination vault (default: Personal). |
| --project | string | — | — | Destination project (default: General). |
| --dry-run | boolean | — | — | Show what would happen, change nothing. |
| --json | boolean | — | — | Machine-readable JSON output (the preview, and the result). |
1 usage · in 1 flow
Write secrets into a file or a named pipe (template or one reference).
- Framework
- clap
klav inject [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --in-file, -i | string | — | — | Template with `{{ klav://… }}` references (default: stdin). |
| --reference, -r | string | — | — | One reference whose value (text or file) is written as is. |
| --out-file, -o | string | — | — | Output file, created with mode 0600 (default: stdout). |
| --force | boolean | — | — | Replace the output file if it exists. |
| --ttl | number | — | — | Remove the file after this long (e.g. `30s`, `10m`, `1h`); `klav` waits in the foreground and also removes it on Ctrl-C/SIGTERM. |
| --fifo | boolean | — | — | Serve the value through a named pipe at `--out-file` (Unix): it is read once and never touches the disk. Waits for the reader up to `--ttl` (default 10m). |
| --config | string | — | — | Project file for short references (default: nearest `klav.toml`). |
| --env | string | — | — | The environment to write (ADR 0032 §6), with `--dotenv`. |
| --dotenv | boolean | — | — | Write the environment as a `.env` file (`NAME='value'` lines). |
| --trust | boolean | — | — | Use an environment not confirmed for this `klav.toml` yet without asking (it is pinned as confirmed). Presence is still asked for a protected one. |
1 usage · in 1 flow
Items: add, show, edit, remove, list and search.
- Framework
- clap
klav item1 usage · in 1 flow
Add an item.
- Framework
- clap
klav item add <kind> [flags]| Argument | Type | Description |
|---|---|---|
| kind | "login" | "card" | "identity" | "ssh-key" | "totp" | "note" | "api-key" | "database" | Type. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --title | string | required | — | Title (the item name in `klav://` references). |
| --vault | string | — | — | Vault (default: Personal). |
| --project | string | — | — | Project (default: General). |
| --username | string | — | — | Username (same as `--field username=…`). |
| --from-url | boolean | — | — | Ask for the database connection URL on the terminal, without echo (`database` only). Parsing it fills empty structured fields. |
| --from-url-stdin | boolean | — | — | Read the database connection URL from the next line of stdin (`database` only). Parsing it fills empty structured fields. |
| --build-url | boolean | — | — | Compose the connection URL from the structured fields when `url` is empty (`database` only). |
| --allow-duplicate | boolean | — | — | Add it even if the project already has an item with this title (references by title become ambiguous). |
| --field, -f … | string[] | — | — | Set a non-secret field: `NAME=VALUE` (repeatable). |
| --secret, -s … | string[] | — | — | Ask for a secret field on the TTY, without echo (repeatable). |
| --secret-stdin … | string[] | — | — | Read a secret field from the next line of stdin (repeatable). |
| --generate, -g … | string[] | — | — | Fill a secret field with a generated password (repeatable). |
| --url … | string[] | — | — | Add a URL (repeatable). |
| --tag … | string[] | — | — | Add a tag (repeatable). |
| --notes-stdin | boolean | — | — | Read the notes from the rest of stdin. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Store a file in a `file` field of an item (encrypted attachment).
- Framework
- clap
klav item attach <item> <field> <path> [flags]| Argument | Type | Description |
|---|---|---|
| item | string | Item reference, ID or title. |
| field | string | Field name (created if missing). |
| path | string | File to read. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --name | string | — | — | File name to record (default: the name of `path`). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Edit an item.
- Framework
- clap
klav item edit <item> [flags]| Argument | Type | Description |
|---|---|---|
| item | string | Item reference, ID or title. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --title | string | — | — | New title. |
| --allow-duplicate | boolean | — | — | Rename even if the project already has an item with the new title (references by title become ambiguous). |
| --rm-field … | string[] | — | — | Remove a field (repeatable). |
| --field, -f … | string[] | — | — | Set a non-secret field: `NAME=VALUE` (repeatable). |
| --secret, -s … | string[] | — | — | Ask for a secret field on the TTY, without echo (repeatable). |
| --secret-stdin … | string[] | — | — | Read a secret field from the next line of stdin (repeatable). |
| --generate, -g … | string[] | — | — | Fill a secret field with a generated password (repeatable). |
| --url … | string[] | — | — | Add a URL (repeatable). |
| --tag … | string[] | — | — | Add a tag (repeatable). |
| --notes-stdin | boolean | — | — | Read the notes from the rest of stdin. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Show an item. Secret values stay hidden unless `--reveal`.
- Framework
- clap
klav item get <item> [flags]| Argument | Type | Description |
|---|---|---|
| item | string | `klav://vault/project/item[/field]`, `vault/project/item`, ID or title. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --reveal | boolean | — | — | Show secret values. |
| --field | string | — | — | Print only this field's value. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Previous passwords of an item, newest first (values hidden).
- Framework
- clap
klav item history <item> [flags]| Argument | Type | Description |
|---|---|---|
| item | string | Item title or ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --reveal | number | — | — | Print previous password `N` (from the list) instead. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
List items (metadata only).
- Framework
- clap
klav item ls [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --vault | string | — | — | Only this vault. |
| --project | string | — | — | Only this project. |
| --kind … | ("login" | "card" | "identity" | "ssh-key" | "file" | "totp" | "note" | "api-key" | …+1)[] | — | — | Only these types: `--kind login,card` or `--kind login --kind card`. |
| --codes | boolean | — | — | Only items with a one-time code, of any type (`klav totp` shows it). |
| --tag | string | — | — | Only items with this tag. |
| --trash | boolean | — | — | List the trash. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Permanently delete an item that is in the trash.
- Framework
- clap
klav item purge <item> [flags]| Argument | Type | Description |
|---|---|---|
| item | string | Item reference, ID or title. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --yes | boolean | — | — | Confirm the permanent deletion. |
1 usage · in 1 flow
Restore an item from the trash.
- Framework
- clap
klav item restore <item>| Argument | Type | Description |
|---|---|---|
| item | string | Item reference, ID or title. |
1 usage · in 1 flow
Move an item to the trash.
- Framework
- clap
klav item rm <item>| Argument | Type | Description |
|---|---|---|
| item | string | Item reference, ID or title. |
1 usage · in 1 flow
Search titles, usernames, URLs and tags.
- Framework
- clap
klav item search <query> [flags]| Argument | Type | Description |
|---|---|---|
| query | string | Text to look for. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
The sites of an item: those the person confirmed, and those an agent added that wait for her (ADR 0030 §7). Only confirmed sites are autofilled, suggested or filled by agents.
- Framework
- clap
klav item sites <item> [flags]| Argument | Type | Description |
|---|---|---|
| item | string | Item reference, ID or title. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --confirm | boolean | — | — | Confirm every site an agent added (writes a new version as you). |
| --remove … | string[] | — | — | Remove this URL (repeatable). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Lock `klavd` now.
- Framework
- clap
klav lock [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --stop | boolean | — | — | Also stop `klavd`. |
1 usage · in 1 flow
The audit log: who used what, when and why; `log verify` checks it.
- Framework
- clap
klav log [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --item | string | — | — | Only events about this item (reference, ID or title). |
| --agent | string | — | — | Only events of this agent (name or ID). |
| --vault | string | — | — | Only events in this vault. |
| --since | number | — | — | From: a duration back from now (`24h`, `7d`), a date (`2026-11-02`) or a UTC time (`2026-11-02T14:30`). |
| --until | number | — | — | Until (same formats as `--since`; a date means its end). |
| --alerts | boolean | — | — | Only events with alerts (first use, bursts, denials). |
| --permission … | Permission[] | — | — | Only events with this permission (`fill`, `inject`, `totp`, `reveal`, `list`, `create`, `update`, `delete`, `passkey`, `rotate`). Repeat it for several. |
| --outcome … | string[] | — | — | Only events with this outcome: `allow`, `ask` or `deny` (the policy), `approve` (the person's decision). Repeat it for several. |
| --text | string | — | — | Only events whose item, agent, reason or site contain this text. |
| --task | string | — | — | The summary of one task: who approved it, every use, what was approved outside it and how it ended (ID or its first characters). |
| --limit, -n | number | — | 50 | At most this many events (newest first). |
| --json | boolean | — | — | JSON output (every matching event, ignores `--limit`). |
| --csv | boolean | — | — | CSV output (every matching event, ignores `--limit`). |
1 usage · in 1 flow
Forget this device's copy of the log and the head it verified, after the server was restored from a backup you trust: from then on this device takes the server's chain as it is now as the good one. Asks first. No network.
- Framework
- clap
klav log reset [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --yes | boolean | — | — | Do not ask: you accept the chain the server has now. |
1 usage · in 1 flow
Check the hash chain, the signatures in it and the signed heads; then sign the current head with this device. Exit code 3 if it was altered.
- Framework
- clap
klav log verify [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Set up this device for an existing account.
- Framework
- clap
klav login [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --server | string | — | — | Your own server's URL (the one in your emergency kit). Default: https://api.klav.dev (klav.dev). [env: KLAV_SERVER] |
| string | required | — | Account e-mail. | |
| --device-name | string | — | — | Name of this device (default: the host name). |
| --emergency-kit | string | — | — | Read the Secret Key from an emergency kit file (else it is asked). |
1 usage · in 1 flow
Sign this device out and delete its copy of the account from `$KLAV_HOME` (vaults, session, Secret Key file). The account stays on the server.
- Framework
- clap
klav logout [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --yes, -y | boolean | — | — | Do not ask (needed without a terminal). |
| --discard-unsent | boolean | — | — | Sign out even with generated passwords or passkeys not uploaded yet: they are lost with this device's copy. |
1 usage · in 1 flow
MCP server over stdio for an AI agent, with the agent's identity (`klav client connect` sets it up in a client).
- Framework
- clap
klav mcp [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). [env: KLAV_AGENT] |
| --wait | number | — | 60s | How long a tool waits for the person when the policy says `ask` (each call can ask for another `wait_seconds`, up to 10 min). |
1 usage · in 1 flow
Presence before `klavd` hands out a value (ADR 0041): how often it asks for Touch ID or the master password.
- Framework
- clap
klav presence1 usage · in 1 flow
Show how often `klavd` asks for your presence before it hands out a value, or set it. Loosening asks for Touch ID or the master password; tightening asks for nothing. Needs an unlocked `klavd`.
- Framework
- clap
klav presence window <window?> [flags]| Argument | Type | Description |
|---|---|---|
| window? | "always" | "5m" | "unlocked" | `always` (every value), `5m` (once per 5 minutes per terminal session), or `unlocked` (once until Klav locks). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Projects inside vaults.
- Framework
- clap
klav project1 usage · in 1 flow
Create a project.
- Framework
- clap
klav project create <name> [flags]| Argument | Type | Description |
|---|---|---|
| name | string | Name. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --vault | string | — | — | Vault name or ID. |
1 usage · in 1 flow
Link a Git repository to a project so Klav suggests its items in this repo (ADR 0032 §2). Reads `git remote get-url origin` unless `--repo` is given.
- Framework
- clap
klav project link <project> [flags]| Argument | Type | Description |
|---|---|---|
| project | string | Project (`Project` or `Vault/Project`). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --vault | string | — | — | Vault name or ID (overrides `Vault/` if omitted from `project`). |
| --repo | string | — | — | Explicit repository URL or `host/owner/repo` instead of detecting from Git. |
| --remote | string | — | origin | Git remote to read when `--repo` is omitted. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
List projects.
- Framework
- clap
klav project ls [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --vault | string | — | — | Only this vault. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Unlink a Git repository from a project (ADR 0032 §2).
- Framework
- clap
klav project unlink <project> [flags]| Argument | Type | Description |
|---|---|---|
| project | string | Project (`Project` or `Vault/Project`). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --vault | string | — | — | Vault name or ID (overrides `Vault/` if omitted from `project`). |
| --repo | string | — | — | Explicit repository URL or `host/owner/repo` instead of detecting from Git. |
| --remote | string | — | origin | Git remote to read when `--repo` is omitted. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
The credential proxy (ADR 0036): which agent it is, what it holds, and granting or taking away credentials one by one (person side).
- Framework
- clap
klav proxy1 usage · in 1 flow
Klav Cloud's attested proxy (`klav proxy use klav` sets it up): check it, stop using it, or set it up again.
- Framework
- clap
klav proxy cloudSet it up again (after it lost its keys, or to change its keys): a new agent, your credentials shared with it after verifying it, the old one revoked. Sandbox issuers are added again afterwards. Asks for Touch ID.
- Framework
- clap
klav proxy cloud reset [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Verify it now: the signed manifest, a fresh attestation of the enclave, the image it runs and whether the account is entitled.
- Framework
- clap
klav proxy cloud status [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Stop using it: revoke its agent, change the keys of every credential it held, and use no proxy. Then rotate those provider tokens at each provider. Asks for Touch ID.
- Framework
- clap
klav proxy cloud stop [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Grant one credential to the proxy with a profile: where its value may go and how. Shows the profile, then asks for Touch ID.
- Framework
- clap
klav proxy grant <item> [flags]| Argument | Type | Description |
|---|---|---|
| item | string | The item: title, ID or `vault/project/item`. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --preset | string | — | — | Start from a provider's profile: `northflank` (GET, POST and PATCH on api.northflank.com; DELETE asks you; PUT is refused; nothing in it guards role or token changes by path, so a POST or PATCH that changes a role or a token goes through like any other call), or `maple` (the MCP gate: POST, GET and DELETE under /mcp of api.maple.dev, none asking; `--upstream https://api.eu.maple.dev` for the EU host; the key's own permissions are the limit, so use a read-only one). Each flag you also give replaces that part of it. `railway` needs a mode the proxy does not have yet. The MCP gateway's presets (`github`, `cloudflare`, `linear`, `stripe`, and `maple` with tool rules) are refused until each passes its hand test: use `--mcp-url` and `--tools-…` meanwhile. `postgres` (ADR 0052): a database through `--pg-direct` or `--pg-northflank-addon`, reads allowed, every other statement asks (`--read-only`: refused). |
| --profile | string | — | — | Profile name: the first segment of the proxy's local URL (`http://127.0.0.1:8790/<profile>/…`). |
| --upstream | string | — | — | Where requests go: `https://host` or `https://host:port`. |
| --header | string | — | — | The header the value goes in (`authorization`; with `--mcp-url`, `authorization` unless given). |
| --mcp-url | string | — | — | An MCP profile (ADR 0049): the remote MCP server's URL, `https://host[:port]/path`. The proxy forwards only that path, reads the JSON-RPC in it, hides the tools no rule allows or asks for, and asks you per tool. Without `--prefix`, `Bearer `. |
| --mcp-header … | string[] | — | — | A fixed, non-secret header the MCP server needs (`NAME:VALUE`, repeatable, at most 4), such as a read-only switch. |
| --tools-allow … | string[] | — | — | MCP tools that go through: exact names or prefixes ending in `*` (`get_*`), comma-separated or repeated. `*` alone is every tool. |
| --tools-ask … | string[] | — | — | MCP tools each call of which asks you first. |
| --tools-deny … | string[] | — | — | MCP tools refused (and hidden from the agent's list). Any tool no pattern names is refused too. |
| --prefix | string | — | — | Text before the value (`"Bearer "`; default: none). |
| --field | string | — | — | The field holding the value (default: the item's main secret). |
| --method … | string[] | — | — | HTTP methods let through (comma-separated or repeated). |
| --path-prefix … | string[] | — | — | Path prefixes let through (`/v1`; `/` for every path). |
| --ask | boolean | — | — | Every call asks you first instead of going through. |
| --ask-method … | string[] | — | — | More methods, each call of which asks you first. |
| --rate | number | — | — | Most calls per minute through this profile. |
| --tunnels | boolean | — | — | WebSocket tunnels through the sandbox's HTTPS_PROXY (ADR 0052): each handshake to a `--tunnel-host` under `--tunnel-path` goes through with the real token. Needs at least one `--tunnel-host`. |
| --tunnels-ask | boolean | — | — | As `--tunnels`, but each handshake asks you first. |
| --tunnel-host … | string[] | — | — | A host the provider sends WebSocket tunnels to (repeatable, at most 4): exact (`tunnel.example.com`), or `*.example.com` for exactly one label under it, which gives the token to anyone who can get such a name. Use exact hosts. |
| --tunnel-path | string | — | — | The path a tunnel handshake must be under (default `/tunnel`). |
| --read-only | boolean | — | — | With `--preset postgres` (ADR 0052): writes, schema changes, admin and unknown statements are refused instead of asking you. |
| --pg-direct | string | — | — | With `--preset postgres`: the database's public host name and port (`db.example.com:5432`). The proxy connects with TLS and checks the name; the password never reaches the sandbox. |
| --pg-northflank-addon | string | — | — | With `--preset postgres`: a Northflank addon (`PROJECT/ADDON`), reached through Northflank's tunnel with the token of the profile `--pg-via` (a `--tunnels` profile of the proxy, `northflank` by default). |
| --pg-via | string | — | — | The Northflank profile whose token opens the addon's tunnel. |
| --pg-team | string | — | — | The Northflank team, for a team project. |
| --pg-addon-port | number | — | — | The addon's Postgres port (default 5432). |
| --pg-database … | string[] | — | — | With `--preset postgres`: a database the sandbox may open (repeatable, 1–4). |
| --pg-user | string | — | — | With `--preset postgres`: the item's field that holds the role name (default `username`). The item's main secret is the password. |
| --pg-tls | string | — | — | With `--preset postgres`: TLS toward the database, `verify-full` (default; on a Northflank addon, checked inside the tunnel for the addon instance's internal host name) or `none` (only on a Northflank addon with TLS turned off, whose tunnel is TLS already). |
| --pg-write-item | string | — | — | With `--preset postgres`: a second item whose role may write, used only for writes you approve. The profile's item then holds a read-only role (recommended). |
| --pg-cleartext | boolean | — | — | With `--preset postgres --pg-direct`: answer a cleartext password request, inside the verified TLS. Prefer moving the role to SCRAM. |
| --words | string | — | — | The proxy's 6 pairing words, for its first credential (asked if missing). |
| --every-device-is-updated | boolean | — | — | Every device of the account runs a Klav with per-item grants: needed for the account's first one, which older devices cannot read. With `--mcp-url`, also that every device and klav-proxy run a Klav with the MCP gateway: needed for the first MCP profile, which turns the account's MCP gateway on. With `--tunnels`, the same for WebSocket tunnels, and with `--preset postgres` for the Postgres guard. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Let an agent start sandboxes through the proxy, or stop it. Run it yourself: it asks for Touch ID, and an agent must never run it.
- Framework
- clap
klav proxy issuerLet AGENT start sandboxes through the account's proxy, with some of its profiles. Shows what it signs, then asks for Touch ID.
- Framework
- clap
klav proxy issuer add <agent> [flags]| Argument | Type | Description |
|---|---|---|
| agent | string | The agent: name or ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --profile … | string[] | required | — | A profile of the proxy its sandboxes may use (repeat for more). |
| --url | string | required | — | Where a sandbox reaches the proxy: `tls://host:port`. |
| --max-ttl | number | — | — | Longest a sandbox it starts may live (`8h`, `90m`; at most 24h). |
| --max-live | number | — | — | Most of its sandboxes alive at once (default 3). |
| --inject-ask | boolean | — | — | Make each `inject` of this agent ask you first (recommended: an issuer could otherwise hand a provider's token to the command that creates the sandbox). |
| --secret-requests | boolean | — | — | Let its sandboxes ask you for a secret through the proxy (ADR 0053, off by default). The first time, this turns the account's sandbox secret requests on. |
| --no-secret-requests | boolean | — | — | Stop its sandboxes from asking you for secrets. Without either flag the issuer keeps what it had (off for a new one). |
| --words | string | — | — | The agent's 6 pairing words, when it is still pending (asked if missing). |
| --every-device-is-updated | boolean | — | — | Every device and klav-proxy runs a Klav with sandbox issuers: needed for the account's first issuer, which older ones cannot read. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Stop AGENT from starting sandboxes.
- Framework
- clap
klav proxy issuer remove <agent> [flags]| Argument | Type | Description |
|---|---|---|
| agent | string | The agent: name or ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
The credential proxy running on this machine, through its local socket: its live sandboxes, and revoking them without unlocking.
- Framework
- clap
klav proxy local0 usages · in 1 flow
Register a credential proxy for this machine (`klav-proxy init`): shows its 6 words. The Klav app's LaunchAgent serves it.
- Framework
- clap
klav proxy local init [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| string | required | — | E-mail of the Klav account. | |
| --server | string | — | — | Klav server (default: Klav's). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Revoke one live sandbox of the proxy on this machine, or all of them, at once: no Touch ID and no unlocking (the proxy logs it as revoked through its socket). Run it yourself: an agent must never run it.
- Framework
- clap
klav proxy local revoke <id?> [flags]| Argument | Type | Description |
|---|---|---|
| id? | string | The sandbox's ID, whole or its first 8 characters as `status` shows them. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --all | boolean | — | — | Every live sandbox of the proxy on this machine. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Whether the proxy on this machine answers, its port, its MCP profiles and its live sandboxes with their connection. Never a value.
- Framework
- clap
klav proxy local status [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
The account's Postgres guard (ADR 0052 §10): whether it is on, and turning it on.
- Framework
- clap
klav proxy pg-guardTurn it on: devices and klav-proxy older than the Postgres proxy then fail their approvals list and log checks. Asks for Touch ID. `klav proxy grant --preset postgres` turns it on by itself.
- Framework
- clap
klav proxy pg-guard enable [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --every-device-is-updated | boolean | — | — | Every device and klav-proxy runs a Klav with WebSocket tunnels: needed when the account has another device or a proxy. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Whether the account's Postgres guard is on.
- Framework
- clap
klav proxy pg-guard status [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Take one credential away from the proxy and change the item's key.
- Framework
- clap
klav proxy revoke <item> [flags]| Argument | Type | Description |
|---|---|---|
| item | string | The item: title or ID. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
The account's secret requests from sandboxes (ADR 0053 §9): whether a credential proxy may ask you for a secret on behalf of a sandbox, and turning it on. Nothing turns it off. Each issuer still opts in with `klav proxy issuer add --secret-requests`.
- Framework
- clap
klav proxy sandbox-secret-requestsTurn them on: devices and klav-proxy older than them then fail their log checks once a sandbox asks. Asks for Touch ID. `klav proxy issuer add --secret-requests` turns them on by itself.
- Framework
- clap
klav proxy sandbox-secret-requests enable [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --every-device-is-updated | boolean | — | — | Every device and klav-proxy runs a Klav with WebSocket tunnels: needed when the account has another device or a proxy. |
| --json | boolean | — | — | Machine-readable JSON output. |
Whether the account's secret requests from sandboxes are on.
- Framework
- clap
klav proxy sandbox-secret-requests status [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
The sandboxes of the account's proxy, from the verified log and the proxy's heartbeat; `revoke` takes one or all of them away.
- Framework
- clap
klav proxy sandboxes [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --ended | boolean | — | — | Also those that ended, and those whose proxy was revoked. |
| --json | boolean | — | — | Machine-readable JSON output. |
0 usages · in 1 flow
Revoke one sandbox of the account's proxy, or all it issued so far. Signed with the account, without Touch ID: it only takes access away. Run it yourself: an agent must never run it.
- Framework
- clap
klav proxy sandboxes revoke <id?> [flags]| Argument | Type | Description |
|---|---|---|
| id? | string | The sandbox's ID, whole or its first 8 characters as the list shows them. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --all | boolean | — | — | Every sandbox of the account's proxy issued so far. |
| --wait | boolean | — | — | Wait until the proxy logs their end (at most 2 minutes). |
| --json | boolean | — | — | Machine-readable JSON output. |
The account's credential proxy, its 6 words, the credentials and profiles it holds, and what is lost without one. Never a value.
- Framework
- clap
klav proxy status [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
The account's WebSocket tunnels switch (ADR 0052 §10): whether the server takes tunnel profiles and their approvals, and turning it on. Nothing turns it off.
- Framework
- clap
klav proxy tunnelsTurn them on: devices and klav-proxy older than tunnels then fail their approvals list and log checks. Asks for Touch ID. `klav proxy grant --tunnels` turns them on by itself.
- Framework
- clap
klav proxy tunnels enable [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --every-device-is-updated | boolean | — | — | Every device and klav-proxy runs a Klav with WebSocket tunnels: needed when the account has another device or a proxy. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Whether the account's WebSocket tunnels are on.
- Framework
- clap
klav proxy tunnels status [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Set which agent is the account's credential proxy: `use own AGENT`, `use klav` (Klav Cloud's attested proxy, for invited accounts), or `use none`. Pair your own proxy first with `klav-proxy init`.
- Framework
- clap
klav proxy use <mode> <agent?> [flags]| Argument | Type | Description |
|---|---|---|
| mode | "own" | "klav" | "none" | `own`, `klav` or `none`. |
| agent? | string | The proxy's agent name or ID (with `own`). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Run a command with secrets in its environment (`klav.toml`).
- Framework
- clap
klav run <command> [flags]| Argument | Type | Description |
|---|---|---|
| command | string[] | The command and its arguments (after `--`). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --config | string | — | — | Project file (default: the nearest `klav.toml` from the current directory upwards). |
| --var, -e … | string[] | — | — | Extra variable `NAME=klav://…` (repeatable). |
| --env … | string[] | — | — | The environment to inject (ADR 0032 §5): the project's environment of that name in the vault, plus `[env.NAME]` of `klav.toml`. Without it: `default_env`, the flat `[env]`, or the only environment. A `NAME=REF` here is read as `-e`, as before environments. |
| --no-files | boolean | — | — | Do not write the `[files]` of `klav.toml`. |
| --trust | boolean | — | — | Use a `klav.toml` that is new or changed since you approved it without asking (it is pinned as approved). |
1 usage · in 1 flow
Sandboxes an issuer agent starts through the account's credential proxy (ADR 0036 §4): their API keys stay with the proxy (agent side).
- Framework
- clap
klav sandbox1 usage · in 1 flow
This agent's live sandboxes.
- Framework
- clap
klav sandbox ls [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). |
| --proxy-port | number | — | 8790 | Port of `klav-proxy serve` on this machine. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Start a sandbox and hand its one-time package to the command after `--` (in `KLAV_SANDBOX`) or to a new file (`--package-file`). The package is never printed.
- Framework
- clap
klav sandbox start <command?> [flags]| Argument | Type | Description |
|---|---|---|
| command? | string[] | The command that creates the sandbox, run with the package in `KLAV_SANDBOX` (after `--`). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --label | string | required | — | What the sandbox is for, as the person will see it (`chat-123`). |
| --profile … | string[] | required | — | A profile of the proxy the sandbox may use (repeat for more). |
| --ttl | number | — | — | How long it may live (`8h`, `90m`; default 8h, or this agent's limit if the person set a shorter one; never past that limit). |
| --package-file | string | — | — | Write the package to this new file (mode 0600) instead of running a command; for a program that passes it on and deletes the file. |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). |
| --proxy-port | number | — | 8790 | Port of `klav-proxy serve` on this machine. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
End one of this agent's sandboxes now, or all of them.
- Framework
- clap
klav sandbox stop <id?> [flags]| Argument | Type | Description |
|---|---|---|
| id? | string | The sandbox's ID (from `klav sandbox start` or `ls`). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --all | boolean | — | — | Every live sandbox of this agent. |
| --agent | string | — | — | Agent name (default: `$KLAV_AGENT` or the only one). |
| --proxy-port | number | — | 8790 | Port of `klav-proxy serve` on this machine. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Secret requests from agents: fulfill a missing secret in a hidden prompt or deny it without the value ever touching the agent (person side, ADR 0046).
- Framework
- clap
klav secret-request1 usage · in 1 flow
Deny a pending secret request with a signed decision.
- Framework
- clap
klav secret-request deny <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Secret request ID (or unique prefix). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Save the requested secret into your vault (hidden prompt on TTY or `--secret-stdin`) and sign the fulfillment decision.
- Framework
- clap
klav secret-request fulfill <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Secret request ID (or unique prefix). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --vault | string | — | — | Destination vault name or ID (create mode; overrides the proposal). |
| --project | string | — | — | Destination project name or ID (create mode; overrides the proposal). |
| --title | string | — | — | Item title override (create mode). |
| --field | string | — | — | Secret field name override (defaults to the proposal's field). |
| --url … | string[] | — | — | Confirmed login URL to save (create mode; repeatable). Agent-suggested login URLs are never saved unless confirmed explicitly (T234). |
| --confirm-suggested-urls | boolean | — | — | Explicitly confirm and save all agent-suggested URLs on a `login` item (T234). |
| --notes | string | — | — | Notes override (create mode). |
| --env-link | boolean | — | — | Apply the proposal's environment link, including a protected one (unchecked by default when the target is protected, T314). |
| --no-env-link | boolean | — | — | Do not link the environment variable the proposal suggests. |
| --env-environment | string | — | — | Environment item whose variable receives the reference (overrides the proposal and enables the link). |
| --env-variable | string | — | — | Environment variable that receives the reference (overrides the proposal and enables the link). |
| --allow-duplicate | boolean | — | — | Allow creating an item whose title matches an existing live item in the same project. |
| --grant-proxy | boolean | — | — | Also grant the proposed `klav-proxy` profile (unchecked by default; requires Touch ID or the master password, T239). |
| --words | string | — | — | The proxy's 6 pairing words (only for the proxy's first credential). |
| --proxy-profile | string | — | — | The profile name to grant under, in place of the proposal's. A sandbox's request never takes a name the proxy already has: its default is the free `NAME-2` the card shows. |
| --attach-sandbox | boolean | — | — | Also let the sandbox that asked use the new profile now, until it ends (ADR 0053 §5; off by default). Only with --grant-proxy, only for a live sandbox and a base-URL profile. |
| --every-device-is-updated | boolean | — | — | Confirm every device runs a Klav with per-item grants (only for the account's first per-item grant). |
| --secret-stdin | boolean | — | — | Read the secret value from stdin (after the master password line if `--password-stdin` is set) instead of prompting on the TTY. |
| --yes, -y | boolean | — | — | Do not ask for `[y/N]` confirmation before prompting for the value. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
List pending secret requests (or `--all` for recent decided/expired).
- Framework
- clap
klav secret-request list [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --all | boolean | — | — | Include fulfilled, denied and expired requests. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Show the decrypted proposal, setup link warnings and proxy preview of one secret request.
- Framework
- clap
klav secret-request show <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Secret request ID (or unique prefix). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
"Don't let ISSUER's sandboxes ask again": turn off the secret requests of the issuer whose sandbox raised this request (ADR 0053 §3.3). Asks for Touch ID.
- Framework
- clap
klav secret-request stop-issuer <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Secret request ID (or unique prefix). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
"Stop this sandbox": revoke the sandbox that raised a secret request (ADR 0053 §3.3), as `klav sandbox revoke` does.
- Framework
- clap
klav secret-request stop-sandbox <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Secret request ID (or unique prefix). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
Create an account on a server and set up this device.
- Framework
- clap
klav signup [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --server | string | — | — | Your own server's URL (https://…; http:// only for localhost). Default: https://api.klav.dev (klav.dev). [env: KLAV_SERVER] |
| string | required | — | Account e-mail. | |
| --device-name | string | — | — | Name of this device (default: the host name). |
| --emergency-kit | string | — | — | Write the emergency kit (with the Secret Key) to this new file (mode 0600) instead of showing it on the terminal. |
| --invite | InviteCode | — | — | Invite code, for a server that takes new accounts by invite. Else it is asked after the e-mail. It stays in the shell history and in `ps` until used: prefer the prompt, or KLAV_INVITE. [env: KLAV_INVITE] |
1 usage · in 1 flow
The Klav skill in the agent clients' skill folders: install it and keep it up to date without overwriting a copy someone edited.
- Framework
- clap
klav skill1 usage · in 1 flow
Install the Klav skills (default: in the folders of the clients installed here).
- Framework
- clap
klav skill install [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --client … | ClientArg[] | — | — | The folders of this client (repeatable). |
| --dir … | string[] | — | — | A skills folder: skills go in `<DIR>/<name>/SKILL.md` (repeatable). |
| --skill … | string[] | — | — | Only this bundled skill (repeatable; default: all bundled skills). |
| --dry-run | boolean | — | — | Show what would change and change nothing. |
| --replace | boolean | — | — | Replace a copy that is not Klav's, or that someone edited: it is kept next to it as `SKILL.md.mine-<time>`. |
| --adopt | boolean | — | — | Keep a copy Klav did not write as Klav's, if it is identical to a skill Klav published. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Print a skill this `klav` carries (default: `klav`).
- Framework
- clap
klav skill show <name?>| Argument | Type | Description |
|---|---|---|
| name? | string | Skill name (`klav`, `klav-migrate`, `klav-setup`; default: `klav`). |
1 usage · in 1 flow
The skills this `klav` carries, and every copy found in the clients' folders: up to date, older, edited, removed or not Klav's.
- Framework
- clap
klav skill status [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Remove Klav's copies of its skills.
- Framework
- clap
klav skill uninstall [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --client … | ClientArg[] | — | — | The folders of this client (repeatable). |
| --dir … | string[] | — | — | A skills folder: skills go in `<DIR>/<name>/SKILL.md` (repeatable). |
| --skill … | string[] | — | — | Only this bundled skill (repeatable; default: all bundled skills). |
| --force | boolean | — | — | Also remove a copy someone edited. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Replace Klav's unchanged copies that are older than this `klav`'s skills, and install newly bundled companion skills into active Klav skill folders. Edited and removed copies are never overwritten or restored.
- Framework
- clap
klav skill update [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --keep-mine | boolean | — | — | Keep the edited copies as they are, and stop pointing them out until there is a newer skill. |
| --dir … | string[] | — | — | Only the copies in this skills folder (repeatable). |
| --skill … | string[] | — | — | Only this bundled skill (repeatable; default: all bundled skills). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Account, device and daemon status (no password needed).
- Framework
- clap
klav status [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Pull changes from the server.
- Framework
- clap
klav sync [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --reset-cache | boolean | — | — | Forget this device's copy of the vaults and its rollback marks, and download everything again. For when the server was restored from a backup you trust (every sync is refused as a rollback), or to drop vaults the server no longer lists. Revoked agents and signed vault keys are kept. |
| --yes | boolean | — | — | Do not ask for confirmation. |
1 usage · in 1 flow
Task requests of agents: several items and permissions for one job, approved with one card (person side, ADR 0021).
- Framework
- clap
klav task1 usage · in 1 flow
Approve a task as the card proposes it, minus what you leave out (Touch ID or the master password).
- Framework
- clap
klav task approve <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Task ID (or its first characters). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --without … | string[] | — | — | Leave out an item, or one of its permissions: `REF` or `REF:permission` (REF: `klav://…`, the title or the item ID). Repeatable. |
| --for | number | — | — | End it sooner than the agent asked (e.g. `1h`; at least `5m`). |
| --yes, -y | boolean | — | — | Do not ask for confirmation after showing the card. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Deny a task.
- Framework
- clap
klav task deny <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Task ID (or its first characters). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
End a running task now («End task»).
- Framework
- clap
klav task end <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Task ID (or its first characters). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Pending and running tasks (`--all`: also the recent ended ones).
- Framework
- clap
klav task list [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --all | boolean | — | — | Include denied, expired and ended tasks. |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
The card of a task: what Klav proposes (pending) or what was approved.
- Framework
- clap
klav task show <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | Task ID (or its first characters). |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Current one-time password of an item.
- Framework
- clap
klav totp <item> [flags]| Argument | Type | Description |
|---|---|---|
| item | string | Item reference, ID or title. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --field | string | — | — | TOTP field (default: the first one). |
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
Unlock (keeps `klavd` unlocked; Touch ID when enrolled).
- Framework
- clap
klav unlock [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --password | boolean | — | — | Use the master password even if Touch ID is enrolled. |
| --idle-lock | number | — | 15m | When `klavd` has to be started: lock after this long without use. |
1 usage · in 1 flow
Vaults.
- Framework
- clap
klav vault1 usage · in 1 flow
Create a vault (with a "General" project).
- Framework
- clap
klav vault create <name>| Argument | Type | Description |
|---|---|---|
| name | string | Name. |
1 usage · in 1 flow
List vaults.
- Framework
- clap
klav vault ls [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable JSON output. |
1 usage · in 1 flow
klav-forward
10 commands
Lets this sandbox use Klav's credential proxy: your API keys stay at the proxy, never in the sandbox.
- Framework
- clap
klav-forward1 usage · in 1 flow
Release this sandbox at the proxy and stop its forwarder, freeing the port. Exit 0 when nothing runs here too. A new forwarder needs a new package from `klav sandbox start`.
- Framework
- clap
klav-forward down [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --state-dir | string | — | — | The state directory of `up`. |
| --json | boolean | — | — | Print the result as JSON. |
| --if-other-package | boolean | — | — | Stop the forwarder here only if it belongs to another package than the one in KLAV_SANDBOX (the first line of a sandbox's setup script). One for this package is left alone, and so is any when KLAV_SANDBOX or state.json cannot be read: exit 0, and `up` says what it finds. |
1 usage · in 1 flow
Print the shell lines with the local URLs (no secrets).
- Framework
- clap
klav-forward env [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --state-dir | string | — | — | The state directory of `up`. |
| --json | boolean | — | — | Print the URLs as one line of JSON instead. |
1 usage · in 1 flow
Klav's MCP server for this sandbox (stdio), registered as `klav-sandbox` by the setup lines of `klav sandbox start`. Its `sandbox_info` tool lists what this sandbox may use, and `request_secret` and `get_secret_request` ask the person for a missing secret, which never reaches the sandbox. It holds no key and asks the running forwarder; stdout carries only MCP messages.
- Framework
- clap
klav-forward mcp [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --state-dir | string | — | — | The state directory of `up`. |
1 usage · in 1 flow
Run COMMAND with mode (b)'s HTTPS_PROXY and the sandbox's CA (ADR 0052), for tools that ignore a base URL. Only COMMAND gets them: nothing is exported shell-wide, and HTTP_PROXY is never set.
- Framework
- clap
klav-forward run <command?> [flags]| Argument | Type | Description |
|---|---|---|
| command? | string[] | The command and its arguments. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --state-dir | string | — | — | The state directory of `up`. |
| --profile | string | — | — | Check that PROFILE is one of this sandbox's profiles first. |
| --shim | string | — | — | The shim of this command (written by `up`): runs the real one, found in PATH without the shims' directory. (hidden) |
1 usage · in 1 flow
This sandbox's secret requests (from `request_secret` of `klav-forward mcp`).
- Framework
- clap
klav-forward secret-request1 usage · in 1 flow
Wait for the person to fulfill or deny one of this sandbox's secret requests. Exit codes: 0 fulfilled, 4 still pending, 5 denied, 6 expired, 7 agents paused, 1 anything else. Never prints a value.
- Framework
- clap
klav-forward secret-request wait <id> [flags]| Argument | Type | Description |
|---|---|---|
| id | string | The request_id `request_secret` gave. |
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --timeout | number | — | 10m | How long to wait (`90`, `30s`, `10m`, `1h`). |
| --state-dir | string | — | — | The state directory of `up`. |
| --json | boolean | — | — | Print the outcome as one line of JSON. |
1 usage · in 1 flow
The forwarder itself, started by `up` (the package comes on stdin).
- Framework
- clap
klav-forward serve [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --port | number | required | — | |
| --state-dir | string | required | — | |
| --claim-wait-secs | number | required | — | |
| --keep-alive-secs | number | — | forward::KEEP_ALIVE.as_secs() | |
| --mode-b-port | number | — | 8791 | |
| --pg-port | number | — | 15432 |
1 usage · in 1 flow
Whether this sandbox can still use the proxy. Exit codes: 0 live, 5 revoked, 6 expired, 7 agents paused, 1 anything else.
- Framework
- clap
klav-forward status [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --state-dir | string | — | — | The state directory of `up`. |
| --json | boolean | — | — | Print the result as JSON. |
1 usage · in 1 flow
Claim the sandbox in KLAV_SANDBOX (from `klav sandbox start`) and forward http://127.0.0.1:PORT/<profile>/… to the proxy.
- Framework
- clap
klav-forward up [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --daemon | boolean | — | — | Keep running in the background after the claim (for a setup script). |
| --port | number | — | 8790 | The local port. |
| --mode-b-port | number | — | 8791 | The local port of mode (b), the HTTPS_PROXY that `klav-forward run` and the shims use, when the proxy names hosts for it. |
| --pg-port | number | — | 15432 | The first local port of the Postgres listeners (ADR 0052), one per Postgres profile in name order, when the sandbox has any. |
| --state-dir | string | — | — | Where the state, the log and the fallback shell lines go (default: $KLAV_FORWARD_HOME or ~/.klav-forward). |
| --profile-file | string | — | /etc/profile.d/klav-forward.sh | Where the shell lines with the local URLs go. |
| --no-skill | boolean | — | — | Do not install the Klav skill for this sandbox's user. |
| --claim-wait-secs | number | — | 120 | How long to keep trying while the proxy or Klav's server does not answer. (hidden) |
| --keep-alive-secs | number | — | forward::KEEP_ALIVE.as_secs() | How often the forwarder asks the proxy whether its sandbox lives. (hidden) |
| --json | boolean | — | — | Print the result as JSON. |
1 usage · in 1 flow
klav-nitro-parent
1 command
The command line of `klav-nitro-parent`.
- Framework
- clap
klav-nitro-parent [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --channel-listen | string | — | 0.0.0.0:443 | TCP address for sandbox channels (`a<agent_id>.proxy.klav.dev`). |
| --channel-enclave | Endpoint | required | — | The enclave's channel port (`vsock:CID:PORT`, or `tcp:IP:PORT`). |
| --api-listen | string | — | 0.0.0.0:8443 | TCP address for the public API (`/v1/manifest`, `/v1/attest`, `/v1/enroll`, `/v1/status`, the hand-off). |
| --api-enclave | Endpoint | required | — | The enclave's API port. |
| --egress-listen | Endpoint | required | — | Where the enclave asks for egress (`vsock:4294967295:PORT` listens on every CID). |
| --health-listen | string | — | 0.0.0.0:8080 | TCP address of the load balancer's health check. |
| --allow-port … | number[] | — | — | Another egress port besides 443 (repeatable). |
| --per-ip-per-minute | number | — | 600 | New inbound connections per source IP per minute. |
1 usage · in 1 flow
klav-proxy
5 commands
Klav's credential proxy: puts the credentials you grant it into HTTP requests, without handing them to the agent that asks
- Framework
- clap
klav-proxy [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --home | string | — | — | The proxy's data directory (its registration and, by default, its key). Default: KLAV_HOME, else Klav's usual directory. (global) |
| --name | string | — | klav-proxy | The agent name the proxy registered with. (global) |
1 usage · in 1 flow
Klav Cloud's hosted proxy inside an AWS Nitro Enclave (ADR 0051): opens /dev/nsm, listens on vsock, and starts a new seed or joins a live peer through the attested hand-off. Only inside an enclave.
- Framework
- clap
klav-proxy enclave [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --bootstrap | "genesis" | "join" | required | — | How the enclave gets its seed. [env: KLAV_ENCLAVE_BOOTSTRAP] |
| --join | string | — | — | With `--bootstrap join`: the live holder's hand-off base URL, as this enclave reaches it through the parent's egress. [env: KLAV_ENCLAVE_JOIN] |
| --join-attempts | number | — | 60 | With `--bootstrap join`: how many times to try before giving up (every 5 s). [env: KLAV_ENCLAVE_JOIN_ATTEMPTS] |
| --manifest-seq | number | — | — | With `--bootstrap genesis`: the `seq` of the published manifest to serve. Without it, the enclave waits for one on `POST /v1/manifest`. [env: KLAV_ENCLAVE_MANIFEST_SEQ] |
| --release-key … | string[] | required | — | The release authority's Ed25519 public key the image expects (64 hex characters; repeatable, or comma-separated). The enclave starts only if this build pins every one of them. [env: KLAV_ENCLAVE_RELEASE_KEYS] |
| --channel | Endpoint | — | vsock:4294967295:5000 | Where sandboxes' channels arrive (TLS, routed by SNI). [env: KLAV_ENCLAVE_CHANNEL] |
| --api | Endpoint | — | vsock:4294967295:5001 | Where the public API is served. [env: KLAV_ENCLAVE_API] |
| --peer | Endpoint | — | — | Where other enclaves ask for the hand-off. Without it, the hand-off is served on the API. [env: KLAV_ENCLAVE_PEER] |
| --egress | Endpoint | — | — | The parent's egress port (`vsock:3:PORT`). Without it, the enclave connects directly: only for a run outside an enclave. [env: KLAV_ENCLAVE_EGRESS] |
| --server | string | — | https://api.klav.dev | The Klav server every account lives on. [env: KLAV_ENCLAVE_SERVER] |
| --endpoint | string | — | proxy.klav.dev | The proxy's DNS name: each account's channel is `a<agent_id>.<this>`. [env: KLAV_ENCLAVE_ENDPOINT] |
| --manifests | string | — | https://raw.githubusercontent.com/OmarAlex24/klav/main/deploy/nitro/manifests/ | Where the signed manifests are published (a URL ending in `/`). [env: KLAV_ENCLAVE_MANIFESTS] |
1 usage · in 1 flow
Registers the proxy with the account and shows the 6 words to compare.
- Framework
- clap
klav-proxy init [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| string | required | — | E-mail of the Klav account. | |
| --server | string | — | | Klav server (default: Klav's). |
| --key-store | "file" | "keychain" | — | Store::File | Where to keep the proxy's key. |
| --key-file | string | — | — | The key file (mode 0600), instead of <home>/agents/<name>.key. |
| --json | boolean | — | — | Machine-readable output. |
| --require-memory-lock | boolean | — | — | Refuse to start when the memory can't be locked out of swap (also KLAV_PROXY_REQUIRE_MEMORY_LOCK=1). |
| --no-memory-lock | boolean | — | — | Don't lock the memory out of swap (also KLAV_PROXY_MEMORY_LOCK=off). Core dumps stay off. |
2 usages · in 1 flow
Serves mode (a) on 127.0.0.1: http://127.0.0.1:PORT/<profile>/<path>.
- Framework
- clap
klav-proxy serve [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --port | number | — | 8790 | Port on 127.0.0.1 (the address is always loopback). |
| --channel | string | — | — | Also listen for sandboxes' forwarders on this address (`HOST:PORT`, such as a Tailscale address): TLS 1.3 with this proxy's key, which the sandbox package pins. The person's `klav proxy issuer add --url tls://…` must name it. |
| --max-body | number | — | DEFAULT_MAX_BODY | Largest request body, in bytes. |
| --timeout | number | — | DEFAULT_REQUEST_TIMEOUT.as_secs() | Longest call to a provider, in seconds, answer included; for a stream (`text/event-stream`), its headers only: then it may stay open 15 minutes, and 2 minutes without a chunk. |
| --no-local-calls | boolean | — | — | Refuse every profile call on 127.0.0.1 (`403 klav_not_allowed`): only sandboxes, through `--channel`, reach the credentials. The issuers' signed API keeps working. |
| --control-socket | string | — | — | The local socket for the Klav app and `klav proxy local` on this machine (this user only), instead of <home>/agents/<name>.sock. |
| --no-control-socket | boolean | — | — | No local socket. |
| --if-registered | boolean | — | — | Exit 0 without serving when no proxy is registered under this name, another klav-proxy already answers on its local socket, or the proxy is pending, revoked or its account is being deleted (the Mac app's LaunchAgent). |
| --require-memory-lock | boolean | — | — | Refuse to start when the memory can't be locked out of swap (also KLAV_PROXY_REQUIRE_MEMORY_LOCK=1). |
| --no-memory-lock | boolean | — | — | Don't lock the memory out of swap (also KLAV_PROXY_MEMORY_LOCK=off). Core dumps stay off. |
2 usages · in 1 flow
Shows the proxy's state and the profiles it holds (never a value).
- Framework
- clap
klav-proxy status [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --json | boolean | — | — | Machine-readable output. |
klavd
1 command
Keeps your Klav account unlocked in memory for `klav` and locks it after inactivity or when the machine sleeps.
- Framework
- clap
klavd [flags]| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --idle-lock | number | — | 15m | Lock after this long without use (`90s`, `15m`, `1h`). |
| --no-touch-id | boolean | — | — | Do not offer Touch ID (also `KLAV_NO_TOUCH_ID=1`). [env: KLAV_NO_TOUCH_ID] |
| --if-not-running | boolean | — | — | Exit successfully if a `klavd` already answers for this home (the Mac app's LaunchAgent: another one is not an error to retry). |