librepl - Interactive REPL utilities. Repl class creates command-line
interfaces with custom commands, state persistence, and terminal formatting.
Supports dependency injection for testability. Use for building CLI tools,
interactive debugging interfaces, and developer utilities.
What problem does it solve?
Solves the challenge of building interactive CLIs by offering a dependency-injected REPL with pluggable commands and persistent state.
Core Features & Use Cases
- Interactive CLI scaffolding: Create commands, handle input, and format output.
- State persistence: Persist configuration and runtime state across sessions via a storage hook.
- Testability and DI: Dependency injection for easy testing and modular tooling.
- Use Case: Quickly prototype debugging shells or CLI utilities for internal tools.
Quick Start
Install @copilot-ld/librepl, import Repl, configure a prompt and commands, and call start() to launch the interactive interface.