domain-cli

Build Rust CLIs with clap, figment, and indicatif for type-safe parsing and layered config.

Updated Jan 21, 2026
One-click install
npx skills add https://github.com/lywa1998/self-host-claude-marketplace --skill domain-cli-lywa1998
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-cli
Source: https://github.com/lywa1998/self-host-claude-marketplace/tree/main/plugins/rust-skills/skills/domain-cli
Command: npx skills add https://github.com/lywa1998/self-host-claude-marketplace --skill domain-cli-lywa1998

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The domain-cli skill provides a structured approach to building Rust command-line interfaces by enforcing ergonomic UX, predictable behavior, and modular design patterns.

Core Features & Use Cases

  • Type-safe argument parsing with clap and derive macros
  • Subcommand orchestration and command hierarchy
  • Layered configuration precedence (CLI > env > file)
  • Deterministic user feedback and progress indicators for long-running CLI tasks

Quick Start

Explain how to add a new subcommand to a Rust CLI tool using clap and layered configuration.

Frequently Asked Questions about domain-cli

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

FAQPage Schema
How do I structure subcommands in a Rust CLI using clap?

Layering CLI configuration in Rust requires defining precedence across CLI arguments, environment variables, and configuration files. Using crates like figment alongside clap enforces type-safe config layering for deterministic application behavior.

How do I add progress indicators to long-running Rust CLI tasks?

Adding progress indicators to long-running Rust CLI tasks requires crates like indicatif to provide deterministic user feedback. This ensures predictable UX across commands during extended execution phases.

What is the best way to ensure deterministic exit codes in Rust CLIs?

Ensuring deterministic exit codes in Rust CLIs requires structured error-handling and domain-driven design patterns. By enforcing predictable behavior and modular design, the CLI returns reliable exit codes across all command paths.

Can I use clap derive macros for type-safe argument parsing in Rust subcommand hierarchies?

Clap derive macros fully support type-safe argument parsing within Rust subcommand hierarchies. They enable domain-driven design enforcement and ergonomic UX across complex command structures without runtime parsing errors.

How do I layer configuration precedence in a Rust CLI tool?

Layering CLI configuration in Rust requires defining precedence across CLI arguments, environment variables, and configuration files. Using crates like figment alongside clap enforces type-safe config layering for deterministic application behavior.