No credit cardStart free

CLI Reference

Complete command reference for the rq CLI.

Global flags

These flags are available on every command.

FlagDescription
-f, --formatOutput format: table, json, csv (default: table)
-w, --workspaceWorkspace ID or name (overrides config)
--limitMax rows to display (default: 50)
--no-truncateShow all rows without truncation
--configConfig 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.

bash
rq signup

rq login

Authenticate with rawquery. Opens a browser for interactive login, or accepts a token directly for CI/scripts.

bash
rq login # Opens browser
rq login --token rq_xxx # Token-based (CI/scripts)

rq logout

Clear stored credentials and config.

bash
rq logout

rq whoami

Show the currently authenticated user, workspace, and API endpoint.

bash
rq whoami

rq status

Overview of your workspace: connections with last sync status, table count, and quota usage.

bash
rq status
rq status -f json

rq query

Execute a SQL query against your workspace.

bash
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.csv

rq jobs

Submit and monitor async query jobs. Use for long-running queries.

bash
rq jobs submit "SELECT * FROM huge_table" # returns job ID
rq jobs status <job-id> # check progress
rq jobs wait <job-id> # block until complete
rq jobs cancel <job-id> # cancel pending job

rq tables

List all tables in your workspace.

bash
rq tables
rq tables -f json

rq schemas

List schemas with table counts.

bash
rq schemas
rq schemas -f json

rq tables describe

Show schema and metadata for a table.

bash
rq tables describe my_stripe.customers
rq tables describe my_stripe.customers -f json

rq tables drop

Drop an Iceberg table. Irreversible. Prompts for confirmation.

bash
rq tables drop my_stripe.customers

rq connections

List and manage data source connections.

bash
rq connections # list all
rq connections -f json

rq connections create

Create a new connection with built-in connector types.

bash
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_xxx

Types: 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.

bash
rq connections sync <name>
rq connections sync my-stripe --mode full_refresh

rq connections update

Update schedule, query mode, sync modes, or HTTP connector spec.

bash
rq connections update <name> --schedule daily
rq connections update <name> --schedule "0 14 * * *" # daily at 14:00 UTC
rq connections update <name> --schedule "" # clear schedule (back to manual)
rq connections update <name> --query-mode live
rq connections update <name> --sync-mode customers:incremental_dedupe
rq connections update <name> --sync-mode charges:window:30
rq connections update <name> --spec updated-spec.json

Sync 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.

bash
rq connections test my-db

rq connections status

Show per-stream sync status for a connection.

bash
rq connections status my-stripe
rq connections status my-stripe -f json

rq connections preview

Preview first rows from a stream before syncing.

bash
rq connections preview my-db --stream users

rq connections delete

Delete a connection. Prompts for confirmation.

bash
rq connections delete my-db

rq connections types

List available connector types and their configuration status.

bash
rq connections types

rq connections jobs

List recent sync jobs across all connections.

bash
rq connections jobs
rq connections jobs -f json

rq connect

Create an HTTP/GraphQL connector from a declarative JSON spec. See the Custom Connectors guide for the spec format.

FlagDescription
--specPath to connector spec JSON file (required)
--auth-tokenAPI key or bearer token
--auth-userUsername for basic auth
--auth-passPassword for basic auth
--access-tokenOAuth2 access token
--refresh-tokenOAuth2 refresh token
--client-idOAuth2 client ID
--client-secretOAuth2 client secret
--scheduleSync schedule (hourly, daily, weekly, or cron)
bash
# API key / bearer
rq connect umami --spec umami.json --auth-token $TOKEN --schedule daily
# Basic auth
rq connect internal --spec api.json --auth-user admin --auth-pass $PASS
# OAuth2
rq connect hubspot --spec hubspot.json \
--access-token $AT --refresh-token $RT \
--client-id $CID --client-secret $CS

rq 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.

FlagDescription
--table, -tTarget table in schema.name format (required)
--filePath to data file (omit for stdin; required for Parquet)
--pkPrimary key column(s) — text formats only
--input-formatInput format: json, jsonl, csv, parquet (auto-detected from extension)
--modeWrite mode: append (default) or overwrite
bash
rq push --table crm.contacts --file data.json --pk id
rq push --table raw.events --file events.jsonl
rq push --table imports.q4 --file export.csv --mode overwrite
rq push --table raw.migration --file dump.parquet
cat data.json | rq push --table raw.stuff --input-format json

rq transforms

Manage SQL transforms. Transforms form a DAG and can reference each other via {{ ref('name') }}.

bash
rq transforms # list all
rq transforms show <name> # view definition
rq transforms -f json

rq transforms create

bash
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 id

Name is positional. Flags: --sql or --file, --schedule, --materialization (table, incremental, view), --unique-key.

rq transforms update

bash
rq transforms update <name> --sql "SELECT ..."
rq transforms update <name> --schedule "0 */2 * * *"

