Docs/ Vouch CLI Reference

Vouch CLI Reference

Complete command reference for the Vouch CLI

This page documents all available Vouch CLI commands. For installation instructions, see Getting Started.


Global flags

These flags are available on all commands.

FlagDescription
--server <URL>Vouch server URL (also settable via VOUCH_SERVER environment variable). Saved locally after enrollment.
-v, --verboseEnable debug logging
--color <MODE>Control color output: auto (default), always, or never

Configuration file

The Vouch CLI stores its configuration at ~/.vouch/config.json. This file is created automatically during enrollment and contains the server URL and session state.

FieldDescription
server_urlVouch server URL
tokenCurrent session token (set by vouch login)

Precedence: CLI flags (--server) override the VOUCH_SERVER environment variable, which overrides the config file value.

On Unix, the config file must have restrictive permissions (0600). The CLI rejects files that are group- or world-readable.


Authentication

vouch enroll

Register your YubiKey with a Vouch server and link it to your identity.

vouch enroll --server <SERVER_URL>

You only need to enroll once per YubiKey.

vouch login

Authenticate with your YubiKey and start an 8-hour session.

vouch login [--timeout <SECONDS>]
FlagDescription
--timeoutTimeout in seconds for YubiKey detection (default: 60, use 0 for no timeout)

After login, all credential helpers use the session automatically. Run this once at the start of each workday.

vouch logout

End the current session and clear all cached credentials.

vouch logout

vouch status

Display the current session status, including remaining session time and active integrations (SSH, AWS, SSM, Git, Docker, Cargo).

vouch status [--format <FORMAT>]
FlagDescription
--formatOutput format: human (default), json, or shell. The shell format outputs key=value pairs suitable for eval.

Setup

Setup commands configure credential helpers for each integration. Run these once per machine.

vouch setup aws

Configure the AWS credential process for an IAM role.

vouch setup aws --role <ROLE_ARN> [--profile <PROFILE>] [--region <REGION>]
FlagDescription
--roleThe IAM role ARN to assume (required)
--profileAWS profile name to configure (default: vouch; additional profiles auto-name as vouch-2, vouch-3, etc.)
--regionAWS region to set in the profile

See AWS Integration for full details.

vouch setup ssh

Configure the SSH client to use the Vouch agent for certificate authentication.

vouch setup ssh [--hosts <PATTERN>]
FlagDescription
--hostsHost patterns to trust with this CA (e.g., *.example.com). If specified, adds an entry to ~/.ssh/known_hosts.

See SSH Certificates for full details.

vouch setup github

Configure Git to use Vouch as the credential helper for GitHub.

vouch setup github [--host <HOST>] [--configure]
FlagDescription
--hostGitHub host to configure (default: github.com)
--configureApply the configuration automatically (without this flag, the command only prints the configuration)

See GitHub Integration for full details.

vouch setup docker

Configure Docker to use Vouch as the credential helper for container registries.

vouch setup docker [--configure] [REGISTRIES...]
FlagDescription
--configureApply the configuration automatically (without this flag, the command only prints the configuration)
REGISTRIESContainer registry URLs to configure (e.g., ghcr.io)

See Docker Registries for full details.

vouch setup cargo

Configure Cargo to use Vouch as the credential provider for private registries.

vouch setup cargo [--registry <NAME>] [--configure]
FlagDescription
--registryName of the Cargo registry to configure
--configureApply the configuration automatically

See Cargo Integration for full details.

vouch setup codeartifact

Configure a package manager for an AWS CodeArtifact repository.

vouch setup codeartifact --tool <TOOL> --repository <REPO> [--domain <DOMAIN>] [--domain-owner <ACCOUNT_ID>] [--region <REGION>] [--profile <PROFILE>]
FlagDescription
--toolPackage manager to configure: cargo, pip, or npm (required)
--repositoryThe AWS CodeArtifact repository name (required)
--domainThe AWS CodeArtifact domain name (optional if a profile is configured)
--domain-ownerAWS account ID that owns the domain (optional if a profile is configured)
--regionAWS region (optional if a profile is configured)
--profileNamed AWS CodeArtifact profile to use or create (stores domain/owner/region for reuse)

