CLI Tool

The AgentInbox CLI provides a command-line interface for creating inboxes, waiting for emails, and managing your account.

Install from GitHub

The CLI source is available at agentinbox-in/agentinbox-cli. Install from GitHub until the npm package is published.

Installation

Install the CLI globally via npm, or use npx to run it without installing.

bash
npm install -g github:agentinbox-in/agentinbox-cli

Authentication

Set your API key via an environment variable or configure it once with the CLI.

bash
export AGENTINBOX_API_KEY="at_live_..."

Commands

The CLI supports all major API operations through intuitive commands.

Inboxes

Inbox commands
# Create an inbox
agentinbox inbox create --ttl 3600
# List inboxes
agentinbox inbox list
# Get an inbox
agentinbox inbox get 00000000-0000-4000-8000-000000000001
# Delete an inbox
agentinbox inbox delete 00000000-0000-4000-8000-000000000001

Messages

Message commands
# List messages in an inbox
agentinbox message list 00000000-0000-4000-8000-000000000001
# Get a message
agentinbox message get 00000000-0000-4000-8000-000000000002
# Extract data from a message
agentinbox message extract 00000000-0000-4000-8000-000000000002

Waits

Wait commands
# Wait for an OTP
agentinbox wait otp 00000000-0000-4000-8000-000000000001 --timeout 120
# Check wait status
agentinbox wait check 00000000-0000-4000-8000-000000000003

Sessions

Session commands
# Create a session
agentinbox session create "signup-flow"
# Get session details
agentinbox session get 00000000-0000-4000-8000-000000000004 --include timeline
# Complete a session
agentinbox session complete 00000000-0000-4000-8000-000000000004

Output Formats

Use the global --json flag for machine-readable output.

bash
agentinbox --json inbox list | jq '.data[0].emailAddress'

Format Options

Put global flags before the command, for example agentinbox --json inbox list.

Next Steps