{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Treasure Code","product_name":"Treasure Code","type":"markdown"},"seo":{"title":"Quick Start Guide - tdx | Treasure Data","description":"Get started with tdx, a modern AI-native CLI for Treasure Data. Install, authenticate, and run your first queries in minutes.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]},"image":"/assets/og-image.ba836864a30434f560a4f7720f8a09019ad30ff828b20c5052ae933ba7121524.d7ef4821.png"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"introduction","__idx":0},"children":["Introduction"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success","name":"Under Active Development"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["SDK/CLI commands are subject to change (2026)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["tdx"]}," is a modern, AI-native command-line interface for Treasure AI, optimized for both humans and AI assistants."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"features","__idx":1},"children":["Features"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Claude Code Integration"]},": Launch Claude Code with TD LLM API backend using ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/commands/claude"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx claude"]}]}," for AI-powered development"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/guide/profile-management"},"children":["Multiple Profile Support"]}]},": Manage multiple environments with profile-based authentication for different accounts and regions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Modern Distribution"]},": Install via npx or npm without prior setup. Zero configuration to get started"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"requirements","__idx":2},"children":["Requirements"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Node.js 22.12.0 or higher"]}," (Node.js 24 LTS recommended)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["TD API key with appropriate permissions"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"installing-nodejs","__idx":3},"children":["Installing Node.js"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you don't have Node.js installed:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# macOS (using Homebrew)\nbrew install node\n\n# Or download from https://nodejs.org/\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success","name":"Windows Users"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["tdx works natively with PowerShell. See our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/guide/installation#windows"},"children":["Installation Guide"]}," for setup instructions. WSL2 is also supported if you prefer a Linux environment."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"alternative-using-bun","__idx":4},"children":["Alternative: Using Bun"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://bun.sh/"},"children":["Bun"]}," is a fast JavaScript runtime that works as a drop-in replacement:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# macOS/Linux\ncurl -fsSL https://bun.sh/install | bash\n\n# Windows\npowershell -c \"irm bun.sh/install.ps1 | iex\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"quick-start","__idx":5},"children":["Quick Start"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Install globally\nnpm install -g @treasuredata/tdx\n\n# Set up authentication (interactive)\ntdx auth setup\n\n# List databases\ntdx databases\n\n# Run a query\ntdx query \"SELECT * FROM mydb.users LIMIT 10\"\n\n# Chat with AI\ntdx chat \"Show me customer revenue trends\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":6},"children":["Next Steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/guide/roadmap"},"children":["Feature Roadmap"]}," - See current feature coverage and planned development"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/guide/profile-management"},"children":["Profile Management"]}," - Set up authentication and manage multiple environments"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/commands"},"children":["Commands"]}," - Explore all available commands"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"advanced-running-without-installation","__idx":7},"children":["Advanced: Running without Installation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For one-off usage or testing, you can run tdx directly without global installation:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Using npx (comes with Node.js)\nnpx @treasuredata/tdx databases\n\n# Using bunx (comes with Bun)\nbunx @treasuredata/tdx databases\n","lang":"bash"},"children":[]}]},"headings":[{"value":"Introduction","id":"introduction","depth":1},{"value":"Features","id":"features","depth":2},{"value":"Requirements","id":"requirements","depth":2},{"value":"Installing Node.js","id":"installing-nodejs","depth":3},{"value":"Alternative: Using Bun","id":"alternative-using-bun","depth":3},{"value":"Quick Start","id":"quick-start","depth":2},{"value":"Next Steps","id":"next-steps","depth":2},{"value":"Advanced: Running without Installation","id":"advanced-running-without-installation","depth":2}],"frontmatter":{"seo":{"title":"Quick Start Guide - tdx | Treasure Data","description":"Get started with tdx, a modern AI-native CLI for Treasure Data. Install, authenticate, and run your first queries in minutes.","image":"/assets/og-image.ba836864a30434f560a4f7720f8a09019ad30ff828b20c5052ae933ba7121524.d7ef4821.png"}},"lastModified":"2026-05-18T01:25:54.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/treasure-code/guide","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}