Skip to content

Command line

The chatbot-audit CLI is installed automatically. Three commands cover the common workflows.

chatbot-audit version

chatbot-audit version

Prints the version, copyright, and license.


chatbot-audit analyze <path>

Analyze conversations from a local file. The adapter is chosen by file extension:

Extension Adapter
.json, .jsonl JSONAdapter
.csv CSVAdapter
.tsv CSVAdapter with tab delimiter

Options

Flag Default Description
--json off Emit detections as JSON to stdout instead of human-readable text

Exit codes

Code Meaning
0 No detections — conversation looked clean
1 At least one detection was produced
2 Input error (missing file, bad format, unsupported extension)

Examples

# Human-readable output
chatbot-audit analyze conversations.json

# Machine-readable (pipe into jq, save to file, etc.)
chatbot-audit analyze conversations.csv --json | jq '.[] | select(.severity == "critical")'

# Use in CI to fail the build if any critical detection appears
chatbot-audit analyze sample.jsonl --json \
  | jq -e '[.[] | select(.severity == "critical")] | length == 0'

chatbot-audit analyze-intercom

Pull conversations directly from Intercom and audit them. Requires the [intercom] extra.

Options

Flag Env var Description
--token INTERCOM_ACCESS_TOKEN Intercom access token
--limit Cap total conversations fetched
--json JSON output

Example

export INTERCOM_ACCESS_TOKEN="dG9rZW4tdmFsdWU..."
chatbot-audit analyze-intercom --limit 200

See the Intercom tutorial for a full walkthrough.


chatbot-audit analyze-zendesk

Pull tickets from Zendesk and audit them. Requires the [zendesk] extra.

Options

Flag Env var Description
--subdomain ZENDESK_SUBDOMAIN Subdomain (e.g. mycompany for mycompany.zendesk.com)
--bot-ids Comma-separated user IDs to map to Role.BOT
--limit Cap total tickets fetched
--json JSON output

Authentication is resolved from the environment in this order:

  1. ZENDESK_OAUTH_TOKEN → used as bearer token
  2. ZENDESK_EMAIL + ZENDESK_API_TOKEN → basic auth

Example

export ZENDESK_SUBDOMAIN=mycompany
export ZENDESK_EMAIL=admin@mycompany.com
export ZENDESK_API_TOKEN="xxxxx..."

chatbot-audit analyze-zendesk --bot-ids 555,777 --limit 100