{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["platform-badges","admonition"]},"type":"markdown"},"seo":{"title":"Treasure AI Studio - TDX Commands (Server-Side CLI)","description":"The full tdx CLI runs inside Studio's server-side sandbox. Query databases, manage segments, validate journeys, and inspect API responses — all through the AI chat.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"tdx-commands-server-side-cli","__idx":0},"children":["TDX Commands (Server-Side CLI)"]},{"$$mdtype":"Tag","name":"PlatformBadges","attributes":{"platforms":["Web","Desktop"]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["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."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["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."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"objective","__idx":1},"children":["Objective"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["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."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Signed in to Treasure AI Studio (",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/getting-started"},"children":["Getting Started"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Web or Desktop only"]}," — TDX commands are not available on Mobile"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"running-tdx-commands","__idx":3},"children":["Running TDX Commands"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["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."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"You: Run tdx databases to show me what's available\n\nAI: [Runs tdx databases in the sandbox]\n    You have 12 databases. Here are the most recently updated...\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"when-to-use-direct-commands","__idx":4},"children":["When to Use Direct Commands"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Quick lookups."]}," Ask the AI to run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx databases"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx tables mydb"]}," to check what data is available."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Precise control."]}," When you know the exact command, tell the AI to run it directly — it skips the reasoning phase and executes immediately."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Validation."]}," Ask the AI to run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx sg validate segment.yaml"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx journey validate journey.yaml"]}," to validate configurations."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Debugging."]}," Ask the AI to run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx api --type td /v3/job/list"]}," to inspect raw API responses."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"when-to-let-the-ai-choose-commands","__idx":5},"children":["When to Let the AI Choose Commands"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["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."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"available-tdx-commands","__idx":6},"children":["Available TDX Commands"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The full tdx CLI is available in the sandbox. Here are the most commonly used command groups:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-commands","__idx":7},"children":["Data Commands"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx databases"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List all databases"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx databases"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx tables <db>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List tables in a database"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx tables mydb"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx describe <db.table>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show table schema (columns and types)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx describe mydb.users"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx show <db.table>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Preview table contents (SELECT * with limit)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx show mydb.users"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx query \"<sql>\""]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run a Trino SQL query"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx query \"SELECT * FROM mydb.users LIMIT 10\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx job list"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List recent query jobs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx job list"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cdp-commands","__idx":8},"children":["CDP Commands"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx segment list"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List CDP audience segments"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx segment list"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx sg validate <file>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Validate a segment YAML file"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx sg validate segment.yaml"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx parent-segment list"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List parent segments"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx parent-segment list"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx journey list"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List journeys"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx journey list"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx journey validate <file>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Validate a journey YAML file"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx journey validate journey.yaml"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx activations <segment>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List activations for a segment"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx activations parent/child"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ai-commands","__idx":9},"children":["AI Commands"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx agents"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List agents in current project"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx agents"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx llm projects"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List LLM projects"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx llm projects"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"context--utility-commands","__idx":10},"children":["Context & Utility Commands"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx status"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show auth status and current context"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx status"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx use database <db>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set the active database for the session"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx use database mydb"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx api <endpoint>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Make a raw API request"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx api --type td /v3/job/list"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Pro Tip"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use plural forms as aliases for list commands: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx databases"]}," = ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx database list"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx tables mydb"]}," = ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx table list mydb"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx segments"]}," = ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx segment list"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"output-formats","__idx":11},"children":["Output Formats"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By default, tdx outputs results in a human-readable table format. You can control the output format with flags:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Flag"},"children":["Flag"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Format"},"children":["Format"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Use Case"},"children":["Use Case"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--table"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Table (default)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Human-readable display"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["JSON"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Structured data for AI processing"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--jsonl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["JSON Lines"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Streaming/line-by-line processing"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--tsv"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TSV"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tab-separated for spreadsheet import"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When the AI runs tdx commands on your behalf, it may use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json"]}," to get structured output that is easier to process programmatically."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"server-side-execution-environment","__idx":12},"children":["Server-Side Execution Environment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All tdx commands execute in an isolated server-side sandbox, not on your local machine. This means:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Your Treasure AI credentials"]}," are managed server-side and are not stored in the browser"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Network access"]}," is restricted to Treasure AI APIs and authorized endpoints"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Filesystem scope"]}," is limited to the chat session's working directory"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No local side effects"]}," — nothing is installed on or read from your computer"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/security"},"children":["Security & Permissions"]}," for details on the sandbox execution environment."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"differences-from-treasure-studio-labs","__idx":13},"children":["Differences from Treasure Studio Labs"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Feature"},"children":["Feature"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Treasure Studio Labs"},"children":["Treasure Studio Labs"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Treasure AI Studio"},"children":["Treasure AI Studio"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Execution environment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Local machine (your terminal)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Server-side sandbox"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Command palette"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Cmd+Shift+P"]}," for actions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not available in GA"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MCP tools"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Connected via local MCP server"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not available in GA (MCP is post-GA)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Technical Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["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."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"verification","__idx":14},"children":["Verification"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Ask the AI to run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx status"]}," and see your auth status and region"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Ask the AI to run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx databases"]}," and see a list of your Treasure AI databases"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Expand the tool call to see the full command and raw output"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting","__idx":15},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Issue"},"children":["Issue"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Solution"},"children":["Solution"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Command returns \"not found\" or empty output"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Verify your Treasure AI account has the expected databases and resources. Ask the AI to run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx status"]}," to confirm authentication and region are correct"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Output is truncated"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Large outputs are trimmed to fit the chat. Ask the AI to run the command with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--format json"]}," for complete output, or ask it to summarize the results"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":16},"children":["Next Steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/query/query-execution"},"children":["Query Execution"]}," — Running Trino queries through the AI"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/query/query-results"},"children":["Query Result Tables"]}," — Understanding query result display"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/skills/skills"},"children":["Skills & Marketplace"]}," — Pre-built skills for SQL, segments, and more"]}]}]},"headings":[{"value":"TDX Commands (Server-Side CLI)","id":"tdx-commands-server-side-cli","depth":1},{"value":"Objective","id":"objective","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Running TDX Commands","id":"running-tdx-commands","depth":2},{"value":"When to Use Direct Commands","id":"when-to-use-direct-commands","depth":3},{"value":"When to Let the AI Choose Commands","id":"when-to-let-the-ai-choose-commands","depth":3},{"value":"Available TDX Commands","id":"available-tdx-commands","depth":2},{"value":"Data Commands","id":"data-commands","depth":3},{"value":"CDP Commands","id":"cdp-commands","depth":3},{"value":"AI Commands","id":"ai-commands","depth":3},{"value":"Context & Utility Commands","id":"context--utility-commands","depth":3},{"value":"Output Formats","id":"output-formats","depth":2},{"value":"Server-Side Execution Environment","id":"server-side-execution-environment","depth":2},{"value":"Differences from Treasure Studio Labs","id":"differences-from-treasure-studio-labs","depth":2},{"value":"Verification","id":"verification","depth":2},{"value":"Troubleshooting","id":"troubleshooting","depth":2},{"value":"Next Steps","id":"next-steps","depth":2}],"frontmatter":{"seo":{"title":"Treasure AI Studio - TDX Commands (Server-Side CLI)","description":"The full tdx CLI runs inside Studio's server-side sandbox. Query databases, manage segments, validate journeys, and inspect API responses — all through the AI chat."},"platforms":["Web","Desktop"]},"lastModified":"2026-04-23T08:10:59.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/ai-studio/query/tdx-commands","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}