Herdr UI
Herdr의 TUI가 뛰어나며, 창을 통해 추가되는 기능
CLI를 위한 명세서이다
A specification for CLIs
개발 도구Rust · GoGitHub @jdx직접 설치운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
설치형 프로젝트는 배포 도메인 없이도 확인할 수 있습니다. 개인 저장소는 GitHub 로그인으로, 조직 저장소는 위의 저장소 확인 파일로 직접 확인해 주세요.
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Define your CLI once. Generate the tools around it.
Usage is a portable KDL specification, a command-line utility,
and a Rust framework. Describe commands, flags, arguments, and settings in one
place, then use that definition for parsing, help, shell completions, Markdown
docs, man pages, and typed clients.
Applications can use usage-rs to derive a typed parser and a portable Usage
spec from the same Rust declaration:
Usage has its own derive vocabulary: use #[usage(...)] on commands, fields,
and value variants. See the Rust framework guide (https://usage.jdx.dev/rREADME 전문 보기 ↗Define your CLI once. Generate the tools around it.
Usage is a portable KDL specification, a command-line utility, and a Rust framework. Describe commands, flags, arguments, and settings in one place, then use that definition for parsing, help, shell completions, Markdown docs, man pages, and typed clients.
Get started · Rust framework · Spec reference · CLI reference
| Your starting point | How Usage fits |
|---|---|
| A new Rust CLI | Derive a typed parser and exportable spec from structs and enums. |
| An existing CLI | Export a spec from your framework, or write KDL. |
| A script | Declare arguments in comments and let Usage parse them. |
| Code that calls a CLI | Generate a TypeScript or Python SDK. |
Applications can use usage-rs to derive a typed parser and a portable Usage
spec from the same Rust declaration:
[dependencies]
usage-rs = { version = "6" }
use usage_rs::Cli;
#[derive(Cli)]
#[usage(bin = "example", version)]
struct App {
/// Print more detail.
#[usage(short = 'v', long, count)]
verbose: u8,
/// Files to process.
files: Vec<String>,
}
fn main() {
let app = App::parse();
// app.verbose and app.files are ready to use
}
Usage has its own derive vocabulary: use #[usage(...)] on commands, fields,
and value variants. See the Rust framework guide
and clap migration guide for
the supported mappings and intentional differences.
Choose one installation method:
# mise
mise use -g usage
# Homebrew
brew install usage
# Cargo
cargo install usage-cli --locked
The package is usage-cli; the executable is usage.
Other installation options.
With a spec saved as mycli.usage.kdl:
usage lint mycli.usage.kdl
usage generate completion zsh mycli --file mycli.usage.kdl --install
usage generate markdown --file mycli.usage.kdl --out-file reference.md
usage generate manpage --file mycli.usage.kdl --out-file mycli.1
The generated shell scripts need usage at completion time. The Rust framework
can also provide completions directly
from your binary.
Follow the spec walkthrough for a complete example. The Go framework is a development preview and is not ready for adoption or testing.
See CONTRIBUTING.md for development setup, checks, and generated files.
Usage's design owes a great deal to clap. Its help output and diagnostic conventions make clap migrations familiar, while Usage's native derive attributes reflect its portable spec model. clap's license is reproduced in NOTICE.md.