See AWS CodeArtifact for full details.

vouch setup codecommit

Configure Git to use Vouch as the credential helper for AWS CodeCommit.

vouch setup codecommit [--region <REGION>] [--profile <PROFILE>] [--configure]
FlagDescription
--regionAWS region (default: wildcard matching all regions)
--profileAWS profile to use (defaults to auto-detected vouch profile)
--configureApply the configuration automatically (without this flag, the command only prints the configuration)

See AWS CodeCommit for full details.

vouch setup eks

Configure kubectl to use Vouch for EKS cluster authentication.

vouch setup eks --cluster <CLUSTER_NAME> [--region <REGION>] [--profile <PROFILE>] [--kubeconfig <PATH>]
FlagDescription
--clusterThe EKS cluster name (required)
--regionAWS region (auto-detected from AWS profile or environment if not specified)
--profileAWS profile to use (defaults to auto-detected vouch profile)
--kubeconfigPath to kubeconfig file (defaults to ~/.kube/config)

See Amazon EKS for full details.

vouch setup ssm

Configure SSH to use AWS Systems Manager Session Manager as a proxy for connections to EC2 and managed instances.

vouch setup ssm [--profile <PROFILE>] [--region <REGION>] [--hosts <HOSTS>] [--force]
FlagDescription
--profileAWS profile to use (defaults to auto-detected vouch profile)
--regionAWS region to use in the ProxyCommand
--hostsHost patterns to match (default: i-* mi-*)
--forceOverwrite any existing SSM configuration in ~/.ssh/config

See AWS Systems Manager for full details.


Credentials

Credential commands obtain service-specific credentials from your active session. These are typically called automatically by credential helpers, but can be run manually for debugging.

vouch credential aws

Obtain temporary AWS STS credentials.

vouch credential aws --role <ROLE_ARN>
FlagDescription
--roleThe IAM role ARN to assume (required)

vouch credential ssh

Obtain an SSH certificate from the Vouch server.

vouch credential ssh [--key <PATH>]
FlagDescription
--keyPath to SSH private key (default: ~/.ssh/id_ed25519_vouch)

vouch credential codeartifact

Obtain an AWS CodeArtifact authorization token.

vouch credential codeartifact [--domain <DOMAIN>] [--domain-owner <ACCOUNT_ID>] [--region <REGION>] [--profile <PROFILE>]
FlagDescription
--domainThe AWS CodeArtifact domain name (optional if a profile is configured)
--domain-ownerAWS account ID that owns the domain (optional if a profile is configured)
--regionAWS region (optional if a profile is configured)
--profileNamed AWS CodeArtifact profile to use

vouch credential rds

Generate an RDS IAM authentication token for database connections. The token is valid for 15 minutes.

vouch credential rds --hostname <HOSTNAME> --username <USERNAME> [--port <PORT>] [--region <REGION>] [--role <ROLE>]
FlagDescription
--hostnameRDS instance hostname (required)
--usernameDatabase username (required)
--portDatabase port (default: 5432)
--regionAWS region (auto-detected if not specified)
--roleAWS IAM role ARN (auto-detected from vouch profile if not specified)

Example:

TOKEN=$(vouch credential rds \
  --hostname mydb.cluster-abc123.us-east-1.rds.amazonaws.com \
  --username mydbuser)

PGPASSWORD="$TOKEN" psql -h mydb.cluster-abc123.us-east-1.rds.amazonaws.com -U mydbuser -d mydb "sslmode=require"

vouch credential redshift

Generate temporary credentials for Amazon Redshift. Supports both provisioned clusters and Redshift Serverless workgroups.

vouch credential redshift (--cluster-id <ID> | --workgroup <NAME>) [--db-name <NAME>] [--region <REGION>] [--role <ROLE>] [--duration <SECONDS>]
FlagDescription
--cluster-idRedshift provisioned cluster identifier (mutually exclusive with --workgroup)
--workgroupRedshift Serverless workgroup name (mutually exclusive with --cluster-id)
--db-nameDatabase name (optional)
--regionAWS region (auto-detected if not specified)
--roleAWS IAM role ARN (auto-detected from vouch profile if not specified)
--durationCredential duration in seconds, 900–3600 (provisioned clusters only, default: 900)

