effect-cli

Builds TypeScript CLI apps with typed arguments, flags, subcommands and dependency injection using Effect-TS primitives.

22|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-cli-mpsuesser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-cli
Source: https://github.com/mpsuesser/pi-effect-harness/tree/main/harnesses/effect/skills/effect-cli
Command: npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-cli-mpsuesser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you avoid fragile, loosely-typed command-line parsing by giving you a structured way to define arguments, flags, subcommands, and handlers with strong types and dependency injection.

Core Features & Use Cases

  • Typed argument and flag definitions: Build positional arguments and named options with constraints, defaults, transforms, validation, and file/path support.
  • Composable command structure: Create commands, nest subcommands, group them, and share parent flags across subcommands.
  • Effect-based handlers with DI: Implement handlers as Effect programs and provide required runtime/platform services (like NodeServices) for execution.

Example use case: create a CLI tool that parses a typed environment, validates a config file against a Schema, supports a dry-run flag, and runs on the Node runtime with the correct platform services.

Quick Start

Tell the agent to “Create an Effect-TS CLI command named deploy that accepts --env (dev|staging|prod), a --dry-run boolean, and deploys by printing what it would do when dry-run is enabled, using Effect CLI Argument/Flag and Command.run with NodeServices and NodeRuntime.”

Frequently Asked Questions about effect-cli

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

FAQPage Schema
How do I build a type-safe CLI with Effect-TS?

To build a type-safe CLI with Effect, define typed arguments, flags, and subcommands using the unstable CLI primitives (Argument, Flag, Command). Implement handlers as Effect.fn generator programs and execute them with Command.run using NodeServices for Node runtime execution.

How does dependency injection work for command-line handlers in Effect?

Dependency injection in Effect CLI works by implementing your command handlers as Effect programs. You provide the required runtime and platform services, such as NodeServices, directly to Command.run for execution, ensuring consistent command behavior without unvalidated parsing.

Can I validate configuration files against a Schema in an Effect CLI?

Yes, you can validate configuration files against a Schema in an Effect CLI. The framework supports Schema-validated configuration, allowing you to parse typed environments, validate inputs, and handle constrained values, optional or variadic inputs, and file/path arguments securely.

Do I need NodeServices to run an Effect CLI tool?

Yes, you need NodeServices and NodeRuntime to execute Effect CLI tools on the Node runtime. Providing these platform services to Command.run ensures your Effect-based handlers execute correctly with the necessary runtime environment for your Node-based tooling.

What is the best way to structure nested subcommands with shared flags in Effect?

The best way to structure nested subcommands is using Effect-TS Command primitives to create, nest, and group subcommands while sharing parent flags across them. This composable command structure prevents unvalidated parsing and maintains strict typing across your CLI application.