Skip to main content
ChatbotX CLI is a command-line tool for working directly with your self-hosted ChatbotX Workspace API. Use it to run exact operations from a terminal, automate repeatable tasks, and connect ChatbotX with internal scripts, cronjobs, CI/CD, or support workflows. The CLI is useful when you need predictable output, auditable commands, and zero LLM token usage. It calls the ChatbotX API directly, so every command runs with the parameters you provide.

When to use ChatbotX CLI

When to use ChatbotX CLI?

  • Scripting & Cronjobs: Automating bulk tasks like syncing CRM custom fields or importing contacts.
  • Zero Token Costs: Communicates directly with the ChatbotX API, saving 100% of LLM API fees.
  • Speed & Precision: Delivers instantaneous results with 100% predictability and zero AI hallucinations.
For your AI agent to work best with ChatbotX, install the skill by running:
npx skills add sunghajung43/chatbotx
Or load the SKILL.md file from ClawHub.

Installation

Install ChatbotX CLI globally on your computer, VPS, or automation server using npm or pnpm:
npm install -g chatbotx
Verify the installation by running the help command:
chatbotx --help

Authentication

Before running Workspace commands, connect the CLI to your self-hosted ChatbotX instance. Save your credentials globally to your local CLI configuration:
chatbotx config set --apiKey "YOUR_WORKSPACE_TOKEN" --apiUrl "https://app.chatbotx.io/api"
  • --apiKey: Your Workspace token (found under Settings → Developer → API Keys or Settings → Integrations → Workspace token).
  • --apiUrl: The API URL of your ChatbotX instance.

Option 2: Environment Variables

Use environment variables to avoid saving secrets in your shell history:
export CHATBOTX_API_KEY="YOUR_WORKSPACE_TOKEN"
export CHATBOTX_API_URL="https://app.chatbotx.io/api"

Custom API URL (Self-Hosted)

If you are self-hosting ChatbotX, point the CLI configuration to your custom domain:
chatbotx config set --apiKey "YOUR_WORKSPACE_TOKEN" --apiUrl "https://app.yourdomain.com/api"
Or via environment variables:
export CHATBOTX_API_URL="https://app.yourdomain.com/api"

Quick Start

Get started with the ChatbotX CLI by checking your connection and inspecting workspace resources:
# 1. Confirm the CLI can access your Workspace
chatbotx workspaces get

# 2. List Contacts and Tags before changing anything
chatbotx contacts list --perPage 10
chatbotx tags list

# 3. Resolve a Contact by email or phone number
chatbotx contacts get email:user@example.com
chatbotx contacts get phone:+84708123123

# 4. Add a Tag to a Contact after you know the tagId
chatbotx contacts tag add email:user@example.com --tagIds <tagId>

# 5. Confirm the result
chatbotx contacts tags list email:user@example.com
Use a test Contact before running commands on real customer data.