Was this page helpful?
Attribution AI CLI provides terminal-native access to the MCP tool surface with stable, scriptable output.
Use it for CI jobs, scheduled analysis, and repeatable investigations where deterministic output matters.
The CLI is scoped to read and analysis workflows. Workspace changes, campaign activation, and other mutating actions stay in dashboard approval flows. Direct MCP clients need the separate mcp:write scope for write tools.
npm install -g attribution-ai
# Service account (recommended for automation) attribution auth login --service-key atai_svc_xxx # Browser OAuth (human users) attribution auth login # Verify auth context attribution auth whoami attribution auth validate --require-scope mcp:tools
attribution auth ... # auth workflows attribution workspace ... # workspace profile attribution tools ... # tool discovery + direct call attribution data ... # query workflows attribution jobs ... # async lifecycle attribution schema ... # machine-readable CLI contracts attribution doctor # diagnostics
# Sync query
attribution data query --tool performance --args '{"start_date":"2026-02-01","end_date":"2026-02-18"}'
# Async query (returns job_id)
attribution data query --tool campaigns --mode async
# Async query and wait
attribution data query --tool campaigns --mode async --waitattribution jobs submit --tool performance --args-file ./args.json attribution jobs status --id job_123 attribution jobs wait --id job_123 attribution jobs result --id job_123
Use --strict-json for the canonical envelope contract and deterministic parsing. This mode is recommended for agents and CI.
attribution data query --tool trends --strict-json attribution data query --tool performance --request-timeout 60 --strict-json attribution schema contract --strict-json attribution schema errors --strict-json
Compatibility
--json and --csv flags still work. Preferred long-term machine interface: --strict-json. Use --request-timeout for API request timeouts; async wait commands use their own --timeout.attribution schema commands attribution schema tool --name performance attribution schema errors attribution schema migrate
attribution doctor