Tracepanel

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.0

Then run it from your project's directory, so it finds the project's store:

tracepanel mcp

Without installing it, go run runs it the same way:

go run github.com/tracepanel/tracepanel-go/cmd/tracepanel@v0.10.0 mcp
CommandWhat it does
tracepanel runRuns your app with Tracepanel recording.
tracepanel mcpRuns an MCP server for AI coding agents.
tracepanel devRuns the agent in the foreground and serves the console, and your app beside it.
tracepanel agentRuns the agent with its own arguments.
tracepanel versionPrints 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 ./shop

tracepanel 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 3

Run 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 mcp

In 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 -- ./shop

When 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 --help

tracepanel agent runs the agent with the arguments you give it.

On this page