Skip to main content

Installation

This installs both the CLI and the Python SDK (Python 3.9 or later). The CLI and SDK work on the Build, Scale and Enterprise plans. On the free trial, use the app or the MCP server.
If your shell says databar: command not found, pip installed the command into a folder that is not on your PATH (on macOS often ~/Library/Python/3.x/bin). Run databar onboard from that folder, or add the folder to your PATH. databar onboard is an interactive setup wizard that signs you in and fixes the PATH for you.

Authentication

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 Python SDK does not read ~/.databar/config. If you signed in with databar login and also use the SDK, set DATABAR_API_KEY or pass api_key= to DatabarClient.

Output formats

Most commands support --format with three options. These commands print plain text only and have no --format: table clear, workbook rename, workbook add-table, workbook merge, workbook delete, trash restore, trash purge and task cancel. --format json always prints one object on stdout:
Read the payload from .data. On failure, check .error.code and the exit code: table <uuid> and task <task-id> must be UUIDs (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). Malformed identifiers fail client-side with exit 5 / code: validation (not a 404). --out paths are resolved; null bytes are rejected; a note is printed if the path leaves the current directory.

Enrichments


Waterfalls


Flows

The CLI runs and rolls back flows. To create or edit a flow, use the app, the MCP server, the Python SDK or the REST API.

Tables


Workbooks

A workbook is the document that owns one or more tables (sheets).

Trash

Deleted workbooks and tables stay in Trash for 30 days.

Tasks

For long-running operations, tasks can be checked manually or polled until completion:

AI agent usage

The CLI is designed to be invoked by AI agents (Claude Code, Cursor, etc.) with --format json for machine-readable output. Start an agent with databar agent-guide, which prints the full SDK and CLI reference written for agents:
Exit codes: 0 on success; 2 usage, 3 auth, 4 not found, 5 validation, 1 other. With --format json, both success and failure are one JSON object on stdout (ok / data or error). Table and task identifiers must be UUIDs — malformed values fail with validation (exit 5), not a 404.

Environment variables


Source code

databar-ai/databar-python

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