STATUS: CONNECTED
LATENCY: 42ms

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 hashing
  • clock — Time abstraction for deterministic test behaviour
  • mylog — Structured logging with test support
  • project — Project introspection utilities
  • sandbox — 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.

GitHub

View the source code on GitHub