Skip to content

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.

Code
anonli alias new [options]

Options

FlagDescription
-r, --randomGenerate 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

Code
# 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.

Code
anonli alias list [options]

Options

FlagDescription
--limit <n>Results per page (default: 50)
--offset <n>Pagination offset
--activeShow only active aliases
--inactiveShow only disabled aliases
--search <term>Filter by email address
--jsonOutput raw JSON

Example

Code
# 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.

Code
anonli alias stats [alias] [options]

Arguments

ArgumentDescription
[alias]Specific alias email address (omit for a summary of all aliases)

Options

FlagDescription
--allShow summary across all aliases
--jsonOutput raw JSON

Examples

Code
# Summary of all aliases
anonli alias stats --all

# Stats for a specific alias
anonli alias stats shopping@anon.li

Update

Update alias settings.

Code
anonli alias update <alias> [options]

Aliases: anonli alias edit

Options

FlagDescription
--enableEnable the alias
--disableDisable the alias
-l, --label <text>Update the vault-encrypted label
--note <text>Update the vault-encrypted private note
--clear-labelClear the encrypted label
--clear-noteClear 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.

Code
anonli alias toggle <alias>

Use the alias email address shown by anonli alias list.


Delete

Permanently delete an alias.

Code
anonli alias delete <alias> [options]

Arguments

ArgumentDescription
<alias>Alias email address

Options

FlagDescription
-f, --forceSkip confirmation prompt