Authentication & Vault
The CLI has two modes: interactive login on your machine, and a CI token in pipelines. When DEPVAULT_TOKEN is set, the CLI uses it automatically and blocks login.
Prerequisite: create your account and set up your encryption vault in the web dashboard first. The CLI can’t register an account or create a vault; file commands say the vault isn’t set up until you do.
depvault login
Opens your browser with a short verification code (device flow). Once you approve, tokens are stored in ~/.depvault/credentials.json.
depvault login
depvault login --server https://api.example.com # self-hosted--server saves the URL to config.json once login succeeds. Tokens only work against the server that issued them: after depvault config set server, log in again. Login needs an interactive terminal; in CI use DEPVAULT_TOKEN instead.
depvault logout
Deletes the stored credentials and forgets the remembered vault unlock.
depvault whoami
Shows who you’re signed in as, or that the CLI is using DEPVAULT_TOKEN.
Unlocking the vault
File contents are decrypted on your machine with a key derived from your vault password (not your login password). You unlock once per device:
- The first command that needs the vault asks for the vault password.
- It then asks Remember on this device for 30 days? (default Yes).
After that, status, push, and pull run without prompting. There is no idle auto-lock.
depvault unlock # unlock ahead of time and remember this device
depvault lock # forget the key on this deviceOnly the derived key is stored, never the password. It is encrypted with DPAPI on Windows and with an owner-only key file on macOS/Linux, and is cleared by lock, logout, a vault password change, or after 30 days.
For scripts that run as you (not CI), set DEPVAULT_PASSWORD to unlock without a prompt.
CI token mode
Pipelines use a project-scoped, read-only token instead of login and a vault password:
export DEPVAULT_TOKEN=dvci_xxxxxxxx.xxxxxxxxxxxxxxxx
depvault pullSee CI/CD Integration for creating tokens and pipeline examples.
Local files
| File | Contents |
|---|---|
~/.depvault/config.json | Server URL |
~/.depvault/credentials.json | Login tokens, bound to the server that issued them (encrypted) |
~/.depvault/vault-session.json | Remembered vault unlock (encrypted) |
~/.depvault/sync/ | What this machine last synced, per checkout (paths, versions, keyed hashes) |
Set DEPVAULT_HOME to use a different folder (e.g. separate profiles). None of these belong in version control.