CLI Alias Commands
Create, list, toggle, update, and delete email aliases from the command line.
The anonli alias commands let you manage email aliases that forward to your real inbox while keeping your identity private.
New
Create a new email alias.
anonli alias new [options]
Options
| Flag | Description |
|---|---|
-r, --random | Generate a random alias (default if no custom options given) |
-c, --custom <name> | Create a custom alias with the given local part |
-d, --domain <domain> | Domain to use (default: anon.li) |
-l, --label <text> | Add a vault-encrypted label |
--note <text> | Add a vault-encrypted private note |
--recipient <id> | Forward to a specific recipient ID |
Custom alias names must match ^[a-z0-9][a-z0-9._+\-]{0,61}[a-z0-9]$ (2–63 characters, alphanumeric with ., _, +, -).
Alias labels and notes are encrypted with your vault. When you pass --label or --note, the CLI prompts for your vault password, encrypts the metadata locally, and sends only encrypted metadata envelopes to the API.
Examples
# Create a random alias
anonli alias new
# Create a custom alias
anonli alias new --custom shopping
# Create an alias on a custom domain
anonli alias new --custom hello --domain mydomain.com
List
List all your aliases.
anonli alias list [options]
Options
| Flag | Description |
|---|---|
--limit <n> | Results per page (default: 50) |
--offset <n> | Pagination offset |
--active | Show only active aliases |
--inactive | Show only disabled aliases |
--search <term> | Filter by email address |
--json | Output raw JSON |
Example
# Search for aliases containing "shop"
anonli alias list --search shop --active
The default table shows the alias email address as the handle to use with settings commands.
Stats
Show email forwarding statistics.
anonli alias stats [alias] [options]
Arguments
| Argument | Description |
|---|---|
[alias] | Specific alias email address (omit for a summary of all aliases) |
Options
| Flag | Description |
|---|---|
--all | Show summary across all aliases |
--json | Output raw JSON |
Examples
# Summary of all aliases
anonli alias stats --all
# Stats for a specific alias
anonli alias stats shopping@anon.li
Update
Update alias settings.
anonli alias update <alias> [options]
Aliases: anonli alias edit
Options
| Flag | Description |
|---|---|
--enable | Enable the alias |
--disable | Disable the alias |
-l, --label <text> | Update the vault-encrypted label |
--note <text> | Update the vault-encrypted private note |
--clear-label | Clear the encrypted label |
--clear-note | Clear the encrypted private note |
At least one option is required. --enable and --disable are mutually exclusive. Metadata updates use your vault password interactively and never send plaintext labels or notes to the API.
Use the alias email address shown by anonli alias list.
Toggle
Toggle an alias between active and inactive.
anonli alias toggle <alias>
Use the alias email address shown by anonli alias list.
Delete
Permanently delete an alias.
anonli alias delete <alias> [options]
Arguments
| Argument | Description |
|---|---|
<alias> | Alias email address |
Options
| Flag | Description |
|---|---|
-f, --force | Skip confirmation prompt |