Examples:

# Provisioned cluster
vouch credential redshift --cluster-id my-cluster --db-name mydb

# Serverless workgroup
vouch credential redshift --workgroup my-workgroup --db-name mydb

vouch credential token

Print the raw session access token to stdout for use with curl or other tools.

vouch credential token

Example:

curl -H "Authorization: Bearer $(vouch credential token)" https://api.example.com/endpoint

Key management

vouch register

Register an additional YubiKey with your account.

vouch register [--name <NAME>] [--timeout <SECONDS>]
FlagDescription
--nameHuman-readable name for this YubiKey (default: YubiKey)
--timeoutTimeout in seconds for YubiKey detection (default: 60, use 0 for no timeout)

This allows you to use multiple hardware keys (e.g., a primary and a backup) with the same Vouch identity.

vouch keys list

List all registered security keys for your account.

vouch keys list [--json]
FlagDescription
--jsonOutput as JSON

vouch keys remove

Remove a registered security key from your account.

vouch keys remove <KEY_ID> [--force]
FlagDescription
-f, --forceSkip the confirmation prompt

vouch keys rename

Rename a registered security key.

vouch keys rename <KEY_ID> <NEW_NAME>

Environment

vouch exec

Run a command with Vouch credentials injected as environment variables.

vouch exec --type <TYPE> [FLAGS...] -- <COMMAND> [ARGS...]
FlagDescription
--typeCredential type to inject: aws, github, codeartifact, rds, or redshift (required)
--roleAWS IAM role ARN (required when --type aws)
--codeartifact-domainAWS CodeArtifact domain name (when --type codeartifact; optional if a profile is configured)
--codeartifact-domain-ownerAWS account ID that owns the domain (when --type codeartifact; optional if a profile is configured)
--codeartifact-regionAWS region (when --type codeartifact; optional if a profile is configured)
--codeartifact-profileNamed AWS CodeArtifact profile to use (when --type codeartifact)
--rds-hostnameRDS instance hostname (required when --type rds)
--rds-usernameDatabase username (required when --type rds)
--rds-portDatabase port (when --type rds, default: 5432)
--rds-regionAWS region (when --type rds; auto-detected if not specified)
--redshift-cluster-idRedshift provisioned cluster identifier (when --type redshift; mutually exclusive with --redshift-workgroup)
--redshift-workgroupRedshift Serverless workgroup name (when --type redshift; mutually exclusive with --redshift-cluster-id)
--redshift-db-nameDatabase name (when --type redshift)
--redshift-durationCredential duration in seconds, 900–3600 (when --type redshift, provisioned clusters only, default: 900)
--redshift-regionAWS region (when --type redshift; auto-detected if not specified)

Environment variables injected by type:

TypeVariables
awsAWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN
githubGITHUB_TOKEN, GH_TOKEN
codeartifactCODEARTIFACT_AUTH_TOKEN
rdsPGPASSWORD, PGHOST, PGPORT, PGUSER, PGSSLMODE
redshiftPGPASSWORD, PGUSER, PGSSLMODE

Examples:

# AWS credentials
vouch exec --type aws --role arn:aws:iam::123456789012:role/VouchDeveloper -- terraform plan

# AWS CodeArtifact token
vouch exec --type codeartifact -- mvn deploy -s settings.xml

# RDS PostgreSQL — connect with psql, no manual token handling
vouch exec --type rds \
  --rds-hostname mydb.cluster-abc123.us-east-1.rds.amazonaws.com \
  --rds-username mydbuser \
  -- psql -d mydb

# Redshift provisioned cluster
vouch exec --type redshift \
  --redshift-cluster-id my-cluster \
  --redshift-db-name mydb \
  -- psql -h my-cluster.abc123.us-east-1.redshift.amazonaws.com -p 5439

# Redshift Serverless
vouch exec --type redshift \
  --redshift-workgroup my-workgroup \
  -- psql -h my-workgroup.123456789012.us-east-1.redshift-serverless.amazonaws.com -p 5439

vouch env

