/** Declarative help for the `assistant credentials` command. */ import type { CliCommandHelp } from "../lib/cli-command-help.js"; export const credentialsHelp: CliCommandHelp = { name: "credentials", description: "Manage credentials in the encrypted vault (API keys, tokens, passwords)", options: [ { flags: "--json", description: "Machine-readable compact JSON output", }, ], helpText: ` Credentials are identified by --service and --field flags, matching the storage convention used internally (credential/{service}/{field}): --service twilio --field account_sid Twilio account SID --service twilio --field auth_token Twilio auth token --service telegram --field bot_token Telegram bot token --service slack_channel --field bot_token Slack channel bot token --service github --field token GitHub personal access token Secrets are stored in AES-256-GCM encrypted storage. Metadata (policy, timestamps, labels) is tracked separately and never contains secret values. Examples: $ assistant credentials list $ assistant credentials list --search twilio $ assistant credentials set --service twilio --field account_sid AC1234567890 $ assistant credentials inspect --service twilio --field account_sid $ assistant credentials reveal --service twilio --field account_sid $ assistant credentials delete --service twilio --field auth_token`, subcommands: [ { name: "list", description: "List all stored credentials with metadata and masked values", options: [ { flags: "--search ", description: "Filter credentials by substring match on service, field, label, or description", }, ], helpText: ` Lists all credentials in the vault. Each entry includes the same fields as "inspect" — scrubbed value, timestamps, policy, and metadata. The --search flag filters results by case-insensitive substring match against the credential's service name, field name, label, or description. For example, --search twilio matches twilio:account_sid, twilio:auth_token, and twilio:phone_number. Returns an array of credential objects. Empty array if no credentials exist or none match the search query. Examples: $ assistant credentials list $ assistant credentials list --search twilio $ assistant credentials list --search bot_token $ assistant credentials list --json`, }, { name: "status", description: "Show the active credential backend and its configuration", helpText: ` Shows which credential storage backend this process is using and backend-specific path or connection details. Run this to diagnose credential lookup mismatches — for example, when the CLI and the daemon are reading from different stores. Backend types: encrypted-store Direct file read from keys.enc (standalone CLI, no daemon) ces-rpc Delegates to the running CES process via stdio RPC (daemon) ces-http Delegates to CES sidecar over HTTP (containerized/Docker mode) Also shows the CREDENTIAL_SECURITY_DIR, GATEWAY_SECURITY_DIR, and VELLUM_WORKSPACE_DIR env vars so you can confirm which instance directory this process is scoped to. Examples: $ assistant credentials status $ assistant credentials status --json`, }, { name: "set", args: "", description: "Store a secret and create or update its metadata", options: [ { flags: "--service ", description: "Service namespace (e.g. google)", required: true, }, { flags: "--field ", description: "Field name (e.g. client_secret)", required: true, }, { flags: "--label