Wright AI
DocsStart free
Go · godoc

Auto-generate Go godoc comments with AI

Wright AI writes godoc-style comments for every undocumented Go function — following the convention that the first sentence is the summary — then enforces coverage in CI.

Start for free →pip install wright

See it in action

Before and after — godoc style

BEFORE
func (c *Client) ExecuteWithRetry(ctx context.Context, req *Request, maxAttempts int) (*Response, error) {
	var lastErr error
	for attempt := 0; attempt < maxAttempts; attempt++ {
		if attempt > 0 {
			select {
			case <-ctx.Done():
				return nil, ctx.Err()
			case <-time.After(backoff(attempt)):
			}
		}
		resp, err := c.execute(ctx, req)
		if err == nil {
			return resp, nil
		}
		if !isRetryable(err) {
			return nil, err
		}
		lastErr = err
	}
	return nil, fmt.Errorf("all %d attempts failed: %w", maxAttempts, lastErr)
}
AFTER — wright generate
// ExecuteWithRetry sends req and retries on retryable errors with
// exponential backoff, up to maxAttempts total attempts.
//
// Each retry waits for the duration returned by backoff(attempt) or
// until ctx is cancelled. Non-retryable errors (see isRetryable) are
// returned immediately without further attempts.
//
// Returns the first successful Response, or an error wrapping the last
// failure if all attempts are exhausted. Returns ctx.Err() if the
// context is cancelled between retries.
func (c *Client) ExecuteWithRetry(ctx context.Context, req *Request, maxAttempts int) (*Response, error) {

How it works

More than a docstring generator

Call graph context
Wright builds a dependency graph before generating. It reads what calls your Go function and what it calls — so docs describe purpose, not just mechanics.
📊
Coverage tracking
Know the exact percentage of documented functions across every file. Set a minimum threshold and enforce it in CI.
🔍
Drift detection
When a function signature changes, Wright flags the stale docstring automatically — as a VS Code warning and a CI failure.
🔌
MCP for AI tools
Exposes your indexed docs to Claude Code, Cursor, and Copilot via MCP so they always have live context about your codebase.

Comparison

How Wright differs from alternatives

go doc (stdlib)
Reads and formats existing godoc — does not generate comments for undocumented functions.
godocdown / swaggo
Exports existing docs to Markdown/Swagger. Still requires you to author every comment.
Copilot
Suggests one comment at a time. No project-wide coverage report or CI gate.

Start documenting your Go codebase

Free VS Code extension · CLI · GitHub Action · MCP server. No credit card required.

Get started free →Read the docs