Command line
The tracepanel command of the Go module, to run a built app recording, serve your traces over MCP, run the agent's console in the foreground and run the agent itself.
The Go module has a tracepanel command for what a Go project has no pip
or npm to run with. It runs the agent the SDK runs, the one in the user's
cache, and downloads it the first time. See
The agent for where the cache is. Install
it:
go install github.com/tracepanel/tracepanel-go/cmd/tracepanel@v0.10.0Then run it from your project's directory, so it finds the project's store:
tracepanel mcpWithout installing it, go run runs it the same way:
go run github.com/tracepanel/tracepanel-go/cmd/tracepanel@v0.10.0 mcp| Command | What it does |
|---|---|
tracepanel run | Runs your app with Tracepanel recording. |
tracepanel mcp | Runs an MCP server for AI coding agents. |
tracepanel dev | Runs the agent in the foreground and serves the console, and your app beside it. |
tracepanel agent | Runs the agent with its own arguments. |
tracepanel version | Prints the SDK's version and the agent's. |
The project's store is in TRACEPANEL_DIR, else .tracepanel, as the SDK
keeps it. TRACEPANEL_AGENT_BIN runs another build of the agent.
tracepanel run
go build -o shop . && tracepanel run ./shoptracepanel run starts a command with Tracepanel recording. The command can
follow -- too, as in tracepanel run -- ./shop, the same as
tracepanel run ./shop. The SDK records
in development only, under go run, so a binary built with go build
records nothing on its own. tracepanel run sets TRACEPANEL_ENABLED=1 for
the command, and passes its input and output through. An app run
with go run records anyway.
It exits with the app's exit code. When the app fails, it says how the app ended on stderr:
tracepanel: ./shop exited with status 3Run through go run, the command exits 1 whatever the app's code, so that
line is where the app's status is.
tracepanel mcp
tracepanel mcp [--values]tracepanel mcp runs the agent's MCP server on stdin and stdout, for Claude
Code, Cursor, Codex and other coding agents. --values adds SQL parameters
and local variables to its answers. Add it to Claude Code like this:
claude mcp add --scope project tracepanel -- tracepanel mcpIn a JSON config, that is "command": "tracepanel" with "args": ["mcp"].
See AI coding agents.
tracepanel dev
tracepanel dev [--port 8765] [-- COMMAND...]tracepanel dev runs the agent in the foreground, with the console on
http://127.0.0.1:8765/. Use it to watch the agent's output, to open the
console on a fixed address, or to read the traces after your app has
stopped. --port moves the console.
A command after -- runs beside the console with Tracepanel recording, as
tracepanel run runs it, until the console stops. --port goes before the
--:
tracepanel dev -- ./shop
tracepanel dev --port 9100 -- ./shopWhen the console stops, such as on Ctrl+C, it stops the app too, and the
command exits with the console's exit code. An app that fails on its own
says how it ended on stderr, as under tracepanel run, and the console
keeps running. An app the console stopped says nothing.
tracepanel agent
tracepanel agent --helptracepanel agent runs the agent with the arguments you give it.