# Commands Overview ```bash tdx [options] [arguments] ``` ## Command Categories ### Data Commands | Command | Aliases | Description | | --- | --- | --- | | [tdx database](/treasure-code/commands/database) | `db` | Database management commands | | [tdx table](/treasure-code/commands/table) | - | Table management commands | | `tdx show [table]` | - | Show table contents (SELECT * with limit) | | `tdx describe [table]` | `desc` | Describe table schema | | [tdx query](/treasure-code/commands/query) | - | Execute SQL queries with streaming results | | [tdx job](/treasure-code/commands/job) | - | Manage query jobs | | [tdx workflow](/treasure-code/commands/workflow) | `wf` | Manage Digdag workflows | ### CDP Commands | Command | Aliases | Description | | --- | --- | --- | | [tdx segment](/treasure-code/commands/segment) | `sg` | Manage CDP segments and audiences | | [tdx parent-segment](/treasure-code/commands/parent-segment) | `ps` | Manage parent segment configurations | | [tdx journey](/treasure-code/commands/journey) | - | Manage CDP Journey Orchestration | | `tdx activations ` | - | List activations for a segment | | [tdx engage](/treasure-code/commands/engage) | - | Manage Engage campaigns, email templates, and workspaces | | [tdx connection](/treasure-code/commands/connection) | `connections` | Data connection management (for activations/exports) | ### AI Commands | Command | Description | | --- | --- | | [tdx agent](/treasure-code/commands/agent) | File-based agent sync (pull/push YAML/Markdown) | | [tdx chat](/treasure-code/commands/chat) | Quick AI chat interaction | | [tdx llm](/treasure-code/commands/llm) | Manage LLM projects, agents, and chat sessions | | [tdx claude](/treasure-code/commands/claude) | Launch Claude Code with TD LLM backend | | [tdx mcp](/treasure-code/commands/mcp) | Start MCP server for AI coding assistants | ### Context Commands | Command | Description | | --- | --- | | `tdx use [resource] [value]` | Set session-level context (database, parent_segment, llm_project, profile, engage_workspace) | | `tdx profiles` | List all available profiles | | `tdx auth` | Authentication management | | [tdx user](/treasure-code/commands/user) | User management commands | ### Utility Commands | Command | Aliases | Description | | --- | --- | --- | | `tdx api [endpoint]` | - | Make raw HTTP requests to TD APIs | Plural Forms Use plural forms as aliases for list commands: `tdx databases`, `tdx tables`, `tdx segments`, `tdx jobs`, etc. ## Global Options Available for all commands: ### Output Format Options | Option | Description | | --- | --- | | `--format ` | Output format (table, json, jsonl, tsv) | | `--table` | Output in table format (horizontal layout) | | `--json` | Output in JSON format | | `--jsonl` | Output in JSON Lines format | | `--tsv` | Output in TSV format | | `--output ` | Save output to file | | `--limit ` | Maximum rows to display (default varies by command) | | `--color` | Force ANSI color output | | `--no-color` | Disable ANSI color output | ### Profile and Site Options | Option | Description | Default | | --- | --- | --- | | `-p, --profile ` | Profile to use (overrides active profile) | - | | `--site ` | TD site/region (us01, jp01, eu01, ap02; aliases: us, jp, aws) | us01 | ### Context Override Options | Option | Description | | --- | --- | | `-d, --database ` | Database to use (overrides context) | | `--in ` | Alias for --database (natural language style) | | `--parent-segment ` | Parent segment to use (overrides context) | | `--llm-project ` | LLM project to use (overrides context) | | `--session ` | Session ID (defaults to `TDX_SESSION` env var or parent PID) | ### Logging and Debugging | Option | Description | | --- | --- | | `-v, --verbose` | Enable verbose logging | | `--debug` | Enable debug logging (shows HTTP requests/responses) | | `--trace` | Enable trace logging (ultra-verbose) | ### Directory Option | Option | Description | | --- | --- | | `-C, --directory ` | Change to directory before executing command | This option is useful for running tdx against different project directories without changing your shell's current directory. Similar to `git -C`. ```bash # Run tdx in a different project directory tdx -C /path/to/project databases # Use project config from another directory tdx -C ../other-project segment list ``` ### Other Options | Option | Description | Default | | --- | --- | --- | | `--timeout ` | Set operation timeout | 30 | | `--dry-run` | Preview operation without executing | - | | `-y, --yes` | Skip confirmation prompts | - |