CLI
Install and use the anon.li command-line tool to manage aliases, drops, domains, and more from your terminal.
The anon.li CLI (anonli) lets you manage aliases, encrypted file drops, recipients, and domains directly from your terminal. It authenticates with an API key from your dashboard and supports scripting with --json output and quiet mode.
Installation
Install globally with npm or bun:
npm install -g anonli
bun install -g anonli
Verify the installation:
anonli --version
Quick Start
Authenticate
Log in with an API key from your anon.li dashboard:
anonli login
Alternatively, pass a key directly:
anonli login --token ak_your_api_key
Create an alias
anonli alias new --custom myalias
Upload an encrypted file
anonli drop upload ./secret.pdf --expiry 7
The CLI encrypts the file locally with AES-256-GCM, prompts for your vault password to store a recoverable owner key, uploads it, and returns a share link with the decryption key in the URL fragment.
Global Options
| Flag | Description |
|---|---|
-q, --quiet | Suppress spinners, tables, and boxes (only output essential data) |
-v, --version | Show CLI version |
-h, --help | Show help for any command |
Configuration
The CLI stores its config at ~/.config/anonli.json (or $XDG_CONFIG_HOME/anonli.json). The file is created with 0600 permissions (owner-only).
Environment Variables
| Variable | Description |
|---|---|
ANONLI_API_KEY | Override the stored API key |
ANONLI_BASE_URL | Override the API base URL (default: https://anon.li) |
Config Commands
# View current config
anonli config
# Set the base URL (e.g. for self-hosted)
anonli config set baseUrl https://my-instance.example.com
# Validate config and test API connectivity
anonli config validate
JSON Output
Most commands support --json for machine-readable output, making the CLI easy to integrate into scripts and pipelines:
anonli alias list --json | jq '.[0].email'
Shell Completions
Generate completions for your shell:
# Bash
source <(anonli completions bash)
# Zsh
source <(anonli completions zsh)
# Fish
anonli completions fish > ~/.config/fish/completions/anonli.fish
Add the appropriate line to your shell profile to load completions on startup.
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Generic error |
2 | Authentication error |
3 | Rate limit exceeded |
4 | Plan limit exceeded |
5 | Not found |
Command Reference
Drop Commands
Upload, download, list, and manage encrypted file drops.
Alias Commands
Create, list, toggle, and delete email aliases.
Recipient Commands
Add, verify, and manage forwarding recipients and PGP keys.
Domain Commands
Add custom domains, verify DNS records, and manage DKIM.
Additional Commands
anonli whoami
Show your account info and usage statistics:
anonli whoami
Displays your email, plan tier, alias usage, recipient count, domain count, drop count, and storage usage.
API keys
Create and revoke API keys from Dashboard -> API Keys. Existing API keys cannot create or delete other API keys.
anonli subscribe
View pricing or subscribe to a plan:
# Show pricing table
anonli subscribe
# Start checkout
anonli subscribe --product bundle --tier plus --frequency yearly
anonli update
Update the CLI to the latest version:
anonli update
Next Steps
- Drop Commands — Upload and download encrypted files
- Alias Commands — Manage email aliases
- API Documentation — REST API reference
- Source Code — View or contribute on Codeberg