Installation
Install the CLI globally using npm:Quick Start
Commands
unosend init
Set up your API key. Get yours at https://www.unosend.co/api-keys.
unosend send
Send an email from the command line.
Recipient email address
Email subject line
Sender email address (defaults to your verified domain)
HTML content for the email body
Plain text content for the email body
Path to an HTML file to use as the email body
Reply-to email address
CC recipients (comma-separated)
BCC recipients (comma-separated)
Examples
Basic text email:unosend domains
Manage your sending domains.
List all domains
Add a new domain
Verify domain DNS records
Show domain details
Remove a domain
unosend logs
View your email sending logs.
Number of logs to retrieve (default: 10)
Filter by status:
sent, delivered, failed, bouncedExamples
View recent logs:unosend config
Manage your CLI configuration.
View current config
Update API key
unosend whoami
Check your current authentication status and account info.
Configuration
The CLI stores your configuration in~/.unosend/config.json. This includes:
- Your API key
- Default sender address (optional)
- Other preferences
unosend config to manage settings.
Environment Variables
You can also set your API key using an environment variable:Scripting & Automation
The CLI is designed to work well in scripts and automation:Troubleshooting
”API key not found”
Rununosend init to set up your API key, or set the UNOSEND_API_KEY environment variable.
”Domain not verified”
Make sure you’ve added the required DNS records. Rununosend domains show yourdomain.com to see the records you need to add.