Output credential environment variables for use with eval. This sets variables like AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN (for AWS), GITHUB_TOKEN (for GitHub), or CODEARTIFACT_AUTH_TOKEN (for AWS CodeArtifact) in your current shell.

eval "$(vouch env --type <TYPE> [--shell <SHELL>] [FLAGS...])"
FlagDescription
--typeCredential type: aws, github, codeartifact, rds, or redshift (required)
--shellShell syntax: bash or fish (default: bash). The bash syntax also works for zsh.
--roleAWS IAM role ARN (required when --type aws)
--codeartifact-domainAWS CodeArtifact domain name (when --type codeartifact; optional if a profile is configured)
--codeartifact-domain-ownerAWS account ID that owns the domain (when --type codeartifact; optional if a profile is configured)
--codeartifact-regionAWS region (when --type codeartifact; optional if a profile is configured)
--codeartifact-profileNamed AWS CodeArtifact profile to use (when --type codeartifact)
--rds-hostnameRDS instance hostname (required when --type rds)
--rds-usernameDatabase username (required when --type rds)
--rds-portDatabase port (when --type rds, default: 5432)
--rds-regionAWS region (when --type rds; auto-detected if not specified)
--redshift-cluster-idRedshift provisioned cluster identifier (when --type redshift; mutually exclusive with --redshift-workgroup)
--redshift-workgroupRedshift Serverless workgroup name (when --type redshift; mutually exclusive with --redshift-cluster-id)
--redshift-db-nameDatabase name (when --type redshift)
--redshift-durationCredential duration in seconds, 900–3600 (when --type redshift, provisioned clusters only, default: 900)
--redshift-regionAWS region (when --type redshift; auto-detected if not specified)

Environment variables set by type:

TypeVariables
awsAWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN
githubGITHUB_TOKEN, GH_TOKEN
codeartifactCODEARTIFACT_AUTH_TOKEN
rdsPGPASSWORD, PGHOST, PGPORT, PGUSER, PGSSLMODE
redshiftPGPASSWORD, PGUSER, PGSSLMODE

Examples:

# RDS PostgreSQL
eval "$(vouch env --type rds \
  --rds-hostname mydb.cluster-abc123.us-east-1.rds.amazonaws.com \
  --rds-username mydbuser)"
psql -d mydb

# Redshift
eval "$(vouch env --type redshift \
  --redshift-cluster-id my-cluster \
  --redshift-db-name mydb)"
psql -h my-cluster.abc123.us-east-1.redshift.amazonaws.com -p 5439

vouch init

Output a shell hook that sets VOUCH_AUTHENTICATED, VOUCH_EMAIL, and VOUCH_EXPIRES_IN on each prompt. Add to your shell profile for ambient session awareness.

eval "$(vouch init <SHELL>)"

Supported shells: bash, zsh, fish.


Diagnostics

vouch doctor

Run diagnostic checks to verify your Vouch installation and configuration.

vouch doctor [--quiet] [--json]
FlagDescription
-q, --quietSuppress all output (exit code only)
--jsonOutput results as JSON

This checks:

  • CLI version and updates
  • Agent connectivity
  • Server reachability
  • Integration configurations (SSH, AWS, SSM, EKS, Git, Docker, Cargo)

vouch completions

Generate shell completion scripts.

vouch completions <SHELL>

Supported shells: bash, zsh, fish, powershell, elvish.

Example:

# Add to your ~/.zshrc
eval "$(vouch completions zsh)"

Exit codes

CodeMeaning
0Success
1General error
2Not authenticated (session expired or missing)
3Hardware key not detected
4Network or server unreachable
5Permission denied
6Configuration error

Binary download verification

If you downloaded the Vouch CLI binary directly from the GitHub releases page, you can verify its integrity using the SHA256 checksums and SLSA provenance attestation published alongside each release.

SHA256 checksum

Each release includes a checksums.txt file. Verify the downloaded binary:

sha256sum --check checksums.txt

SLSA provenance

Vouch release binaries are built with SLSA Level 3 provenance. You can verify the provenance attestation using the slsa-verifier tool:

slsa-verifier verify-artifact vouch-linux-amd64 \
  --provenance-path vouch-linux-amd64.intoto.jsonl \
  --source-uri github.com/vouch-sh/vouch