datafrey with no subcommand runs datafrey login.
Global flags
| Flag | Description |
|---|---|
--version, -v | Print the installed version and exit |
--help | Show help for any command |
datafrey login
Authenticate via browser and continue into database connection.
| Option | Description |
|---|---|
--no-browser | Don’t open the browser automatically — print the device code URL instead |
- Runs the OAuth device flow (WorkOS). Opens a browser by default.
- Stores access and refresh tokens in your OS keyring.
- Calls
datafrey db connectto connect a database.
login asks whether to re-authenticate.
datafrey logout
Remove stored credentials from the keyring.
datafrey status
Show authentication, database, and index status. If indexing is in progress, the output streams live until it completes.
| Option | Description |
|---|---|
--json | Output as JSON |
datafrey db
Manage your database connection. DataFrey supports one database per account.
datafrey db connect
Connect a database interactively.
- Provider selection (currently Snowflake).
- Auth method (PAT).
- Database and warehouse names.
- Setup SQL — generated with your values, shown for you to run in Snowflake.
- Credential collection and client-side encryption.
- Connection test (async).
- On success, offers to build the index.
- On success, runs the interactive client setup menu.
datafrey db drop first.
datafrey db list
List the connected database and its status.
| Option | Description |
|---|---|
--json | Output as JSON |
| Status | Meaning |
|---|---|
connected | Connection verified successfully |
loading | Connection test in progress |
error | Connection test failed — check credentials |
datafrey db drop
Remove the connected database.
| Option | Description |
|---|---|
--yes, -y | Skip the confirmation prompt |
datafrey index
Manage the database schema index used by the plan tool.
datafrey index
Sync the index. With no subcommand, datafrey index triggers a rebuild.
datafrey status to check progress.
Run this after onboarding and whenever your schema changes. Planning is unavailable until the index is built. See Planning for details.
datafrey index drop
Drop the schema index (hard reset).
| Option | Description |
|---|---|
--yes, -y | Skip the confirmation prompt |
datafrey index. Use this if you want to opt out of indexing entirely — see Security — Controls for sensitive data.
datafrey client
Configure an AI client to use DataFrey.
- Claude Code — runs
claude plugin marketplace add datafrey-ai/datafreyfollowed byclaude plugin install datafrey@datafrey. - Cursor — opens a
cursor://install deeplink that registers the DataFrey MCP server. - MCP (Custom) — prints the JSON config block and copies it to your clipboard for manual paste.
datafrey doctor
Diagnose your environment.
- Python version (≥3.13).
- CLI version.
- OS keyring backend availability.
- Authentication state.
- Number of connected databases.
- If auth fails: API reachability via
DATAFREY_API_URL.
Environment variables
| Variable | Description |
|---|---|
DATAFREY_API_URL | Override the API base URL. Default: https://api.datafrey.ai/manage/v1. Use with a local or staging instance. |
DATAFREY_TOKEN | Provide an access token directly, bypassing keyring lookup. Useful in CI or scripted environments. |