cli-toolkit - page.html
cli-toolkit is a modular Go library that provides reusable building blocks for command-line applications. It prioritizes testability through dependency injection, making it easy to mock filesystem operations and system interactions in tests.
Packages
toolkit— Core utilities: environment management, filesystem operations, user info, and hashingclock— Time abstraction for deterministic test behaviourmylog— Structured logging with test supportproject— Project introspection utilitiessandbox— Isolated test environments for safe filesystem testing
Design Goals
The library enforces clear separation of concerns and boundary enforcement so that each package can be used independently. Dependency injection throughout means that filesystem operations and system interactions can be swapped out in tests without any patching.
Usage
cli-toolkit serves as the foundation for other CLI tools — most notably tapper, a knowledge base management tool.