kvendra
·MENU

·SECTION 09 — CLI

CLI.

kvendra — the capability-based MCP broker and a zero-knowledge vault add-on. Built in Rust, Apache-2.0, cross-platform (macOS · Linux · Windows).

cargo install kvendra

kvendra --version

VIEW ON GITHUB
§ 01 — WHY THE CLI ·THE SECURITY ANCHOR

The CLI is the piece of Kvendra that holds the secrets the LLM must never see. Strongly recommended for any non-trivial use of the platform, mandatory by policy for Team and Enterprise. Three reasons:

  1. Capability-based MCP broker. Seven typed primitives plus an escape hatch. Every privileged action goes through the broker; the LLM declares intent, not credentials.
  2. Zero-knowledge vault. Argon2id key derivation, AES-256-GCM encryption, client-side. Your master password never leaves the machine, the platform never sees plaintext.
  3. Tamper-evident audit log. Every primitive call appends to an HMAC-chained log (kvendra/audit-hmac/v1). Deleted or rewritten entries fail verification immediately.
·STATUS
v0.4.x is the current release line on crates.io; the namespace is reserved ahead of the Alpha 0.1 MVP. The README on GitHub is the source of truth for what's wired today.
§ 02 — INSTALL ·THREE PATHS

Path A — cargo install (recommended)

Works on macOS, Linux and Windows (msvc). Requires a working Rust toolchain.

cargo install kvendra

kvendra --version

Path B — pre-built binaries

Download the unsigned binary for your platform from the latest GitHub release:

  • macOS — Gatekeeper may warn "unidentified developer". Bypass with xattr -d com.apple.quarantine kvendra or System Settings → Privacy & Security → "Open anyway".
  • Windows — SmartScreen may flag "Unknown publisher". Click "More info" → "Run anyway".
  • Linuxchmod +x kvendra && ./kvendra --version.

Path C — clone & build from source

The audit-friendly path: clone the repo, build the binary yourself, install into your ~/.cargo/bin/. Useful for regulated environments, locked-down corporate networks, or when you want to read the source before running it. Requires a Rust toolchain.

git clone https://github.com/KvendraAI/kvendra-cli.git

cd kvendra-cli && cargo build --release

cargo install --path .

kvendra --version

Pin to a release tag for reproducible builds — git checkout v0.4.1 before cargo build.

·SIGNING
Binaries ship unsigned in v0.1.0. Apple notarization and a Homebrew formula land in v0.2.0; Windows Authenticode and Linux GPG follow in v0.3.0+. Full install reference: docs/install.md.
§ 03 — COMMANDS ·VAULT · SESSION · MCP · AUDIT

·VAULT

·kvendra init

init

Initialise a fresh local vault under ~/.kvendra/. Derives the master key with Argon2id and writes the encrypted envelope. Honours KVENDRA_INIT_PASSWORD + KVENDRA_INIT_CONFIRM_CODE for unattended setup.

·kvendra recover

recover

Recover a vault from a 12-word BIP-39 mnemonic and rotate to a new master password. Env vars: KVENDRA_RECOVERY_MNEMONIC, KVENDRA_NEW_PASSWORD.

·SESSION

·kvendra unlock

unlock

Unlock the vault in your own terminal. Derives the master key and writes a machine-bound session blob to ~/.kvendra/sessions/active.blob with TTL + HMAC sidecar. Default TTL 4 hours. Honours KVENDRA_PASSWORD.

·kvendra unlock --extend

unlock --extend

Refresh the session TTL without re-typing the password. Same pattern as aws sso login, op signin.

·kvendra lock

lock

Terminate the active session and delete the blob. Use it when you're done for the day or before handing the machine to anyone.

·kvendra session status

session status

Inspect the active session — TTL, expiry, fingerprint of the machine bind. Read-only.

·MCP

·kvendra mcp serve

mcp serve

Serve the MCP broker over stdio for Claude Code, Cursor, Continue and other MCP clients. Reads the session blob to install the derived key — the master password never enters the LLM's context. Destructive ops gated by a consent dialog (modal on macOS, native on Windows/Linux). Honours KVENDRA_MCP_PASSWORD for IDE/desktop bootstrap.

·AUDIT

·kvendra audit --verify

audit --verify

Verify the HMAC chain of the local audit log (kvendra/audit-hmac/v1) end-to-end. Tampered, deleted or reordered entries fail the chain. Accepts --password-stdin for scripts (no env var pollution).

·NOTE
KVENDRA_HOME overrides the default ~/.kvendra/ location for testing and sandboxing. Full command reference and edge cases on the README.
§ 04 — MCP BROKER ·CAPABILITY-BASED

