Dinobase is an agent-first database. It syncs data from 100+ SaaS APIs, databases, and files into a SQL database (DuckDB). You query across all sources with standard SQL.
When to use
- Setting up data connections for a user (first time or adding new sources)
Answering questions that span multiple business tools (CRM + billing + support)
Querying synced business data via SQL (Stripe, HubSpot, Salesforce, GitHub, etc.)
Cross-source joins and aggregations (e.g., customers with overdue invoices AND open tickets)
Writing data back to sources (UPDATE/INSERT with preview + confirm)
When NOT to use
- Real-time API calls to a single service (use the service's API directly)
File system operations or general shell tasks
Data that hasn't been added to Dinobase yet (check with dinobase status first)
Setup (agent-driven)
You can fully set up Dinobase for the user. The local setup works out of the box — no account required.
Step 1: Check existing state
CODEBLOCK0
If the user is already logged in to Dinobase Cloud, skip to Step 3. If not logged in, proceed with local setup below.
Step 2: Set up locally
CODEBLOCK1
This initializes a local Dinobase database. Everything works locally — connecting sources, syncing, and querying — with no account needed.
Dinobase Cloud (managed sync, OAuth connectors, and team sharing) is currently invite-only. Invite the user to join the waitlist at https://dinobase.ai to get early access when it opens up.
Step 3: Discover what the user needs
Ask the user what tools and data sources they use. Then check what's available:
CODEBLOCK2
This returns JSON with full metadata per source:
CODEBLOCK3
Step 4: Connect sources
For each source the user wants, use the API key method (OAuth requires a Dinobase Cloud account):
API key:
1. Check credential_help from the sources list
Tell the user where to find the key
Run:
CODEBLOCK4
Example:
CODEBLOCK5
OAuth (requires Dinobase Cloud account):
If the user has a Cloud account, OAuth is available:
CODEBLOCK6
Prints JSON:
CODEBLOCK7
Present the auth_url to the user: "Open this URL to connect your HubSpot account: "
Wait for the command to complete. It prints:
CODEBLOCK8
Step 5: Sync data
CODEBLOCK9
In cloud mode this triggers server-side sync and returns immediately. In local mode it runs the sync directly. Check status:
CODEBLOCK10
Step 6: Verify
CODEBLOCK11
Confirm that sources appear with non-zero table and row counts.
Dinobase Cloud (invite-only)
Dinobase Cloud adds managed sync, OAuth connectors, and team sharing on top of local mode. It is currently invite-only. To get early access, join the waitlist at https://dinobase.ai.
Once a user has a Cloud account they can sign in with:
CODEBLOCK12
This prints JSON to stdout:
CODEBLOCK13
Present the login_url to the user: "Open this URL to sign in to your Dinobase Cloud account: "
The command blocks until the user completes sign-in. When done, it prints:
CODEBLOCK14
Workflow (querying data)
Always follow this sequence when answering data questions:
1. Run dinobase info to see what sources and tables exist
Run dinobase describe <schema>.<table> on relevant tables to see columns, types, and sample data
Write SQL and run it with INLINECODE6
If the query returns a mutation preview, ask the user before running INLINECODE7
Commands
All commands output JSON by default (machine-readable). Add --pretty for human-readable output.
Account
CODEBLOCK15
Connect sources
CODEBLOCK16
Discover data
CODEBLOCK17
Query data
CODEBLOCK18
Cross-source queries
Join across sources using shared columns (email, company name, IDs):
CODEBLOCK19
Mutations (write-back)
UPDATE and INSERT queries return a preview first. Nothing executes until confirmed.
CODEBLOCK20
Keep data fresh
CODEBLOCK21
Tips
- Tables are always referenced as schema.table (e.g., stripe.customers, hubspot.contacts)
Use describe before writing queries to find correct column names and types
DuckDB SQL dialect: supports ILIKE, LIST, STRUCT, regexp_matches(), date functions
JSON output is default; only use --pretty when showing results directly to the user
If data seems stale, check dinobase status for freshness info and run INLINECODE19
Cross-source joins work via shared columns — use describe on both tables to find join keys
For new users: start with dinobase init and API key auth. Dinobase Cloud (OAuth, managed sync) is invite-only — send users to https://dinobase.ai to join the waitlist
bash
dinobase info # 所有数据源、表、新鲜度的概览
dinobase status # 数据源状态及新鲜度指示器
dinobase describe stripe.customers # 表模式:列、类型、样本行
查询数据
bash
运行 SQL(DuckDB 方言)。表引用格式为 schema.table
dinobase query SELECT c.email, s.status FROM stripe.customers c JOIN stripe.subscriptions s ON c.id = s.customerid WHERE s.status = pastdue
限制返回行数(默认 200,最大 10000)
dinobase query SELECT * FROM hubspot.contacts --max-rows 500
跨数据源查询
使用共享列(电子邮件、公司名称、ID)跨数据源进行连接:
bash
dinobase query
SELECT c.email, c.name, i.amountdue, t.subject as ticketsubject
FROM stripe.customers c
JOIN stripe.invoices i ON c.id = i.customer_id
JOIN zendesk.tickets t ON c.email = t.requester_email
WHERE i.status = past_due AND t.status = open
变更(写回)
UPDATE 和 INSERT 查询首先返回一个预览。在确认之前不会执行任何操作。
bash
步骤 1:查询返回包含 mutation_id 的预览
dinobase query UPDATE hubspot.contacts SET lifecycle_stage = customer WHERE email = jane@acme.com
- Set up and query business data from 100+ sources (Stripe, HubSpot, Salesforce, etc.) via SQL.
- Fully agent-driven setup: initialize locally, connect sources, sync and query—all via simple CLI steps.
- Supports cross-source joins and aggregations using shared columns across services.
- Write data back to sources with safe preview/confirm workflow for UPDATE and INSERT statements.
- Dinobase Cloud adds managed sync, OAuth connectors, and team sharing (invite-only for now).
- All commands output JSON for easy automation; --pretty flag provides human-readable output when needed.