GoDoctor is a specialized and optimized suite of tools and skills carefully engineered to elevate agentic coding in Go codebases. Whenever installed, coding agents operating on Go codebases MUST use GoDoctor's specialized tools (smart_build, smart_edit, smart_read, describe_symbol, add_dependency, read_docs, mutation_test, test_query, list_files) to navigate, edit, compile, test, and analyze Go code.
Run the automatic installation script:
./install.sh [options]This script detects your platform (OS and architecture), fetches the latest release, and installs GoDoctor for your target environment:
- Antigravity 2.0 (Plugin) (Default):
./install.sh --target agy2 # Global: ~/.gemini/config/plugins/godoctor ./install.sh --target agy2 -w # Workspace: .agents/plugins/godoctor
- Antigravity CLI (Plugin):
./install.sh --target cli # Global: ~/.gemini/antigravity-cli/plugins/godoctor ./install.sh --target cli -w # Workspace: .agents/plugins/godoctor
- Other Agents (Skills Only):
./install.sh --target skills # Global: ~/.agents/skills ./install.sh --target skills -w # Workspace: .agents/skills
Once installed, GoDoctor runs automatically in the background of your agent-compatible client. The client agent will discover and call the exposed tools during Go programming tasks.
To manually print system instructions for an LLM agent:
godoctor --agentsTo see the list of active tools:
godoctor --list-toolsWhen running inside the Antigravity CLI, GoDoctor intercepts standard terminal commands (such as go build, cat, or sed) and raw file tools when they operate on Go source files (.go). It redirects the agent to GoDoctor's specialized tools (smart_build, smart_read, and smart_edit). Non-Go files (Python, TypeScript, Markdown, etc.) are unaffected and pass through normally. This prevents syntax errors and conserves context window tokens.
| Flag | Description | Default |
|---|---|---|
--allow |
Comma-separated whitelist of tools to enable. | "" |
--disable |
Comma-separated list of tools to disable. | "" |
--listen |
Address for HTTP transport (defaults to standard input/output). | "" |
--list-tools |
Prints all registered tools and exits. | false |
--agents |
Prints system instructions for LLM agents and exits. | false |
--version |
Prints the version and exits. | false |
GoDoctor provides tools divided into four functional areas:
list_fileslists files in the workspace while avoiding version control directories.smart_readreads files, extracts code outlines, and appends definitions of referenced types. Powered by a high-performance persistent backgroundgoplsdaemon over a stateful JSON-RPC session, delivering type-tags in milliseconds.describe_symbolprovides semantic detail for any symbol, including declaration signatures, comments, and references, querying the shared backgroundgoplsprocess instantly.
smart_edithandles atomic modifications across multiple files. It formats the code and automatically rolls back changes if the compiler detects a syntax error.
smart_buildmanages module tidying, code modernization, formatting, compiling, testing, and linting.add_dependencyinstalls Go modules and pulls their documentation.read_docsfetches API documentation for packages and symbols.
mutation_testruns Selene mutation tests to check test coverage quality.test_queryqueries test results and coverage data using SQL.
Build the project from source using the Makefile:
git clone https://github.com/danicat/godoctor.git
cd godoctor
make buildThis compiles the server binary to bin/godoctor.
To install the binary globally to your $GOPATH/bin:
make installRun GoDoctor's specialized build pipeline:
smart_buildThis automatically handles module tidying, code modernization, formatting (gofmt), compiling (go build), test execution (go test), and static linting in a single optimized operation.
Run the compiled binary directly to test behavior:
./bin/godoctorCheck active tools:
./bin/godoctor --list-toolsReleasing a new version is automated into a single one-liner command:
make bump-version VERSION=0.21.0This single command automatically:
- Updates
"version"inplugin.json. - Stages and commits
plugin.json(chore: bump version to 0.21.0). - Creates the matching Git release tag (
v0.21.0). - Pushes
mainbranch and tags to GitHub (git push origin main --tags), triggering the automated GoReleaser CI/CD pipeline.
To test the GoReleaser build configuration locally without creating a release tag:
make snapshotApache 2.0