# Save your API key (prompted securely)databar login# Or pass it directlydatabar login --api-key your-key-here# Verify your keydatabar whoami
Your key is saved to ~/.databar/config with 600 permissions (owner read-only).You can also set the DATABAR_API_KEY environment variable — it takes priority over the config file:
The CLI is designed to be invoked by AI agents (Claude Code, Cursor, etc.) with --format json for machine-readable output:
# Self-discovery — agent finds the right enrichmentdatabar enrich list --format json | jq '.[] | select(.name | test("linkedin"; "i"))'# Get parameters for an enrichmentdatabar enrich get 123 --format json# Run and get structured resultdatabar enrich run 123 --params '{"email": "alice@example.com"}' --format json# Full table pipelinedatabar table rows <uuid> --format json | jq '.[].email'
Exit codes follow Unix conventions — 0 on success, non-zero on error. Errors are written to stderr; data is written to stdout, so piping always works cleanly.