The SimpleLogin CLI (sl) is a command-line interface for managing SimpleLogin aliases, mailboxes, and account settings. It's designed as a system tool optimized for scripting and automation, following modern CLI patterns similar to Docker CLI and the Hugging Face CLI.
- TypeScript
- Oclif Framework
- simplelogin-client SDK
All commands support these global flags:
| Flag | Type | Default | Description |
|---|---|---|---|
--format |
plain|json|yaml |
plain |
Output format. Plain is human-readable, JSON/YAML for scripting |
--config |
string |
~/.config/simplelogin-cli/config.yaml |
Path to config file containing credentials |
sl <resource> <action> [options]
Docker-style aliases are supported (e.g., rm for delete, ls for list).
Get account information.
Get account statistics.
SDK Reference: AccountApi.getStats()
No command-specific parameters.
- Call
AccountApi.getStats() - In plain format, display stats in table format
- Show: number of aliases, forwarded emails, replied emails, blocked emails
- In JSON/YAML format, return full UserStats object
Authorization: Required
Update account information.
SDK Reference: AccountApi.updateUserInfo()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
--name |
string | - | No | New display name |
--profile-picture |
string | - | No | Path to image file or "none" to remove |
- At least one parameter must be provided
- If
--profile-pictureis a file path, read and encode as base64 - If
--profile-pictureis "none", set to null - Call
AccountApi.updateUserInfo() - Output success confirmation
- In JSON/YAML format, return updated UserInfo object
Authorization: Required
Register a new account.
SDK Reference: AccountApi.registerAccount()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
--email |
string | - | No | Email address (will prompt if not provided) |
--password |
string | - | No | Password (will prompt if not provided) |
- Prompt for email and password if not provided
- Password should be hidden input
- Call
AccountApi.registerAccount() - Output instructions to check email for activation code
- In JSON/YAML format, return
{success: true, email: string}
Authorization: None
Activate a registered account.
SDK Reference: AccountApi.activateAccount()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
--email |
string | - | Yes | Email address |
--code |
string | - | Yes | Activation code from email |
- Call
AccountApi.activateAccount() - Output success message
- In JSON/YAML format, return
{success: true}
Authorization: None
Delete account (requires sudo mode).
SDK Reference: AccountApi.deleteUser()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
--password |
string | - | No | Password for sudo mode confirmation |
--confirm |
boolean | false | No | Skip interactive confirmation |
- If
--confirmis not set, prompt user with "Are you sure?" warning - Prompt for password if not provided
- Call
AccountApi.enableSudoMode()first - Call
AccountApi.deleteUser() - Output deletion confirmation
- In JSON/YAML format, return
{success: true}
Authorization: Required
List all aliases with pagination.
SDK Reference: AliasApi.getAliases()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
--page |
number | 0 | No | Page number (20 aliases per page) |
--pinned |
boolean | - | No | Show only pinned aliases |
--disabled |
boolean | - | No | Show only disabled aliases |
--enabled |
boolean | - | No | Show only enabled aliases |
--all |
boolean | false | No | Fetch all pages automatically |
- Call
AliasApi.getAliases()with pagination - If
--allis set, fetch all pages and combine results - Only one of
--pinned,--disabled,--enabledcan be set - In plain format, display as table with columns: ID, Email, Enabled, Pinned, Mailboxes
- In JSON/YAML format, return array of Alias objects
- Show total count
Authorization: Required
Search aliases by email address.
SDK Reference: AliasApi.searchAliases()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<query> |
string | - | Yes | Search query for alias email |
--page |
number | 0 | No | Page number |
--pinned |
boolean | - | No | Show only pinned aliases |
--disabled |
boolean | - | No | Show only disabled aliases |
--enabled |
boolean | - | No | Show only enabled aliases |
--all |
boolean | false | No | Fetch all pages automatically |
- Query is a positional argument
- Call
AliasApi.searchAliases() - Same filtering logic as
listcommand - Same output format as
listcommand
Authorization: Required
Get details of a specific alias.
SDK Reference: AliasApi.getAlias()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<alias-id> |
number | - | Yes | Alias ID |
- Alias ID is a positional argument
- Call
AliasApi.getAlias() - In plain format, display all alias details as formatted key-value pairs
- In JSON/YAML format, return full Alias object
- Show: ID, email, enabled status, mailboxes, note, creation date, activity counts
Authorization: Required
Create a new random alias.
SDK Reference: AliasApi.createRandomAlias()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
--note |
string | - | No | Note/description for the alias |
--hostname |
string | - | No | Associated hostname |
--mode |
uuid|word |
- | No | Generation mode (uuid or word-based) |
- Call
AliasApi.createRandomAlias() - Output created alias email and ID
- In plain format, show key details
- In JSON/YAML format, return full Alias object
Authorization: Required
Create a custom alias with specific prefix and suffix.
SDK Reference: AliasApi.createCustomAlias()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<prefix> |
string | - | Yes | Alias prefix (local part) |
<suffix> |
string | - | Yes | Signed suffix from alias options |
--mailbox-ids |
string | - | Yes | Comma-separated mailbox IDs |
--note |
string | - | No | Note/description |
--name |
string | - | No | Display name |
--hostname |
string | - | No | Associated hostname |
- Prefix and suffix are positional arguments
--mailbox-idsshould be parsed as comma-separated numbers- Call
AliasApi.createCustomAlias() - Output created alias details
- In JSON/YAML format, return full Alias object
Authorization: Required
Update alias settings.
SDK Reference: AliasApi.updateAlias()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<alias-id> |
number | - | Yes | Alias ID |
--note |
string | - | No | Update note |
--name |
string | - | No | Update display name |
--mailbox-id |
number | - | No | Change primary mailbox |
--mailbox-ids |
string | - | No | Comma-separated mailbox IDs |
--pinned |
boolean | - | No | Pin/unpin alias |
--disable-pgp |
boolean | - | No | Disable/enable PGP |
- Alias ID is positional argument
- At least one optional parameter must be provided
- Call
AliasApi.updateAlias() - Output success confirmation
- In JSON/YAML format, return
{success: true}
Authorization: Required
Delete an alias.
SDK Reference: AliasApi.deleteAlias()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<alias-id> |
number | - | Yes | Alias ID to delete |
--confirm |
boolean | false | No | Skip confirmation prompt |
- Alias ID is positional argument
- If
--confirmis not set, prompt for confirmation - Call
AliasApi.deleteAlias() - Output deletion confirmation
- In JSON/YAML format, return
{success: true, deleted: true}
Authorization: Required
Enable or disable an alias.
SDK Reference: AliasApi.toggleAlias()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<alias-id> |
number | - | Yes | Alias ID |
- Alias ID is positional argument
- Call
AliasApi.toggleAlias()to toggle current state - Output new state (enabled/disabled)
- In plain format, show "Alias {id} is now {enabled/disabled}"
- In JSON/YAML format, return
{success: true, enabled: boolean}
Authorization: Required
Enable a specific alias.
SDK Reference: AliasApi.toggleAlias(), AliasApi.getAlias()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<alias-id> |
number | - | Yes | Alias ID |
- Alias ID is positional argument
- Call
AliasApi.getAlias()to check current state - If already enabled, skip API call
- If disabled, call
AliasApi.toggleAlias() - Output confirmation
- In JSON/YAML format, return
{success: true, enabled: true}
Authorization: Required
Disable a specific alias.
SDK Reference: AliasApi.toggleAlias(), AliasApi.getAlias()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<alias-id> |
number | - | Yes | Alias ID |
- Alias ID is positional argument
- Call
AliasApi.getAlias()to check current state - If already disabled, skip API call
- If enabled, call
AliasApi.toggleAlias() - Output confirmation
- In JSON/YAML format, return
{success: true, enabled: false}
Authorization: Required
Get activity log for an alias.
SDK Reference: AliasApi.getActivities()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<alias-id> |
number | - | Yes | Alias ID |
--page |
number | 0 | No | Page number |
--all |
boolean | false | No | Fetch all pages |
- Alias ID is positional argument
- Call
AliasApi.getActivities() - If
--all, fetch all pages - In plain format, display as table with columns: Action, From, To, Timestamp
- In JSON/YAML format, return array of activity objects
- Show most recent first
Authorization: Required
Get available options for creating aliases.
SDK Reference: AliasApi.getAliasOptions()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
--hostname |
string | - | No | Get options for specific hostname |
--domain |
string | - | No | Filter options for specific mail domain |
--custom |
boolean | - | No | Filter options for custom ones |
--premium |
boolean | - | No | Filter options for premium ones |
--prefix |
boolean | - | No | Filter options for those that have a prefix in front of their suffix before the @ |
- Call
AliasApi.getAliasOptions() - In plain format, display prefix suggestion and available suffixes
- Show whether user can create new aliases
- In JSON/YAML format, return full AliasOptions object
Authorization: Required
List contacts for an alias.
SDK Reference: AliasApi.getContacts()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<alias-id> |
number | - | Yes | Alias ID |
--page |
number | 0 | No | Page number |
--all |
boolean | false | No | Fetch all pages |
- Alias ID is positional argument
- Call
AliasApi.getContacts() - If
--all, fetch all pages - In plain format, display as table with columns: ID, Contact Email, Reverse Alias, Creation Date
- In JSON/YAML format, return array of contact objects
Authorization: Required
Create a new contact for an alias.
SDK Reference: AliasApi.createContact()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<alias-id> |
number | - | Yes | Alias ID |
<email> |
string | - | Yes | Contact email address |
- Alias ID and email are positional arguments
- Validate email format
- Call
AliasApi.createContact() - Output created contact details including reverse alias
- In JSON/YAML format, return full contact object
- Handle case where contact already exists (200 response)
Authorization: Required
List all mailboxes.
SDK Reference: MailboxApi.getMailboxes()
No command-specific parameters.
- Call
MailboxApi.getMailboxes() - In plain format, display as table with columns: ID, Email, Default, Verified, Aliases Count
- In JSON/YAML format, return array of mailbox objects
- Highlight default mailbox
Authorization: Required
Create a new mailbox.
SDK Reference: MailboxApi.createMailbox()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<email> |
string | - | Yes | Mailbox email address |
- Email is positional argument
- Validate email format
- Call
MailboxApi.createMailbox() - Output creation confirmation with verification instructions
- In JSON/YAML format, return full Mailbox object
- Note that verification email will be sent
Authorization: Required
Update mailbox settings.
SDK Reference: MailboxApi.updateMailbox()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<mailbox-id> |
number | - | Yes | Mailbox ID |
--email |
string | - | No | New email address |
--default |
boolean | - | No | Set as default mailbox |
--cancel-email-change |
boolean | false | No | Cancel pending email change |
- Mailbox ID is positional argument
- At least one optional parameter must be provided
- Call
MailboxApi.updateMailbox() - If email is changed, note that verification is required
- Output success confirmation
- In JSON/YAML format, return
{success: true}
Authorization: Required
Delete a mailbox.
SDK Reference: MailboxApi.deleteMailbox()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<mailbox-id> |
number | - | Yes | Mailbox ID |
--confirm |
boolean | false | No | Skip confirmation prompt |
- Mailbox ID is positional argument
- If
--confirmis not set, prompt for confirmation - Warn if deleting default mailbox
- Call
MailboxApi.deleteMailbox() - Output deletion confirmation
- In JSON/YAML format, return
{success: true}
Authorization: Required
List custom domains.
SDK Reference: CustomDomainApi.getCustomDomains()
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
<alias-id> |
number | - | Yes | Alias ID (per API spec) |
- Alias ID is positional argument
- Call
CustomDomainApi.getCustomDomains() - In plain format, display as table with columns: ID, Domain, Verified, Catch-all, Aliases Count
- In JSON/YAML format, return custom domain object
- Show verification status prominently
Authorization: Required
Alias created successfully
ID: 12345
Email: random_word@slmail.me
Enabled: true
Note: Created from CLI
{
"success": true,
"data": {
"id": 12345,
"email": "random_word@slmail.me",
"enabled": true,
"note": "Created from CLI",
"creation_date": "2025-12-21 10:30:00+00:00",
"mailbox": {
"id": 1,
"email": "user@example.com"
}
}
}success: true
data:
id: 12345
email: random_word@slmail.me
enabled: true
note: Created from CLI
creation_date: '2025-12-21 10:30:00+00:00'
mailbox:
id: 1
email: user@example.comDefault: ~/.config/simplelogin-cli/config.yaml
url: https://app.simplelogin.io
apiKey: sl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx- File permissions: 600 (read/write for owner only)
- API key stored in plaintext (secured by file permissions)
- Config directory created with 700 permissions
Error: Unauthorized
Please run 'sl login' to authenticate
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Please run 'sl login' to authenticate"
}
}Commands marked with Authorization: Required must:
- Check for API key in config file
- If missing, output error and suggest running
sl login - Exit with non-zero status code
Commands marked with Authorization: None can run without authentication.
For commands with --all flag:
- Make initial request with page 0
- If results returned < 20 items, stop
- Otherwise, increment page and continue
- Combine all results before outputting
- Show progress indicator in plain format (e.g., "Fetching page 2...")
- No progress indicator in JSON/YAML format
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Invalid arguments |
| 3 | Authentication required |
| 4 | API error |
| 5 | Network error |
These features are not in the current SDK but could be added later:
sl notification list- List notificationssl settings get/update- Manage account settingssl export- Export aliases and settingssl import- Import aliases from filesl contact block/unblock- Block/unblock contactssl domain create/update/delete- Full domain management