Claude Code & Codex

Claude Code and Codex can operate rawquery from your terminal through the rq CLI. Give the agent a task, such as building a report, and it can inspect tables, run and save queries, create charts, and publish the result. The saved queries and charts remain in your rawquery workspace.

You need your chosen terminal agent installed, a rawquery account, and access to the sources you want to use. Your AI service's account and usage costs are separate from rawquery.

1. Install rq and sign in

bash
curl -fsSL rawquery.dev/install.sh | sh
rq login
rq config

Check the active workspace shown by rq config. The agent uses the same credentials and workspace when it runs commands. If you need an account, start free first.

2. Add the skill for your agent

Run the appropriate command from the project directory where you will use the agent.

Claude Code

bash
rq claude-init

Creates .claude/skills/rq/SKILL.md with instructions for operating rawquery. Start Claude Code in that directory and invoke /rq in the conversation.

Codex

bash
rq codex-init

Creates .agents/skills/rq/SKILL.md and its agent configuration. Start Codex in that directory and invoke $rq in the conversation.

The skill describes how to discover the workspace's schemas and resources and use the CLI. The agent obtains current data by running commands.

3. Delegate a complete task

With Stripe invoices already synced, give either agent this task:

text
Inspect my Stripe invoices table. Count invoices where paid is true,
grouped by creation month formatted as YYYY-MM, ordered oldest first.
Show the SQL and results, save the query as paid-invoices-by-month,
and create a bar chart with month as X and invoice_count as Y.
Name it paid-invoices-by-month. Do not publish it until I review it.

The agent can use rq describe, rq query, rq queries create, and rq charts create to complete this. After reviewing the chart, ask it to publish with the access settings you want.

Follow the complete invoice-chart walkthrough for source setup, the SQL, and a working published example.

Other tasks

  • Explore a source: ask the agent to list tables, describe their columns, and propose useful queries before running them.
  • Build a dashboard: describe the metrics and filters, ask for saved queries and charts, then have the agent assemble a page. Review definitions before publication.
  • Manage connections: ask the agent to inspect connections, check sync status, or trigger a sync. Creating a source requires the source credentials or authorization.
  • Reuse calculations: ask it to create transforms and set their dependencies and schedules.

Review tool requests, metric definitions, and results. Publishing without password protection makes the output accessible to anyone with its link. Query results returned to an AI agent are handled by that AI provider as well as rawquery.

Browser access

For Claude without a terminal, use the browser connector. It provides workspace operations through the hosted MCP server and OAuth authorization.