domain-cli

Build Rust CLIs with clap argument parsing and layered configuration.

3|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/0xharryriddle/codex-field-kit --skill domain-cli-0xharryriddle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-cli
Source: https://github.com/0xharryriddle/codex-field-kit/tree/main/archive/upstream/chasebuild-agent-skills/rust/skills/domain-cli
Command: npx skills add https://github.com/0xharryriddle/codex-field-kit --skill domain-cli-0xharryriddle

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rust CLIs require reliable parsing, helpful UX, and safe configuration. This skill provides a blueprint to implement those concerns in a production-grade tool.

Core Features & Use Cases

  • Argument parsing with clap, including derive-based structs and clear help text.
  • Subcommands and a clean, scalable CLI structure with layered config precedence (CLI > env > config file) and robust exit codes.
  • Configuring progress indicators, error handling, and user-friendly messages for long-running commands.

Quick Start

Use domain-cli to scaffold a Rust CLI project with layered configuration and friendly UX.

Frequently Asked Questions about domain-cli

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

FAQPage Schema
How do I build a Rust CLI with subcommands and layered config?

Build a Rust CLI by using clap for derive-based argument parsing and figment for layered configuration, enforcing precedence from CLI arguments to environment variables to config files for predictable behavior.

What is the best way to handle errors and show progress in Rust command-line tools?

Handle errors in Rust command-line tools by implementing robust error handling with safe exit codes, and use user-facing progress indicators to provide feedback during long-running commands.

How do I structure clear help text for a Rust CLI using clap?

Structure clear help text for a Rust CLI by defining derive-based structs in clap, which automatically generate scalable subcommand structures and detailed help messages for end users.

Does clap support layered configuration precedence for Rust command-line applications?

Clap supports structured argument parsing, and when combined with configuration layers like figment, it enables strict precedence where CLI flags override environment variables, which override config files.

Why do I need safe exit codes in a Rust command-line application?

Safe exit codes are needed in a Rust command-line application to ensure predictable behavior, allowing calling shells or scripts to accurately detect failures and handle errors gracefully during automation.