CLI Reference
Complete command reference for the rq CLI.
Global flags
These flags are available on every command.
| Flag | Description |
|---|---|
-f, --format | Output format: table, json, csv (default: table) |
-w, --workspace | Workspace ID or name (overrides config) |
--limit | Max rows to display (default: 50) |
--no-truncate | Show all rows without truncation |
--config | Config file path (default: ~/.rawquery/config.json) |
rq signup
Create a new account from the terminal. Prompts for email and password, creates the account, generates an API key, and auto-creates a workspace.
rq signuprq signuprq login
Authenticate with rawquery. Opens a browser for interactive login, or accepts a token directly for CI/scripts.
rq login # Opens browserrq login --token rq_xxx # Token-based (CI/scripts)rq login # Opens browserrq login --token rq_xxx # Token-based (CI/scripts)rq logout
Clear stored credentials and config.
rq logoutrq logoutrq whoami
Show the currently authenticated user, workspace, and API endpoint.
rq whoamirq whoamirq status
Overview of your workspace: connections with last sync status, table count, and quota usage.
rq statusrq status -f jsonrq statusrq status -f jsonrq query
Execute a SQL query against your workspace.
rq query "SELECT * FROM my_stripe.customers LIMIT 10"rq query -f json "SELECT count(*) FROM events"rq query -f csv "SELECT * FROM prod_db.users" > users.csvrq query "SELECT * FROM my_stripe.customers LIMIT 10"rq query -f json "SELECT count(*) FROM events"rq query -f csv "SELECT * FROM prod_db.users" > users.csvrq jobs
Submit and monitor async query jobs. Use for long-running queries.
rq jobs submit "SELECT * FROM huge_table" # returns job IDrq jobs status <job-id> # check progressrq jobs wait <job-id> # block until completerq jobs cancel <job-id> # cancel pending jobrq jobs submit "SELECT * FROM huge_table" # returns job IDrq jobs status <job-id> # check progressrq jobs wait <job-id> # block until completerq jobs cancel <job-id> # cancel pending jobrq tables
List all tables in your workspace.
rq tablesrq tables -f jsonrq tablesrq tables -f jsonrq schemas
List schemas with table counts.
rq schemasrq schemas -f jsonrq schemasrq schemas -f jsonrq tables describe
Show schema and metadata for a table.
rq tables describe my_stripe.customersrq tables describe my_stripe.customers -f jsonrq tables describe my_stripe.customersrq tables describe my_stripe.customers -f jsonrq tables drop
Drop an Iceberg table. Irreversible. Prompts for confirmation.
rq tables drop my_stripe.customersrq tables drop my_stripe.customersrq connections
List and manage data source connections.
rq connections # list allrq connections -f jsonrq connections # list allrq connections -f jsonrq connections create
Create a new connection with built-in connector types.
rq connections create <name> --type <type> -p key=value [-p key=value ...]
# Examples:rq connections create my-db --type postgres \ -p host=db.example.com -p database=mydb -p user=admin -p password=secret
rq connections create my-stripe --type stripe -p api_key=sk_live_xxxrq connections create <name> --type <type> -p key=value [-p key=value ...]
# Examples:rq connections create my-db --type postgres \ -p host=db.example.com -p database=mydb -p user=admin -p password=secret
rq connections create my-stripe --type stripe -p api_key=sk_live_xxxTypes: postgres, mysql, stripe, hubspot, salesforce, shopify, google_sheets.
For custom HTTP/GraphQL APIs, use rq connect instead.
rq connections sync
Trigger a sync. Blocks until complete, shows per-stream results.
rq connections sync <name>rq connections sync my-stripe --mode full_refreshrq connections sync <name>rq connections sync my-stripe --mode full_refreshrq connections update
Update schedule, query mode, sync modes, or HTTP connector spec.
rq connections update <name> --schedule dailyrq connections update <name> --schedule "0 14 * * *" # daily at 14:00 UTCrq connections update <name> --schedule "" # clear schedule (back to manual)rq connections update <name> --query-mode liverq connections update <name> --sync-mode customers:incremental_deduperq connections update <name> --sync-mode charges:window:30rq connections update <name> --spec updated-spec.jsonrq connections update <name> --schedule dailyrq connections update <name> --schedule "0 14 * * *" # daily at 14:00 UTCrq connections update <name> --schedule "" # clear schedule (back to manual)rq connections update <name> --query-mode liverq connections update <name> --sync-mode customers:incremental_deduperq connections update <name> --sync-mode charges:window:30rq connections update <name> --spec updated-spec.jsonSync mode overrides persist on the connection and apply to both manual and scheduled syncs. Valid modes: full_refresh, incremental, incremental_dedupe, window, window:N.
rq connections test
Test a connection's credentials and network access.
rq connections test my-dbrq connections test my-dbrq connections status
Show per-stream sync status for a connection.
rq connections status my-striperq connections status my-stripe -f jsonrq connections status my-striperq connections status my-stripe -f jsonrq connections preview
Preview first rows from a stream before syncing.
rq connections preview my-db --stream usersrq connections preview my-db --stream usersrq connections delete
Delete a connection. Prompts for confirmation.
rq connections delete my-dbrq connections delete my-dbrq connections types
List available connector types and their configuration status.
rq connections typesrq connections typesrq connections jobs
List recent sync jobs across all connections.
rq connections jobsrq connections jobs -f jsonrq connections jobsrq connections jobs -f jsonrq connect
Create an HTTP/GraphQL connector from a declarative JSON spec. See the Custom Connectors guide for the spec format.
| Flag | Description |
|---|---|
--spec | Path to connector spec JSON file (required) |
--auth-token | API key or bearer token |
--auth-user | Username for basic auth |
--auth-pass | Password for basic auth |
--access-token | OAuth2 access token |
--refresh-token | OAuth2 refresh token |
--client-id | OAuth2 client ID |
--client-secret | OAuth2 client secret |
--schedule | Sync schedule (hourly, daily, weekly, or cron) |
# API key / bearerrq connect umami --spec umami.json --auth-token $TOKEN --schedule daily
# Basic authrq connect internal --spec api.json --auth-user admin --auth-pass $PASS
# OAuth2rq connect hubspot --spec hubspot.json \ --access-token $AT --refresh-token $RT \ --client-id $CID --client-secret $CS# API key / bearerrq connect umami --spec umami.json --auth-token $TOKEN --schedule daily
# Basic authrq connect internal --spec api.json --auth-user admin --auth-pass $PASS
# OAuth2rq connect hubspot --spec hubspot.json \ --access-token $AT --refresh-token $RT \ --client-id $CID --client-secret $CSrq push
Push JSON, JSONL, CSV, or Parquet data into an Iceberg table. See the Push Data guide for details.
Parquet uses a streaming upload path (up to 2 GB per request) and preserves
types exactly — the right format for migrations or df.to_parquet() handoffs.
Other formats are sent as chunked JSON batches.
| Flag | Description |
|---|---|
--table, -t | Target table in schema.name format (required) |
--file | Path to data file (omit for stdin; required for Parquet) |
--pk | Primary key column(s) — text formats only |
--input-format | Input format: json, jsonl, csv, parquet (auto-detected from extension) |
--mode | Write mode: append (default) or overwrite |
rq push --table crm.contacts --file data.json --pk idrq push --table raw.events --file events.jsonlrq push --table imports.q4 --file export.csv --mode overwriterq push --table raw.migration --file dump.parquetcat data.json | rq push --table raw.stuff --input-format jsonrq push --table crm.contacts --file data.json --pk idrq push --table raw.events --file events.jsonlrq push --table imports.q4 --file export.csv --mode overwriterq push --table raw.migration --file dump.parquetcat data.json | rq push --table raw.stuff --input-format jsonrq transforms
Manage SQL transforms. Transforms form a DAG and can reference each other
via {{ ref('name') }}.
rq transforms # list allrq transforms show <name> # view definitionrq transforms -f jsonrq transforms # list allrq transforms show <name> # view definitionrq transforms -f jsonrq transforms create
rq transforms create mrr --sql "SELECT sum(amount) FROM my_stripe.invoices"rq transforms create mrr --file mrr.sql --schedule "0 * * * *"rq transforms create deduped --sql "..." --materialization incremental --unique-key idrq transforms create mrr --sql "SELECT sum(amount) FROM my_stripe.invoices"rq transforms create mrr --file mrr.sql --schedule "0 * * * *"rq transforms create deduped --sql "..." --materialization incremental --unique-key idName is positional. Flags: --sql or --file, --schedule, --materialization (table, incremental, view), --unique-key.
rq transforms update
rq transforms update <name> --sql "SELECT ..."rq transforms update <name> --schedule "0 */2 * * *"rq transforms update <name> --sql "SELECT ..."rq transforms update <name> --schedule "0 */2 * * *"rq transforms delete
rq transforms delete <name> # prompts for confirmationrq transforms delete <name> # prompts for confirmationrq transforms run
rq transforms run <name> # run single transformrq transforms run --all # run all in dependency orderrq transforms run <name> # run single transformrq transforms run --all # run all in dependency orderrq transforms dag
Show the dependency graph.
rq transforms dagrq transforms dagrq transforms runs
Show run history for a transform.
rq transforms runs <name>rq transforms runs <name>rq queries
Manage saved queries. Saved queries can be called via the Execute API with parameters.
rq queries # list allrq queries show <name> # view SQL + parametersrq queries -f jsonrq queries # list allrq queries show <name> # view SQL + parametersrq queries -f jsonrq queries run
rq queries run <name>rq queries run <name> --param status=paid --param limit=10rq queries run <name> -f csv > out.csvrq queries run <name>rq queries run <name> --param status=paid --param limit=10rq queries run <name> -f csv > out.csvrq queries create
rq queries create <name> --sql "SELECT ..." --description "Monthly revenue"rq queries create <name> --file query.sqlrq queries create <name> --sql "SELECT ..." --description "Monthly revenue"rq queries create <name> --file query.sqlrq queries delete
rq queries delete <name>rq queries delete <name>rq charts
Manage charts backed by saved queries.
rq charts # list allrq charts show <name> # view chart configrq charts -f jsonrq charts # list allrq charts show <name> # view chart configrq charts -f jsonrq charts create
rq charts create <name> --query <saved-query> --type <chart-type> [flags]
# Examples:rq charts create revenue --query monthly-revenue --type bar --x month --y amountrq charts create kpi --query total-users --type number --value count --title "Total Users"rq charts create <name> --query <saved-query> --type <chart-type> [flags]
# Examples:rq charts create revenue --query monthly-revenue --type bar --x month --y amountrq charts create kpi --query total-users --type number --value count --title "Total Users"Types: bar, line, area, number, table, pie, scatter, horizontal_bar.
rq charts update
rq charts update <name> --type line --title "Revenue Trend"rq charts update <name> --type line --title "Revenue Trend"rq charts publish / unpublish
rq charts publish <name> # get a public URLrq charts publish <name> --password s3cr3trq charts unpublish <name>rq charts publish <name> # get a public URLrq charts publish <name> --password s3cr3trq charts unpublish <name>rq charts delete
rq charts delete <name>rq charts delete <name> --force # delete even if referenced by pagesrq charts delete <name>rq charts delete <name> --force # delete even if referenced by pagesrq pages
Manage dashboard pages (grids of charts).
rq pages # list allrq pages show <name>rq pages -f jsonrq pages # list allrq pages show <name>rq pages -f jsonrq pages create
rq pages create <name> --charts <chart1,chart2:span,chart3> [flags]
# Examples:rq pages create overview --charts revenue:3,churn,signups --columns 3 --title "KPIs"rq pages create dash --charts mrr,users --refresh 300rq pages create <name> --charts <chart1,chart2:span,chart3> [flags]
# Examples:rq pages create overview --charts revenue:3,churn,signups --columns 3 --title "KPIs"rq pages create dash --charts mrr,users --refresh 300rq pages update
rq pages update <name> --charts mrr:2,churn --columns 2rq pages update <name> --title "New Title" --refresh 600rq pages update <name> --charts mrr:2,churn --columns 2rq pages update <name> --title "New Title" --refresh 600rq pages publish / unpublish
rq pages publish <name>rq pages publish <name> --password s3cr3trq pages unpublish <name>rq pages publish <name>rq pages publish <name> --password s3cr3trq pages unpublish <name>rq pages delete
rq pages delete <name>rq pages delete <name>rq embed
Embed text columns in a table using vector embeddings. Runs as an async job.
rq embed <source-table> --column <text-column> [flags]
# Examples:rq embed crm.contacts --column descriptionrq embed crm.contacts --column first_name --column notes --output crm.contacts_embeddedrq embed raw.articles --column body --batch-size 100rq embed <source-table> --column <text-column> [flags]
# Examples:rq embed crm.contacts --column descriptionrq embed crm.contacts --column first_name --column notes --output crm.contacts_embeddedrq embed raw.articles --column body --batch-size 100| Flag | Description |
|---|---|
--column | Text column(s) to embed (required, repeatable) |
--output | Output table name (default: {source}_embedded) |
--batch-size | Batch size for embedding API calls (default: 200) |
rq searches
Manage semantic search configurations.
rq searches # list allrq searches show <name>rq searches -f jsonrq searches # list allrq searches show <name>rq searches -f jsonrq searches create
rq searches create <name> --table <source-table> --column <text-column> [flags]
# Examples:rq searches create product-search --table shop.products --column descriptionrq searches create kb --table docs.articles --column body --display title,url --limit 5rq searches create <name> --table <source-table> --column <text-column> [flags]
# Examples:rq searches create product-search --table shop.products --column descriptionrq searches create kb --table docs.articles --column body --display title,url --limit 5| Flag | Description |
|---|---|
--table | Source table (required) |
--column | Text column to search (required) |
--display | Columns to show in results (comma-separated) |
--title | Display title |
--limit | Default result limit (default: 10) |
rq searches publish / unpublish
rq searches publish <name>rq searches publish <name> --password s3cr3trq searches unpublish <name>rq searches publish <name>rq searches publish <name> --password s3cr3trq searches unpublish <name>rq searches delete
rq searches delete <name>rq searches delete <name>rq search
Run a semantic search against a search configuration.
rq search <name> <text>
# Examples:rq search product-search "wireless headphones"rq search knowledge-base "refund policy" -f jsonrq search <name> <text>
# Examples:rq search product-search "wireless headphones"rq search knowledge-base "refund policy" -f jsonrq export
Export Iceberg table data as presigned S3 URLs. Use to migrate data to Databricks, Snowflake, or any Iceberg-compatible system.
rq export <schema.table>rq export stripe.customers -f jsonrq export stripe.customers --download ./export/rq export --allrq export --all --download ./full-backup/rq export <schema.table>rq export stripe.customers -f jsonrq export stripe.customers --download ./export/rq export --allrq export --all --download ./full-backup/| Flag | Description |
|---|---|
--all | Export all tables in the workspace |
--download | Download files to this directory |
rq usage
Show workspace usage for the current billing period (query count, storage, cost).
rq usagerq usage -f jsonrq usagerq usage -f jsonrq api-keys
List and manage API keys.
rq api-keys # list all keysrq api-keys create <name> # create a new keyrq api-keys revoke <key-id> # revoke a keyrq api-keys revoke <key-id> -y # revoke without confirmationrq api-keys # list all keysrq api-keys create <name> # create a new keyrq api-keys revoke <key-id> # revoke a keyrq api-keys revoke <key-id> -y # revoke without confirmationrq open
Open the rawquery dashboard in your browser.
rq openrq openrq config
Show or update configuration.
rq config # show current configrq config set endpoint <url> # set API endpointrq config set workspace <slug> # set default workspacerq config set format <format> # set default output formatrq config # show current configrq config set endpoint <url> # set API endpointrq config set workspace <slug> # set default workspacerq config set format <format> # set default output formatrq update
Download and install the latest CLI version.
rq updaterq updaterq claude-init
Set up Claude Code integration. Creates a skill file so Claude Code can query your data, explore tables, and manage connections.
rq claude-initrq claude-initrq codex-init
Set up Codex integration. Creates a repo-local skill in .agents/skills/rq/ so Codex can
query your data, explore tables, and manage connections through rq.
rq codex-initrq codex-initrq completion
Generate shell completion scripts.
# Basheval "$(rq completion bash)"
# Zsheval "$(rq completion zsh)"
# Fishrq completion fish | source# Basheval "$(rq completion bash)"
# Zsheval "$(rq completion zsh)"
# Fishrq completion fish | sourcerq version
Print the CLI version.
rq versionrq versionNeed help? Email us at hello@rawquery.dev.