The broker exposes seven typed primitives plus an escape hatch. Each primitive is a capability the LLM can request; the CLI executes it against your local credentials, returns the typed result, and appends a signed row to the audit log. The LLM never receives the underlying secret.

  1. Transport separation. When invoked as kvendra in your shell, the CLI assumes a TTY and prompts. When invoked under MCP stdio by an IDE client, every destructive op (write / push / destroy in the catalog) goes through an OS consent dialog — no /dev/tty interaction, mitigating the TTY-hijack pattern documented in PAT-KVD-007.
  2. Allowlist signed with HMAC. The catalog lives in ~/.kvendra/allowlist.yaml, signed with a sub-key (kvendra/allowlist-hmac/v1). Edits outside the CLI fail signature verification.
  3. RAM-only password cache. Default master_password_cache = "ram-only" keeps the master key in process memory after kvendra unlock only. No disk persistence, no swap exposure.
·PLANNED
Touch-ID-protected MCP password storage (every read gated by the OS biometric prompt) lands in v0.2.0 alongside the Apple Developer ID signature. Tracked as ROAD-KVD-CLI-002. v0.1.0 ships unsigned and uses the consent-modal path on all platforms.
§ 05 — SESSION MODEL ·UNLOCK / LOCK · TTL

kvendra unlock runs in your own terminal — never inside an MCP client like Claude Code or Cursor. It derives the master key with Argon2id and writes a session blob to ~/.kvendra/sessions/active.blob encrypted with a machine-bound wrap key (hostname + uid + canonical home path). Every subsequent kvendra mcp serve subprocess reads the blob to install the derived key — the password never enters the MCP client's transcript or the LLM's context.

TTL configuration

The [session] block of ~/.kvendra/config.toml controls session length:

[session]
default_ttl_seconds = 14400   # 4h (default)
max_ttl_seconds     = 86400   # 24h (default; hard cap accepted by --ttl)
renew_on_activity   = false   # absolute TTL by default

Hard ceiling: 7 days (MAX_CONFIGURABLE_TTL_SECONDS). Anything larger is rejected.

Anti-captured-env defence

kvendra unlock refuses to run inside an MCP client subprocess. Three layers, evaluated in order (PAT-KVD-CLI-008):

  1. /dev/tty (POSIX) / CONIN$ (Windows). Direct open. A captured subprocess has no controlling terminal, so this fails with ENXIO and the command stops before the password prompt.
  2. Triple isatty + foreground process group match. Defence in depth — confirms stdin/stdout/stderr are real TTYs and the process is in the foreground.
  3. Parent ancestry walk. Flags known MCP client binaries in the error message so you know exactly why the command refused.

If you ever see kvendra unlock: no controlling terminal detected. inside an IDE, that's the guard doing its job. Open a real terminal and run kvendra unlock there instead.

§ 06 — SECURITY · v0.1.0 ·STRUCTURAL FEATURES

What v0.1.0 already enforces — all structural, all cross-platform, all under 284+ tests in multi-OS CI (Ubuntu / macOS / Windows):

  1. Capability-based MCP broker — 7 primitives plus an escape hatch.
  2. Zero-knowledge vault — Argon2id key derivation, AES-256-GCM encryption.
  3. Allowlist YAML signed with HMAC sub-key (kvendra/allowlist-hmac/v1).
  4. Audit log HMAC-chained with end-to-end verification (kvendra/audit-hmac/v1).
  5. Transport separation: CLI assumes TTY, MCP requires explicit approval per destructive op.
  6. Catalog destructive ops behind a consent gate (modal on macOS, native dialog on Windows / Linux).

Not yet, but planned

  • Touch-ID-protected MCP password storage — requires a signed binary. v0.2.0.
  • Apple notarization + Homebrew formula — v0.2.0.
  • Windows Authenticode + Linux GPG signing — v0.3.0+.
·THREAT MODEL
The full security model and trust narrative live in docs/security.md. The threat model (what we mitigate, what's out of scope) is at THREAT-MODEL.md.
§ 07 — LICENSE & SCOPE ·APACHE-2.0

The CLI ships under Apache-2.0. Source at github.com/KvendraAI/kvendra-cli. Fork it, audit it, build your own. The licence is permissive — internal modifications carry no obligations beyond preserving the copyright notice.

What this binary is — and isn't

The CLI is the capability broker and the local vault. It holds your secrets, runs privileged primitives on the LLM's behalf, and writes a tamper-evident audit log. It is not the KB engine (that's the Platform), and it is not the agent runtime (that's Claude Code with Kvendra Skills).

For most engineers the right stack is: install the CLI vault, self-host the Platform on docker, install Kvendra Skills in Claude Code. Three components, three licences (Apache · AGPL · Apache), one coherent stack.

·SECURITY DISCLOSURES
Read SECURITY.md before reporting. Email security@kvendra.ai for coordinated disclosure — please don't open a public issue for security findings.