@intercom/cli
v0.5.0
Published
CLI tool for managing Intercom workspaces
Keywords
Readme
Intercom CLI
CLI tool for managing Intercom workspaces. Designed for both human operators and AI agents.
Install
npm install -g @intercom/cliAuthentication
Existing workspace
Get an API access token from the Developer Hub:
- Go to the Developer Hub
- Click New app (or select an existing app)
- Under Authentication, copy the Access Token
- Set it in your environment:
export INTERCOM_TOKEN="<your-token>"Or authenticate via the CLI:
intercom auth login --token "<your-token>"New workspace
Use the setup command to provision a new workspace — no token required:
intercom setup --company-name "Acme"Quick Start
# Check your identity
intercom me
# List help center articles
intercom articles list
# Get a conversation
intercom conversations get <conversation-id>
# Set up a workspace with articles and Fin
intercom setup --company-name "Acme" --articles-from ./docsCommands
| Command | Description |
|---|---|
| intercom api <endpoint> | Raw API access (like gh api) |
| intercom auth login\|logout\|status\|list\|switch | Manage authentication |
| intercom auth bootstrap\|signup\|verify-email | Workspace provisioning |
| intercom me | Show current admin and workspace |
| intercom articles list\|get\|search\|create\|update\|delete | Manage help center articles |
| intercom contacts list\|get\|create\|update\|delete\|search | Manage contacts |
| intercom conversations list\|get\|reply\|search | Manage conversations |
| intercom help-center list\|get\|create | Manage help center collections |
| intercom messenger get\|update\|snippet | Configure Messenger |
| intercom fin manifest\|enable\|download | Fin AI Agent core |
| intercom fin procedures list\|get\|validate\|test\|publish | Fin procedures |
| intercom fin guidance\|attributes\|audiences\|workflows\|simulations | Fin SDK resources |
| intercom fin data-connectors list\|get | Fin data connectors |
| intercom setup | Orchestrate full workspace setup |
| intercom config get\|set\|list | Manage CLI configuration |
| intercom pricing | Show current Intercom pricing |
| intercom completion bash\|zsh\|fish | Generate shell completions |
Global Flags
| Flag | Description |
|---|---|
| --json | Output as pretty-printed JSON |
| --jq <expr> | Filter JSON output (subset of jq) |
| --workspace <id> | Override default workspace |
| --verbose | Show HTTP request/response details |
| --no-retry | Disable automatic rate limit retry |
| --timeout <seconds> | Request timeout in seconds |
| --agent | Force machine-readable output (JSON/NDJSON) |
| --human | Force human-readable output even when piped |
| --wide | Show all columns with wider truncation |
| --version | Print CLI version |
Agent / Pipe Mode
When stdout is not a TTY (piped to another program), the CLI automatically outputs compact NDJSON — one JSON object per line. No flag needed:
# Automatic NDJSON when piped
intercom articles list | jq '.title'
# Force JSON with flag
intercom articles list --json
# Filter inline
intercom articles list --jq '.data[].title'Raw API Access
The intercom api command provides direct access to any Intercom API endpoint:
# GET request (default)
intercom api /me
# POST with fields
intercom api /articles -f title="Hello" -f author_id=123
# Typed fields (booleans, numbers, file reads)
intercom api /articles -F draft:=true -F [email protected]
# Auto-paginate
intercom api /articles --paginate
# Use jq to filter
intercom api /contacts --jq '.data[].email'Environment Variables
| Variable | Description |
|---|---|
| INTERCOM_TOKEN | API token (bypasses credential store) |
| INTERCOM_API_BASE_URL | Override API base URL |
| INTERCOM_APP_BASE_URL | Override app base URL |
| INTERCOM_CONFIG_DIR | Override config directory |
| INTERCOM_PASSWORD | Password for signup/bootstrap |
Development
git clone [email protected]:intercom/cli.git
cd cli
npm ci
npm run build # Build to dist/
npm test # Run tests (~5s)
npm run lint # TypeScript typecheck
npm run dev # Watch mode
# Try it locally
export INTERCOM_TOKEN="<your-token>"
node dist/index.js meSee SETUP.md for full developer setup guide.
License
MIT
