One CLI to create, manage, and render TouchDesigner projects โ built for AI agents, automation pipelines, and headless workflows.
Part of the CLI-Anything ecosystem
103+ Operators ยท 8 Network Templates ยท Interactive REPL ยท JSON Output ยท Script Export
- Why This Exists
- Installation
- Quick Start
- Agent Integration
- REPL Mode
- Operator Families
- Network Templates
- JSON Mode for Agents
- Running Tests
- Architecture
- TouchDesigner Backend
- License
Today's creative software serves humans. Tomorrow's users will be AI agents.
TouchDesigner is one of the most powerful real-time visual programming environments โ but it's locked behind a GUI. This CLI bridges the gap, letting agents like Claude Code, Cursor, Copilot, and any automation pipeline drive TouchDesigner programmatically.
No GUI required. Build operator networks, configure parameters, generate TD scripts โ all from the command line.
- Python 3.9+
- TouchDesigner (optional โ needed only for rendering; project management works standalone)
git clone https://github.com/superdwayne/touchdesigner-cli.git
cd touchdesigner-cli/agent-harnesspython3 -m venv .venv
source .venv/bin/activate # macOS / Linux
# .venv\Scripts\activate # Windowspip install -e ".[dev]"Windows users: If you hit a
UnicodeDecodeError, run$env:PYTHONUTF8="1"(PowerShell) orset PYTHONUTF8=1(CMD) before the pip install command.
This installs the CLI as
cli-anything-touchdesignerand the shorthandtd-clion your PATH (inside the venv).
cli-anything-touchdesigner --version
# cli-anything-touchdesigner, version 1.0.0
cli-anything-touchdesigner --help
# Usage: cli-anything-touchdesigner [OPTIONS] COMMAND [ARGS]...
cli-anything-touchdesigner status
# Shows TouchDesigner backend detection statusโก One-liner install (copy-paste)
git clone https://github.com/superdwayne/touchdesigner-cli.git && \
cd touchdesigner-cli/agent-harness && \
python3 -m venv .venv && \
source .venv/bin/activate && \
pip install -e ".[dev]" && \
cli-anything-touchdesigner --versionDetailed platform-specific instructions (macOS, Linux, Windows): docs/INSTALL.md
# 1. Create a new project
cli-anything-touchdesigner project new MyVisuals -o myvisuals.json
# 2. Add operators
cli-anything-touchdesigner --project myvisuals.json op add TOP noise noise1 --param amp=2.0
cli-anything-touchdesigner --project myvisuals.json op add TOP level level1
cli-anything-touchdesigner --project myvisuals.json op add TOP null out1
# 3. Connect them into a chain
cli-anything-touchdesigner --project myvisuals.json net connect /project1/noise1 /project1/level1
cli-anything-touchdesigner --project myvisuals.json net connect /project1/level1 /project1/out1
# 4. Export as a TouchDesigner Python script
cli-anything-touchdesigner --project myvisuals.json export script -o setup.py# Audio-reactive visualization
cli-anything-touchdesigner --project myvisuals.json net template audio-reactive --audio-file music.wav
# Feedback loop
cli-anything-touchdesigner --project myvisuals.json net template feedback-loop
# 3D scene with sphere geometry
cli-anything-touchdesigner --project myvisuals.json net template 3d-scene --geometry sphere
# GPU particle system
cli-anything-touchdesigner --project myvisuals.json net template particle-system
# Custom GLSL shader chain
cli-anything-touchdesigner --project myvisuals.json net template glsl-shader
# List all available templates
cli-anything-touchdesigner net templatescli-anything-touchdesigner op suggest audio reactive visuals
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# โ Family Type Reason โ
# โ CHOP audiofileinCHOP Load audio file โ
# โ CHOP audiospectrumCHOP Analyze frequency spectrum โ
# โ CHOP mathCHOP Scale/offset audio values โ
# โ TOP choptoTOP Convert audio data to textureโ
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโThis CLI is designed to be used by AI agents. Full guide: docs/AGENTS.md
| Platform | How It Works |
|---|---|
| Claude Code | Discovers via which and --help. Add hints to CLAUDE.md. |
| Cursor | Add to .cursorrules for automatic discovery. |
| Windsurf | Add to .windsurfrules or global rules. |
| Copilot CLI | Suggests commands from ?? queries. |
| LangChain | Wrap as a @tool โ example in AGENTS.md. |
| CrewAI | Wrap as a @tool โ example in AGENTS.md. |
| MCP Server | Expose as MCP tools โ example in AGENTS.md. |
| Any language | Shell out + parse JSON โ Node/Go/Rust examples. |
You have access to `cli-anything-touchdesigner`, a CLI for building TouchDesigner projects.
Key commands:
cli-anything-touchdesigner --json project new <name> -o <file.json>
cli-anything-touchdesigner --json --project <file> op add <FAMILY> <type> <name>
cli-anything-touchdesigner --json --project <file> net template <template_name>
cli-anything-touchdesigner --json --project <file> net connect <from> <to>
cli-anything-touchdesigner --json --project <file> export script -o <output.py>
cli-anything-touchdesigner op suggest <description>
Families: TOP, CHOP, SOP, DAT, COMP, MAT, POP
Templates: audio-reactive, feedback-loop, 3d-scene, particle-system,
instancing, glsl-shader, osc-receiver, video-mixer
Always use --json for structured output.
Full integration guide with code examples for every platform: docs/AGENTS.md
Run the CLI without a subcommand to enter interactive mode โ perfect for AI agent sessions:
$ cli-anything-touchdesigner
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ cli-anything-touchdesigner v1.0.0 โ
โ TouchDesigner CLI for AI Agents โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
td> project new LiveShow
โ Created project: LiveShow
td[LiveShow]> net template audio-reactive --audio-file set.wav
โ Built template 'audio-reactive' (9 operators)
td[LiveShow]*> op list
Name Family Type Path
โโโโโโโโโ โโโโโโ โโโโ โโโโ
audioIn1 CHOP audiofileinCHOP /project1/audioIn1
spectrum1 CHOP audiospectrumCHOP /project1/spectrum1
math1 CHOP mathCHOP /project1/math1
null_chop1 CHOP nullCHOP /project1/null_chop1
chopTo1 TOP choptoTOP /project1/chopTo1
noise1 TOP noiseTOP /project1/noise1
comp1 TOP compositeTOP /project1/comp1
level1 TOP levelTOP /project1/level1
out1 TOP nullTOP /project1/out1
td[LiveShow]*> op set /project1/noise1 amp 3.0
โ Set amp=3.0 on /project1/noise1
td[LiveShow]*> export script -o live_setup.py
โ Exported TD script: live_setup.py
td[LiveShow]*> exit
Goodbye! ๐
The
*after the project name means there are unsaved changes. REPL supports full command history (up/down arrows) and undo/redo.
All 7 TouchDesigner operator families are supported with 103+ operator types:
| Family | Color | Purpose | Types |
|---|---|---|---|
| ๐ฃ TOP | Purple | Texture/image processing on GPU | 21 |
| ๐ข CHOP | Green | Channel data โ audio, animation, control signals | 22 |
| ๐ต SOP | Blue | 3D surface & geometry operations | 16 |
| ๐ท DAT | Teal | Text, tables, scripts, networking | 16 |
| โช COMP | Gray | Components โ containers, 3D objects, UI | 14 |
| ๐ก MAT | Yellow | Materials & shaders for 3D rendering | 8 |
| ๐ฉท POP | Pink | GPU-accelerated particles & point data | 6 |
# List all families and counts
cli-anything-touchdesigner op types
# List all operator types in a family
cli-anything-touchdesigner op types TOP
cli-anything-touchdesigner op types CHOP
cli-anything-touchdesigner op types POPPre-built operator networks for common TouchDesigner workflows:
| Template | Description | Operators |
|---|---|---|
audio-reactive |
Audio File In โ Spectrum โ Math โ CHOP to TOP โ Composite | 9 |
feedback-loop |
Noise โ Composite โ Feedback โ Transform โ Level (loop) | 6 |
3d-scene |
Geometry + Camera + Light โ Render TOP โ Null | 6 |
particle-system |
POP Generate โ Force โ Noise โ Attrib โ Render | 5 |
instancing |
Noise CHOPs (tx/ty/tz) โ Merge โ Geometry COMP | 6 |
glsl-shader |
Noise โ GLSL TOP โ Level โ Null + shader DAT | 5 |
osc-receiver |
OSC In โ Select โ Filter โ Null | 4 |
video-mixer |
Movie File In รN โ Switch โ Composite โ Null | 5+ |
# Build any template
cli-anything-touchdesigner --project my.json net template feedback-loop
# Customize with options
cli-anything-touchdesigner --project my.json net template 3d-scene --geometry torus
cli-anything-touchdesigner --project my.json net template instancing --count 500
cli-anything-touchdesigner --project my.json net template video-mixer --input-count 4
cli-anything-touchdesigner --project my.json net template osc-receiver --port 9000Every command supports --json for structured machine-readable output โ ideal for AI agents:
# Create a project
cli-anything-touchdesigner --json project new AgentProject{
"status": "success",
"message": "Created project: AgentProject",
"data": {
"name": "AgentProject",
"type": "standard",
"operators": 0,
"connections": 0,
"families": {},
"resolution": [1920, 1080],
"fps": 60,
"modified": false
}
}# List operators
cli-anything-touchdesigner --json --project myvisuals.json op list[
{"name": "noise1", "family": "TOP", "type": "noiseTOP", "path": "/project1/noise1"},
{"name": "null1", "family": "TOP", "type": "nullTOP", "path": "/project1/null1"}
]# Get operator suggestions
cli-anything-touchdesigner --json op suggest particle effects[
{"family": "POP", "type": "popGeneratePOP", "reason": "Generate particles"},
{"family": "POP", "type": "popForcePOP", "reason": "Apply forces to particles"},
{"family": "POP", "type": "popRenderPOP", "reason": "Render particles"}
]The project includes 117 comprehensive tests covering all modules:
cd agent-harness
source .venv/bin/activate
pytest -vtests/test_cli.py ... 28 passed
tests/test_operators.py ... 29 passed
tests/test_network.py ... 22 passed
tests/test_project.py ... 38 passed
========================= 117 passed =========================
pytest --cov=cli_anything_touchdesigner --cov-report=term-missing -vpytest tests/test_project.py -v # Project management tests
pytest tests/test_operators.py -v # Operator registry tests
pytest tests/test_network.py -v # Network builder tests
pytest tests/test_cli.py -v # CLI integration tests| Test File | Tests | What It Covers |
|---|---|---|
test_project.py |
38 | Project CRUD, undo/redo, save/load, connections, flags |
test_operators.py |
29 | Operator registry, type lookup, defaults, suggestions |
test_network.py |
22 | Templates, chain building, custom parents, all 8 templates |
test_cli.py |
28 | CLI commands, JSON output, export, status, end-to-end |
touchdesigner-cli/
โโโ agent-harness/
โโโ cli_anything_touchdesigner/
โ โโโ __init__.py # Package metadata & version
โ โโโ cli.py # Click CLI โ all subcommands + entry point
โ โโโ project.py # Project/session state with undo/redo
โ โโโ operators.py # 103+ operator types across 7 families
โ โโโ network.py # Network builder + 8 pre-built templates
โ โโโ backend.py # TouchDesigner process discovery & execution
โ โโโ formatter.py # Human-readable tables + JSON output
โ โโโ repl_skin.py # Interactive REPL with history & prompts
โ
โโโ tests/
โ โโโ test_project.py # 38 tests โ project management
โ โโโ test_operators.py # 29 tests โ operator registry
โ โโโ test_network.py # 22 tests โ network templates
โ โโโ test_cli.py # 28 tests โ CLI integration
โ
โโโ docs/
โ โโโ INSTALL.md # Detailed installation guide
โ โโโ AGENTS.md # Agent integration guide
โ
โโโ setup.py # Legacy setup config
โโโ pyproject.toml # Modern Python packaging
โโโ README.md # Package README
| Principle | Description |
|---|---|
| Authentic Integration | Generates valid TD Python scripts. Delegates to real TouchDesigner for rendering. Builds interfaces to software, not replacements. |
| Dual Interaction | Stateful REPL for interactive agent sessions + subcommand interface for scripting and pipelines. |
| Agent-Native | --json on every command. Self-describing via --help. Discoverable via which. |
| Zero Compromise | Real TD required for rendering. No toy implementations. Tests fail (not skip) when backends are missing. |
The CLI auto-discovers TouchDesigner on your system:
| Platform | Search Paths |
|---|---|
| macOS | /Applications/Derivative/TouchDesigner.app/ |
| Windows | C:\Program Files\Derivative\TouchDesigner\ |
| Linux | /opt/Derivative/TouchDesigner/ |
You can also set environment variables:
export TOUCHDESIGNER_PATH="/path/to/TouchDesigner"
export TOUCHDESIGNER_BATCH_PATH="/path/to/TouchDesignerBatch"TouchDesigner is optional. Project management, operator configuration, network building, and script generation all work without TD installed. You only need TD for rendering.
cli-anything-touchdesigner
โโโ project
โ โโโ new <name> Create a new project
โ โโโ open <path> Open an existing project
โ โโโ save [-o path] Save current project
โ โโโ info Show project info
โ
โโโ op
โ โโโ add <family> <type> <name> Add an operator
โ โโโ remove <path> Remove an operator
โ โโโ list [--family FAM] List operators
โ โโโ info <path> Show operator details
โ โโโ set <path> <param> <val> Set parameter
โ โโโ get <path> <param> Get parameter
โ โโโ flag <path> <flag> <bool> Set operator flag
โ โโโ types [family] List available types
โ โโโ suggest <description...> Get smart suggestions
โ
โโโ net
โ โโโ connect <from> <to> Connect operators
โ โโโ disconnect <from> <to> Disconnect operators
โ โโโ list [op_path] List connections
โ โโโ template <name> [options] Build from template
โ โโโ templates List all templates
โ
โโโ export
โ โโโ script [-o path] Export TD Python script
โ โโโ json [-o path] Export project as JSON
โ
โโโ render <output> [options] Render via TouchDesigner
โโโ status Show backend status
MIT โ use it however you want.
Built with the CLI-Anything methodology
Making TouchDesigner agent-native, one command at a time.