# Introduction

Under Active Development
SDK/CLI commands are subject to change (2026)

**tdx** is a modern, AI-native command-line interface for Treasure Data, optimized for both humans and AI assistants.

## Features

- **[Marketing as Code](/treasure-code/guide/marketing-as-code)**: Manage segments, workflows, and journeys as YAML files—testable locally, deployable safely. Learn with our [AI-Native Marketing Book](/treasure-code/book/).
- **[Treasure Studio](/treasure-code/studio/)**: A desktop AI application that connects to your TD account, queries your data, builds segments, and generates artifacts — all through conversation.
- **Claude Code Integration**: Launch Claude Code with TD LLM API backend using [`tdx claude`](/treasure-code/commands/claude) for AI-powered development
- **[Multiple Profile Support](/treasure-code/guide/profile-management)**: Manage multiple environments with profile-based authentication for different accounts and regions
- **Modern Distribution**: Install via npx or npm without prior setup. Zero configuration to get started


## Requirements

- **Node.js 22.12.0 or higher** (Node.js 24 LTS recommended)
- TD API key with appropriate permissions


### Installing Node.js

If you don't have Node.js installed:


```bash
# macOS (using Homebrew)
brew install node

# Or download from https://nodejs.org/
```

Windows Users
tdx works natively with PowerShell. See our [Installation Guide](/treasure-code/guide/installation#windows) for setup instructions. WSL2 is also supported if you prefer a Linux environment.

### Alternative: Using Bun

[Bun](https://bun.sh/) is a fast JavaScript runtime that works as a drop-in replacement:


```bash
# macOS/Linux
curl -fsSL https://bun.sh/install | bash

# Windows
powershell -c "irm bun.sh/install.ps1 | iex"
```

## Quick Start


```bash
# Install globally
npm install -g @treasuredata/tdx

# Set up authentication (interactive)
tdx auth setup

# List databases
tdx databases

# Run a query
tdx query "SELECT * FROM mydb.users LIMIT 10"

# Chat with AI
tdx chat "Show me customer revenue trends"
```

## Next Steps

- [Feature Roadmap](/treasure-code/guide/roadmap) - See current feature coverage and planned development
- [Profile Management](/treasure-code/guide/profile-management) - Set up authentication and manage multiple environments
- [Commands](/treasure-code/commands) - Explore all available commands


## Advanced: Running without Installation

For one-off usage or testing, you can run tdx directly without global installation:


```bash
# Using npx (comes with Node.js)
npx @treasuredata/tdx databases

# Using bunx (comes with Bun)
bunx @treasuredata/tdx databases
```