CLI Tool
The AgentInbox CLI provides a command-line interface for creating inboxes, waiting for emails, and managing your account.
Global vs NPX
Install globally for frequent use, or use
npx for one-off commands without installing.Installation
Install the CLI globally via npm, or use npx to run it without installing.
bash
npm install -g @AgentInbox/clibash
npx @AgentInbox/cli <command>Authentication
Set your API key via an environment variable or configure it once with the CLI.
bash
export AgentInbox_API_KEY="at_live_..."bash
AgentInbox login# Enter your API key when promptedCommands
The CLI supports all major API operations through intuitive commands.
Inboxes
Inbox commands
# Create an inboxAgentInbox inboxes create --ttl 3600 # List inboxesAgentInbox inboxes list # Get an inboxAgentInbox inboxes get inb_123 # Delete an inboxAgentInbox inboxes delete inb_123Messages
Message commands
# List messages in an inboxAgentInbox messages list --inbox inb_123 # Get a messageAgentInbox messages get msg_456Waits
Wait commands
# Wait for an OTPAgentInbox waits create --inbox inb_123 --type otp --timeout 120 # Cancel a waitAgentInbox waits cancel wait_789Sessions
Session commands
# Create a sessionAgentInbox sessions create --name "signup-flow" # Get session detailsAgentInbox sessions get sess_789 # Complete a sessionAgentInbox sessions complete sess_789Output Formats
The CLI supports multiple output formats: table, JSON, and raw.
bash
AgentInbox inboxes list --format json | jq '.[0].emailAddress'bash
AgentInbox inboxes create --ttl 3600 --format rawFormat Options
Use
--format json for piping to other tools, or --format raw for simple values in scripts.