Reference

CLI

Every dotsafe command and its main options.

Every command takes --help. Commands that work on variables take -e <env> for an environment other than the linked one.

Vault

CommandWhat it does
dotsafe init [--path | --bucket | --webdav]Create a vault, or connect this Mac to an existing one
dotsafe unlock [--for 8h]Keep the vault key in the keychain for a while
dotsafe lockForget the key cached by unlock
dotsafe syncExchange changes with the bucket now
dotsafe backup [--to <dir>]Save a dated, still-encrypted copy (the last 10 are kept)
dotsafe move [--path | --bucket | --webdav]Move the vault; the old copy stays until you delete it

Variables

CommandWhat it does
dotsafe link [name] [-e env]Link this directory to a project, creating it if needed
dotsafe set KEY[=VALUE]…Set variables; a bare KEY asks for the value
dotsafe get KEYPrint a variable's value
dotsafe listList variable names
dotsafe unset KEY… [--hide]Delete variables, or hide inherited ones
dotsafe inherit <parent> | --noneInherit another environment's variables
dotsafe run [--proxy] -- <command>Run a command with the variables in its environment
dotsafe import [file] [--from <tool>]Import a .env or JSON file, or from Doppler, Infisical, 1Password
dotsafe export [-o file] [--force]Print .env lines, or write a gitignored, owner-only file
dotsafe scan [paths] [--staged | --install-hook]Find vault values in files before they're committed

Secrets

CommandWhat it does
dotsafe secret listSecrets with their age and where they're used
dotsafe secret share KEY [--all]Turn a variable into a secret other environments can link to
dotsafe secret link KEY SECRETLink a variable to an existing secret
dotsafe secret unlink KEYGive a linked variable its own copy again
dotsafe secret rotate SECRET [--generate | --leaked | --stdin]New value everywhere it's linked, through its provider if it has one
dotsafe secret retire SECRET [--by-hand]Revoke the previous value
dotsafe secret rollback SECRETGo back to the previous value
dotsafe secret history SECRETVersions and notes, never values
dotsafe secret restore SECRET VERSIONMake an earlier version current again
dotsafe secret policy SECRET --every <days>How often it should be rotated
dotsafe secret dueSecrets due for rotation
dotsafe secret queue [--rotate | --dismiss]What to rotate after removing a device
dotsafe secret provider SECRET --connection <name>Where new values come from
dotsafe secret target add SECRET --connection <name>Where each new value is pushed
dotsafe secret push SECRETPush the current value to every target now

Integrations

CommandWhat it does
dotsafe connect <service> [--set key=value]Connect a provider or deploy target
dotsafe connectionsList connected accounts
dotsafe reconnect <name>Give a connection a new admin token
dotsafe disconnect <name>Remove a connection and its token

Agents

CommandWhat it does
dotsafe mcpThe MCP server agents talk to
dotsafe mcp setupHow to add dotsafe to Claude Code, Cursor and others
dotsafe daemon [--for 8h]Serve agents without the app; approve in the terminal
dotsafe proxy list | add | removeProxy profiles for more API keys
dotsafe audit [--limit 30]What agents asked for, from every device

Devices and license

CommandWhat it does
dotsafe device listDevices that can open this vault
dotsafe device remove <name>Remove one and switch the vault to a new key
dotsafe license activate <key>Activate a license on this Mac
dotsafe license statusShow the license on this Mac
dotsafe license removeFree this Mac's activation

Environment variables

VariableWhat it does
DOTSAFE_PASSWORDThe master password, for CI
DOTSAFE_S3_ACCESS_KEY_ID, DOTSAFE_S3_SECRET_ACCESS_KEYBucket credentials, instead of the keychain
DOTSAFE_WEBDAV_PASSWORDThe WebDAV password, instead of asking
DOTSAFE_CONFIG_DIRUse another config folder, for testing