librepl

Create interactive REPL command-line interfaces with custom commands and persistent state.

1|1|Updated Aug 7, 2025
One-click install
npx skills add https://github.com/copilot-ld/copilot-ld --skill librepl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: librepl
Source: https://github.com/copilot-ld/copilot-ld/tree/main/packages/librepl
Command: npx skills add https://github.com/copilot-ld/copilot-ld --skill librepl

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about librepl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an interactive CLI with dependency injection and persistent state?

To build an interactive CLI with dependency injection and persistent state, use a DI-REPL utility that provides customizable commands, a storage hook for saving runtime state, and a configurable app model. This approach supports testability and modular tooling for developer utilities.

What is a dependency-injected REPL and when do I need one for a CLI application?

A dependency-injected REPL is an interactive command interface where commands receive injected dependencies for modular testing and state persistence. You need one when building debugging shells, developer utilities, or CLI apps requiring pluggable commands and testability.

Does this REPL framework support state persistence across multiple terminal sessions?

Yes, the REPL framework supports state persistence across sessions via a configurable storage hook. This allows you to persist configuration and runtime state, ensuring command-line interface data remains available between multiple terminal debugging and utility sessions.

How do I add custom commands and terminal formatting to an interactive CLI tool?

You add custom commands and terminal formatting to an interactive CLI tool by defining command definitions within a configurable app model and utilizing built-in terminal formatting features. This enables structured output and input handling for debugging interfaces and developer utilities.

Can I use a DI-REPL pattern for testing and prototyping developer utilities?

Yes, you can use a DI-REPL pattern for testing and prototyping developer utilities. Dependency injection allows modular testing and easy mocking, while interactive command-line scaffolding enables rapid prototyping of debugging shells and internal tools.