Your vault in the terminal, with guardrails for agentic AI workflows
Back to Authsia# The CLI is bundled with the app automatically.
# Symlink it to your PATH:
ln -sf /Applications/Authsia.app/Contents/Helpers/authsia ~/.local/bin/authsia
# Or add to your PATH in ~/.zshrc:
export PATH="$HOME/.local/bin:$PATH"
# Enable shell integration:
authsia init zsh
Open Authsia app, go to Settings → Security → Enable CLI Access
Run authsia unlock — enter biometric to start a session
$ authsia unlock
Touch ID prompt will appear in Authsia app...
Session started. Valid for 8 hours.
Run authsia list accounts — verify the connection works
$ authsia list accounts
github GitHub
aws-console Amazon Web Services
ms-365 Microsoft 365
Run authsia code github --copy — your first TOTP code, copied to clipboard
$ authsia code github --copy
482 391 (copied to clipboard, valid for 18s)
authsia:// references over pasting real secrets into prompts, config files, or generated code.authsia exec for agent-run commands so secrets are injected into the target process instead of lingering in your shell history.| Workflow | Command |
|---|---|
| Copy TOTP code | authsia code github --copy |
| Get a password | authsia get password "AWS Console" |
| Load SSH keys | authsia load ssh |
| Run with secrets | authsia exec --env-file .env -- npm start |
| Read a secret reference | authsia read "authsia://password/GitHub/password" |
| Scan dotfiles for secrets | authsia scrape --dry-run |
| Start a session | authsia unlock |
All commands require the Authsia app to be running.
| Command | Description |
|---|---|
authsia code <query> |
Generate TOTP code |
authsia get otp <query> |
Get OTP via get subcommand |
authsia list accounts |
List all TOTP accounts (no secrets) |
authsia export accounts |
Export all accounts as JSON |
| Command | Description |
|---|---|
authsia list passwords |
List all passwords (no secrets) |
authsia get password <query> |
Get password fields |
authsia add password |
Create a password item |
authsia edit password <query> |
Update a password |
authsia delete password <query> |
Delete a password |
| Command | Description |
|---|---|
authsia list certs |
List all certificates |
authsia get cert <query> |
Get certificate fields |
authsia add cert |
Add a certificate |
authsia edit cert <query> |
Update a certificate |
authsia delete cert <query> |
Delete a certificate |
| Command | Description |
|---|---|
authsia list notes |
List all notes |
authsia get note <query> |
Get note content |
authsia add note |
Create a note |
authsia edit note <query> |
Update a note |
authsia delete note <query> |
Delete a note |
| Command | Description |
|---|---|
authsia list ssh |
List all SSH keys |
authsia get ssh <query> |
Get SSH key details |
authsia add ssh |
Add an SSH key |
authsia edit ssh <query> |
Update SSH key |
authsia delete ssh <query> |
Delete SSH key |
authsia load ssh [<query>] |
Load key(s) into ssh-agent |
Use load to export secrets as shell variables for interactive sessions. Use exec to inject secrets into a single command with automatic output masking. Use read to resolve a secret reference URI directly. For agentic AI and automation, prefer exec plus authsia:// references so plaintext secrets stay out of prompts, checked-in files, and long-lived shells.
Secret Reference URIs
authsia://type/item[/field][?folder=path]
Reference any vault secret by URI. Works as an env var value, inside .env files, or directly with authsia read. All references are resolved via biometric approval — the URI itself contains no secret data.
| Command | Description |
|---|---|
authsia load <type> [<query>] |
Export secrets as shell variables |
authsia exec [<type>] |
Run command with secrets injected & masked |
authsia read <uri> |
Resolve a secret reference URI |
.env filesStore authsia:// references instead of plaintext secrets. Safe to commit — the file contains no secret data, which makes this pattern a much better fit for agent-generated scripts and shared repo automation.
# .env — safe to commit DB_HOST=localhost DB_PASS=authsia://password/Prod-DB/password API_KEY=authsia://password/GitHub/password TLS_KEY=authsia://cert/TLS/privateKey
# All references resolved before launch; secrets masked in output
authsia exec --env-file .env -- make deploy
load vs exec — Which to Useload |
exec |
|
|---|---|---|
| Where secrets live | Parent shell (persists until unset) |
Target process only |
| Stdout exposure | Emits export KEY='value' |
No stdout; secrets masked in subprocess output |
.env file support |
— | --env-file .env |
| Best for | Interactive sessions, multiple commands | CI/CD, single commands, security-sensitive |
| Command | Description |
|---|---|
authsia scrape |
Scan and migrate hardcoded secrets; auto-rewrites .env files with authsia:// references |
authsia scrape --revert <path> |
Revert a modified file |
authsia scrape --revert-all |
Revert all files |
authsia scrape --list-modified |
List files modified by scrape |
By default, scrape scans .env files, ~/.zshrc, ~/.bashrc, ~/.ssh, and ~/.kube/config. Use --path to specify custom paths.
.env files are auto-rewritten
When scrape finds secrets in a .env file, it replaces each secret line with an authsia:// reference — safe to commit. A diff preview is shown before any changes are applied. The original file is backed up in your vault (one backup per file; re-running updates the backup).
# Before API_KEY=sk-prod-abc123 # After (safe to commit) # Migrated to Authsia - Original: API_KEY API_KEY=authsia://password/API_KEY/password
# Run your app with secrets resolved at launch:
authsia exec --env-file .env -- npm start
| Command | Description |
|---|---|
authsia unlock |
Biometric auth once; establishes session for subsequent commands |
authsia init zsh |
Install shell integration (required for --silent flag) |
authsia audit verify |
Validate integrity of the audit log chain |
The CLI has zero direct Keychain access. All operations flow through the Authsia app, with tamper-evident audit logging for sensitive actions and agent-safe secret handling.
authsia:// references until the final biometric-approved execution step
authsia audit verify so teams can prove the log chain has not been altered
exec command wipes CLI memory via kernel process replacement (execvp)
The Authsia Chrome extension brings your vault to the browser. When you focus on a login field, Authsia shows matching credentials from your vault in an inline menu. No cloud, no servers — all local.
Note: Passwords must have a Website URL and CLI Access enabled to appear in browser autofill.