Skip to content
Command line

Command line

Paw includes a full command-line interface in the same executable.

paw       # Start the desktop app
paw cli   # Run command-line operations

The CLI works with the same local vaults as the desktop app. It does not require a server, internet connection, or user account.

Basic workflow

Most CLI commands operate on unlocked vaults. Paw uses a background agent process to hold unlocked vault sessions in memory.

  1. Start the agent (if the desktop app is not already running):

    paw cli agent start
  2. Unlock your vault in another terminal:

    paw cli unlock Personal

    Paw prompts for the vault password and prints a session ID:

    Session ID: f1a2b3c4...
  3. Use the session ID with commands: You can pass the session ID with --session or export it to your environment:

    export PAW_SESSION="f1a2b3c4..."
    paw cli ls Personal
  4. Lock the vault when finished:

    paw cli lock Personal

Interactive CLI

Paw provides an interactive terminal experience for managing credentials:

  • Interactive wizard: Run paw cli add without arguments to step through creating an item, selecting its vault and type interactively.
  • Interactive editor: Run paw cli edit <item> to enter a guided terminal menu where you can modify standard fields, add or organize custom fields and sections, and toggle tags.
  • External editor: When editing multiline text (such as notes or multiline custom fields), Paw opens your preferred terminal editor ($VISUAL or $EDITOR).
  • Structured JSON output: Use paw cli show --json to inspect credentials or integrate Paw into automated scripts and workflows.

Shell completion

Install completion scripts for your shell to complete commands, subcommands, flags, vault names, and item paths:

  • Bash (requires bash-completion):

    paw cli completion bash > ~/.paw-completion.bash
    echo 'source ~/.paw-completion.bash' >> ~/.bashrc
  • Zsh:

    # Add to ~/.zshrc after compinit:
    source <(paw cli completion zsh)
  • Fish:

    paw cli completion fish > ~/.config/fish/completions/paw.fish

SSH agent integration

Paw includes an OpenSSH-compatible agent that securely serves your stored SSH keys to terminal tools like ssh and git.

When you unlock a vault with paw cli unlock, its SSH keys are automatically loaded into the agent. Set the SSH_AUTH_SOCK environment variable to connect:

export SSH_AUTH_SOCK="$HOME/.paw/agent.sock"

For complete setup instructions, Windows configuration, and verification steps, see the SSH agent documentation.

Security recommendations

  • Avoid typing passwords directly into command flags or shell history.
  • Use --clip (-c) with paw cli show to copy secrets directly to your clipboard instead of displaying them on screen.
  • For a complete list of commands and options, see the Command reference.