GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - TheBearodactyl/usage: A specification for CLIs

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

1,274 Commits
1,274 Commits

Folders and files

NameName
Last commit message
Last commit date
.codex
.codex
 
 
.config
.config
 
 
.cursor
.cursor
 
 
.entire
.entire
 
 
.github
.github
 
 
.idea
.idea
 
 
argv
argv
 
 
benches
benches
 
 
clap_usage
clap_usage
 
 
cli
cli
 
 
config
config
 
 
conformance
conformance
 
 
corpus
corpus
 
 
derive
derive
 
 
docs
docs
 
 
examples
examples
 
 
go
go
 
 
integrations
integrations
 
 
lib
lib
 
 
tasks
tasks
 
 
test
test
 
 
usage-dynamic
usage-dynamic
 
 
usage-rs
usage-rs
 
 
validation
validation
 
 
xtask
xtask
 
 
.codacy.yml
.codacy.yml
 
 
.editorconfig
.editorconfig
 
 
.eslintrc.cjs
.eslintrc.cjs
 
 
.gitignore
.gitignore
 
 
.markdownlintignore
.markdownlintignore
 
 
.mega-linter.yml
.mega-linter.yml
 
 
.prettierignore
.prettierignore
 
 
.prettierrc.yml
.prettierrc.yml
 
 
.yamllint.yml
.yamllint.yml
 
 
AGENTS.md
AGENTS.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CLAUDE.md
CLAUDE.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
NOTICE.md
NOTICE.md
 
 
README.md
README.md
 
 
aube-lock.yaml
aube-lock.yaml
 
 
cliff.toml
cliff.toml
 
 
communique.toml
communique.toml
 
 
greptile.json
greptile.json
 
 
lefthook.yml
lefthook.yml
 
 
mise.lock
mise.lock
 
 
mise.toml
mise.toml
 
 
package.json
package.json
 
 
tak.toml
tak.toml
 
 

Repository files navigation

Usage

Usage is a spec, CLI, and Rust framework for defining command-line interfaces. Arguments, flags, environment variables, and config files can all be described in a portable KDL spec. Think of it as OpenAPI for CLIs: one declaration can drive parsing and every user-facing artifact.

  • Generate shell completions
  • Generate Markdown documentation and man pages
  • Parse arguments from any language
  • Scaffold a spec into CLI frameworks in different languages
  • Build a typed Rust CLI with a zero-dependency runtime

See more at usage.jdx.dev.

Rust framework

Applications can use usage-rs to derive a typed parser and a portable Usage spec from the same Rust declaration:

[dependencies]
usage = { package = "usage-rs", version = "6" }
use usage::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.

Sponsors

usage is sponsored by entire.io and 37signals.

View all sponsors.

Acknowledgements

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.

License

MIT. Third-party notices are in NOTICE.md.

About

A specification for CLIs

usage.jdx.dev

Resources

Readme
License

Contributing

Contributing
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.