rq transforms delete

bash
rq transforms delete <name> # prompts for confirmation

rq transforms run

bash
rq transforms run <name> # run single transform
rq transforms run --all # run all in dependency order

rq transforms dag

Show the dependency graph.

bash
rq transforms dag

rq transforms runs

Show run history for a transform.

bash
rq transforms runs <name>

rq queries

Manage saved queries. Saved queries can be called via the Execute API with parameters.

bash
rq queries # list all
rq queries show <name> # view SQL + parameters
rq queries -f json

rq queries run

bash
rq queries run <name>
rq queries run <name> --param status=paid --param limit=10
rq queries run <name> -f csv > out.csv

rq queries create

bash
rq queries create <name> --sql "SELECT ..." --description "Monthly revenue"
rq queries create <name> --file query.sql

rq queries delete

bash
rq queries delete <name>

rq charts

Manage charts backed by saved queries.

bash
rq charts # list all
rq charts show <name> # view chart config
rq charts -f json

rq charts create

bash
rq charts create <name> --query <saved-query> --type <chart-type> [flags]
# Examples:
rq charts create revenue --query monthly-revenue --type bar --x month --y amount
rq 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

bash
rq charts update <name> --type line --title "Revenue Trend"

rq charts publish / unpublish

bash
rq charts publish <name> # get a public URL
rq charts publish <name> --password s3cr3t
rq charts unpublish <name>

rq charts delete

bash
rq charts delete <name>
rq charts delete <name> --force # delete even if referenced by pages

rq pages

Manage dashboard pages (grids of charts).

bash
rq pages # list all
rq pages show <name>
rq pages -f json

rq pages create

bash
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 300

rq pages update

bash
rq pages update <name> --charts mrr:2,churn --columns 2
rq pages update <name> --title "New Title" --refresh 600

rq pages publish / unpublish

bash
rq pages publish <name>
rq pages publish <name> --password s3cr3t
rq pages unpublish <name>

rq pages delete

bash
rq pages delete <name>

rq embed

Embed text columns in a table using vector embeddings. Runs as an async job.

bash
rq embed <source-table> --column <text-column> [flags]
# Examples:
rq embed crm.contacts --column description
rq embed crm.contacts --column first_name --column notes --output crm.contacts_embedded
rq embed raw.articles --column body --batch-size 100
FlagDescription
--columnText column(s) to embed (required, repeatable)
--outputOutput table name (default: {source}_embedded)
--batch-sizeBatch size for embedding API calls (default: 200)

rq searches

Manage semantic search configurations.

bash
rq searches # list all
rq searches show <name>
rq searches -f json

rq searches create

bash
rq searches create <name> --table <source-table> --column <text-column> [flags]
# Examples:
rq searches create product-search --table shop.products --column description
rq searches create kb --table docs.articles --column body --display title,url --limit 5
FlagDescription
--tableSource table (required)
--columnText column to search (required)
--displayColumns to show in results (comma-separated)
--titleDisplay title
--limitDefault result limit (default: 10)

rq searches publish / unpublish

bash
rq searches publish <name>
rq searches publish <name> --password s3cr3t
rq searches unpublish <name>

rq searches delete

bash
rq searches delete <name>

rq search

Run a semantic search against a search configuration.

bash
rq search <name> <text>
# Examples:
rq search product-search "wireless headphones"
rq search knowledge-base "refund policy" -f json

rq export

Export Iceberg table data as presigned S3 URLs. Use to migrate data to Databricks, Snowflake, or any Iceberg-compatible system.

bash
rq export <schema.table>
rq export stripe.customers -f json
rq export stripe.customers --download ./export/
rq export --all
rq export --all --download ./full-backup/
FlagDescription
--allExport all tables in the workspace
--downloadDownload files to this directory

rq usage

Show workspace usage for the current billing period (query count, storage, cost).

bash
rq usage
rq usage -f json

rq api-keys

List and manage API keys.

bash
rq api-keys # list all keys
rq api-keys create <name> # create a new key
rq api-keys revoke <key-id> # revoke a key
rq api-keys revoke <key-id> -y # revoke without confirmation

rq open

Open the rawquery dashboard in your browser.

bash
rq open

rq config

Show or update configuration.

bash
rq config # show current config
rq config set endpoint <url> # set API endpoint
rq config set workspace <slug> # set default workspace
rq config set format <format> # set default output format

rq update

Download and install the latest CLI version.

bash
rq update

rq claude-init

Set up Claude Code integration. Creates a skill file so Claude Code can query your data, explore tables, and manage connections.

bash
rq claude-init

rq 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.

bash
rq codex-init

rq completion

Generate shell completion scripts.

bash
# Bash
eval "$(rq completion bash)"
# Zsh
eval "$(rq completion zsh)"
# Fish
rq completion fish | source

rq version

Print the CLI version.

bash
rq version

Need help? Email us at hello@rawquery.dev.