Skip the terminal. The full tdx CLI runs inside Studio's server-side sandbox, so you can query databases, manage segments, and validate configurations without leaving the chat — with the same commands you already use locally.
TDX commands execute in an isolated sandbox execution environment — not on your local machine. Your Treasure AI credentials are managed server-side and are not stored in the browser. Network access is restricted to Treasure AI APIs and authorized endpoints.
Run tdx CLI commands through the AI for precise, on-demand control over your Treasure AI resources — complementing the AI's autonomous multi-step workflows.
- Signed in to Treasure AI Studio (Getting Started)
- Web or Desktop only — TDX commands are not available on Mobile
Ask the AI to run any tdx command on your behalf. The command executes in the server-side sandbox, and the output appears inline in the conversation as a tool call result.
You: Run tdx databases to show me what's available
AI: [Runs tdx databases in the sandbox]
You have 12 databases. Here are the most recently updated...- Quick lookups. Ask the AI to run
tdx databasesortdx tables mydbto check what data is available. - Precise control. When you know the exact command, tell the AI to run it directly — it skips the reasoning phase and executes immediately.
- Validation. Ask the AI to run
tdx sg validate segment.yamlortdx journey validate journey.yamlto validate configurations. - Debugging. Ask the AI to run
tdx api --type td /v3/job/listto inspect raw API responses.
For multi-step workflows — "explore the customer database, find the most useful tables, and build an audience segment of high-value users" — let the AI handle the commands. It chains together the right sequence of calls, interprets the results, and continues working.
The full tdx CLI is available in the sandbox. Here are the most commonly used command groups:
| Command | Description | Example |
|---|---|---|
tdx databases | List all databases | tdx databases |
tdx tables <db> | List tables in a database | tdx tables mydb |
tdx describe <db.table> | Show table schema (columns and types) | tdx describe mydb.users |
tdx show <db.table> | Preview table contents (SELECT * with limit) | tdx show mydb.users |
tdx query "<sql>" | Run a Trino SQL query | tdx query "SELECT * FROM mydb.users LIMIT 10" |
tdx job list | List recent query jobs | tdx job list |
| Command | Description | Example |
|---|---|---|
tdx segment list | List CDP audience segments | tdx segment list |
tdx sg validate <file> | Validate a segment YAML file | tdx sg validate segment.yaml |
tdx parent-segment list | List parent segments | tdx parent-segment list |
tdx journey list | List journeys | tdx journey list |
tdx journey validate <file> | Validate a journey YAML file | tdx journey validate journey.yaml |
tdx activations <segment> | List activations for a segment | tdx activations parent/child |
| Command | Description | Example |
|---|---|---|
tdx agents | List agents in current project | tdx agents |
tdx llm projects | List LLM projects | tdx llm projects |
| Command | Description | Example |
|---|---|---|
tdx status | Show auth status and current context | tdx status |
tdx use database <db> | Set the active database for the session | tdx use database mydb |
tdx api <endpoint> | Make a raw API request | tdx api --type td /v3/job/list |
Use plural forms as aliases for list commands: tdx databases = tdx database list, tdx tables mydb = tdx table list mydb, tdx segments = tdx segment list.
By default, tdx outputs results in a human-readable table format. You can control the output format with flags:
| Flag | Format | Use Case |
|---|---|---|
--table | Table (default) | Human-readable display |
--json | JSON | Structured data for AI processing |
--jsonl | JSON Lines | Streaming/line-by-line processing |
--tsv | TSV | Tab-separated for spreadsheet import |
When the AI runs tdx commands on your behalf, it may use --json to get structured output that is easier to process programmatically.
All tdx commands execute in an isolated server-side sandbox, not on your local machine. This means:
- Your Treasure AI credentials are managed server-side and are not stored in the browser
- Network access is restricted to Treasure AI APIs and authorized endpoints
- Filesystem scope is limited to the chat session's working directory
- No local side effects — nothing is installed on or read from your computer
See Security & Permissions for details on the sandbox execution environment.
| Feature | Treasure Studio Labs | Treasure AI Studio |
|---|---|---|
| Execution environment | Local machine (your terminal) | Server-side sandbox |
| Command palette | Cmd+Shift+P for actions | Not available in GA |
| MCP tools | Connected via local MCP server | Not available in GA (MCP is post-GA) |
In Treasure Studio Labs, tdx commands executed directly on your local machine using your local tdx installation. In Treasure AI Studio, the same commands execute in the server-side sandbox using a managed tdx installation. The command syntax is identical — the execution environment has changed.
- Ask the AI to run
tdx statusand see your auth status and region - Ask the AI to run
tdx databasesand see a list of your Treasure AI databases - Expand the tool call to see the full command and raw output
| Issue | Solution |
|---|---|
| Command returns "not found" or empty output | Verify your Treasure AI account has the expected databases and resources. Ask the AI to run tdx status to confirm authentication and region are correct |
| Output is truncated | Large outputs are trimmed to fit the chat. Ask the AI to run the command with --format json for complete output, or ask it to summarize the results |
- Query Execution — Running Trino queries through the AI
- Query Result Tables — Understanding query result display
- Skills & Marketplace — Pre-built skills for SQL, segments, and more