The cleanup crew for your coding agent

codalotl is an AI-powered CLI for Go that turns agent sprawl into production-ready code—fixing docs, duplicates, layout, and names with fast AST-based analysis. Works alongside your existing tools.

Features

Documentation — stays true to the code

  • Autogenerates package/type/func comments to GoDoc conventions.
  • Reflows and standardizes comment width and formatting.
  • Detects and repairs doc - code drift; cleans noisy inline comments.
  • Polishes tone, spelling, and grammar for a consistent voice.
  • Easily apply your own documentation conventions.

Code deduplication — kill repetition, keep intent

  • Finds structurally similar code across the package.
  • Extracts helpers and updates call sites automatically.
  • Produces small, reviewable diffs that cut maintenance cost.

Package layout — files organized the Go way

  • Moves types, funcs, and helpers into the right files; sorts declarations by convention.
  • Keeps helpers near the code they support.
  • Optional file creation/renaming with -allow-new-files when needed.

Variable naming — names that read like Go

  • Renames variables and parameters for clarity and consistency.
  • Applies idiomatic Go naming and acronym rules.
  • Normalizes across files to reduce cognitive load in reviews.

Frequently Asked Questions

What exactly is codalotl?

codalotl is the cleanup crew for your coding agent. It's a local CLI for Go that turns messy or machine‑generated code into production‑ready changes—fixing documentation, deduplicating repeated logic, organizing package layout, and normalizing names. Under the hood it uses fast AST‑based analysis plus targeted model calls, and outputs small, reviewable diffs you can commit with confidence.

How is codalotl different than a coding agent?

Agents try to build features. codalotl refines code you already have.

  • Scope: focused on docs, duplication, layout, and naming—not inventing business logic.
  • Structure-aware: uses the Go AST to make precise, cross-file edits that keep intent intact.
  • Reviewable: produces tight diffs instead of sprawling rewrites.
  • Tool-friendly: runs alongside your formatter, linter, and CI—no lock-in, no scaffolding.
Can't my agent just refactor and add docs?

Not reliably - especially across a whole package. Agents are great at one-off, explicit edits ("document this function"). The moment you ask for "document everything" or "rename things consistently," they skip items, stop early, or forget parts of your style guide. The more conventions you stack, the more brittle they become.

What codalotl does differently

  • Complete coverage. We walk the Go AST to inventory every package/type/func that needs attention, then verify the result - so nothing gets missed.
  • All your conventions, enforced together. GoDoc style, idiomatic naming (including acronyms), and file layout are applied consistently rather than "best-effort."
  • Behavior-preserving refactors. We find structural duplication, extract helpers, update call sites, and normalize names across files - emitting small, reviewable diffs.
  • Reliable process. Changes are decomposed into focused steps with targeted model calls and automatic checks, yielding consistent results run-to-run.

Use your agent to build features. Use codalotl to make the result consistent, fully documented, and ready for PR.

Why just Go?

Doing this well is language-specific. Go has unique documentation conventions (GoDoc), idiomatic naming rules (including acronym handling), and well-worn ways to organize packages and files. codalotl walks the AST to understand what’s documented, what’s duplicated, and what should move—so it’s tuned deeply to Go. Other languages may come later, but only when we can match this level of quality.

Is codalotl free?

Yes. At some point in the distant future, when all the features are extensively fleshed out, codalotl may have a small fee (which would be communicated well ahead of time).

Is codalotl open source?

No. We love OSS, but codalotl itself isn't open source and we don't plan to open it.

Do you proxy model requests?

No. You bring your own API keys or run your own LLMs, and requests go directly from your machine to the model provider. We don't sit in the middle.

What models does it support?

codalotl works with major providers and OpenAI-compatible “drop-in” APIs. If your provider exposes an OpenAI-style completions/chat endpoint, it likely works. You supply the keys; swap models anytime without changing your workflow.

Will my code stay private?

Yes. Analysis and edits run locally, and your code never touches our servers. Any model calls go straight from your machine to the provider you configured. If you self‑host a model, nothing leaves your network.

codalotl visualization

Ready to refactor your codebase?

Install the CLI to get started.

Install