A tasty Go toolkit for CLI tools and terminal UIs. Especially suited for building agentic tools like Claude Code.
go get github.com/deepnoodle-ai/wonton@latestThe cli and tui packages form the core of Wonton, providing an ergonomic API
for building polished command line tools quickly, whether you're writing the
code yourself or working with AI coding agents.
Dependencies are minimal: mostly the standard library and golang.org/x/....
The packages follow Go idioms, ship with thorough documentation, and include
examples throughout.
Pick the packages you need. Wonton provides 20+ packages that you can adopt incrementally or all at once.
Wonton works well if you're:
- Building interactive Go CLIs where UX matters
- Building agentic tools like Claude Code, Gemini CLI, or Codex
- Working with HTML, markdown, source code, or diffs
- Using AI coding agents and want them to generate correct code
- Keeping dependencies minimal for supply chain security
Each package has a single responsibility, but they're versioned and released together as one Go module.
Integration over isolation. Packages are designed to work together and provide a solid foundation. No compatibility matrix. No dependency conflicts.
Built for AI-assisted development. Idiomatic APIs, thorough documentation, and examples throughout help AI coding agents generate correct code.
Minimal dependencies. Most functionality is implemented directly, keeping your dependency graph small. Fewer dependencies means less supply chain risk.
| Package | Description |
|---|---|
| assert | Test assertions with diffs |
| cli | Commands, flags, config, middleware |
| clipboard | System clipboard read/write |
| color | ANSI colors, RGB/HSL, gradients |
| crawler | Web crawler with caching |
| env | Config from env vars, .env, JSON |
| fetch | HTTP fetching with HTML to markdown |
| gif | Animated GIF creation |
| git | Read-only Git operations |
| htmlparse | HTML parsing, metadata, links |
| htmltomd | HTML to Markdown conversion |
| humanize | Human-readable formatting |
| retry | Retry with backoff and jitter |
| schema | JSON Schema types for LLM tools |
| sse | Server-Sent Events client |
| terminal | Terminal control and input decoding |
| termsession | Session recording (asciinema format) |
| termtest | Terminal output testing |
| tui | Declarative TUI with layout engine |
| unidiff | Unified diff parsing |
| web | URL utilities, binary fetch, search |
Every folder under examples/ is a standalone main package you can run directly:
| Category | Example | Description |
|---|---|---|
| CLI | go run ./examples/cli/basic |
Minimal command-line app |
| CLI | go run ./examples/cli/flags |
Flag types, defaults, and enums |
| TUI | go run ./examples/tui/text_animation |
Animated text with flex layout |
| TUI | go run ./examples/tui/input_forms |
Text input and form handling |
| Web | go run ./examples/sitecheck |
Link checker with live TUI |
| Web | go run ./examples/webwatch |
Page monitor with change diffs |
See examples/README.md for the full list.
Can I import just one package?
Yes, and this is expected:
import "github.com/deepnoodle-ai/wonton/htmltomd"Go downloads the module once but only compiles what you import.
What are the external dependencies?
Minimal. Check go.mod since that is the source of truth.
Is this production-ready?
We use it in production. APIs may evolve in minor ways before v1.0. Pin your version.
Why "Wonton"?
Like its namesake: a delicious bundle of savory ingredients that you can drop into a larger recipe.
Pull requests for bug fixes, ergonomic improvements, documentation, and tests are welcome. We don't anticipate adding new packages, so please don't assume a PR for one will be merged.
A few things we value:
- Backwards compatibility. Avoid breaking changes to existing APIs.
- Ergonomics. The APIs and codebase should be intuitive for both humans and AI agents.
- Test coverage. New code should include tests; improvements to existing coverage are appreciated.
- When in doubt, reach out. Open an issue to discuss before investing time in a large change.
Run tests before submitting:
go test ./...See individual package READMEs for package-specific notes.