Skip to main content

Installation

pip install databar
After installing, the databar command is available in your terminal.
databar --help
databar --version

Authentication

# Save your API key (prompted securely)
databar login

# Or pass it directly
databar login --api-key your-key-here

# Verify your key
databar 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:
export DATABAR_API_KEY=your-key-here

Output formats

Every command supports --format with three options:
FlagOutputBest for
--format tableRich terminal table (default)Human viewing
--format jsonRaw JSON to stdoutPiping, scripting, AI agents
--format csvCSV to stdout or --out file.csvSpreadsheets, data pipelines
# Pipe JSON output to jq
databar enrich list --format json | jq '.[].name'

# Save rows to CSV
databar table rows <uuid> --format csv --out rows.csv

Enrichments

databar enrich list
databar enrich list --query "linkedin"
databar enrich list --format json

Waterfalls

databar waterfall list
databar waterfall list --query "email"
databar waterfall list --format json

Tables

databar table list
databar table list --format json

# Create empty table
databar table create --name "My Leads"

# Create with predefined columns
databar table create --name "My Leads" --columns "email,name,company,linkedin_url"

Tasks

For long-running operations, tasks can be checked manually or polled until completion:
databar task get <task-id>
databar task get <task-id> --format json

AI agent usage

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 enrichment
databar enrich list --format json | jq '.[] | select(.name | test("linkedin"; "i"))'

# Get parameters for an enrichment
databar enrich get 123 --format json

# Run and get structured result
databar enrich run 123 --params '{"email": "alice@example.com"}' --format json

# Full table pipeline
databar 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.

Environment variables

VariableDescription
DATABAR_API_KEYYour Databar API key. Takes priority over ~/.databar/config.

Source code

databar-ai/databar-python

The CLI is open source. View source, report issues, and contribute on GitHub.