When to Use ChatbotX CLI
Installation
Install ChatbotX CLI globally on your computer, VPS, or automation server using npm or pnpm.Authentication
Before you can run Workspace commands, you need to connect the CLI to your ChatbotX instance using a Workspace token and API URL.Option 1: CLI Configuration (Recommended)
Save your credentials globally to your local CLI configuration file. This is the recommended approach for most users:string
required
Your Workspace token. Find it under Settings → Developer → API Keys or Settings → Integrations → Workspace token.
string
required
The base API URL of your ChatbotX instance (e.g.,
https://app.chatbotx.io/api).Option 2: Environment Variables
Use environment variables when you do not want secrets stored in your shell history or shared scripts. The CLI automatically detects these variables at runtime:Do not commit real Workspace tokens to git repositories. Use environment variables or a secret manager for automation scripts and CI/CD workflows.
Custom API URL (Self-Hosted)
If you are running a self-hosted ChatbotX instance, point the CLI to your custom domain instead of the cloud URL:Quick Start
Work through these five commands to verify your connection and safely explore Workspace resources before modifying any data.1
Confirm the CLI can access your Workspace
2
List Contacts and Tags before changing anything
3
Resolve a Contact by email or phone number
email: or phone: prefix to look up the correct Contact record.4
Add a Tag to a Contact
<tagId> with the actual ID you retrieved from chatbotx tags list.5
Confirm the result