#clap #env-var #wildcard #expand #wild #packages #argfile

no-std clientele

Clientele packages clap, camino, dotenvy, argfile, and wild into one dependency

9 releases

0.2.4 Oct 15, 2024
0.2.3 Oct 15, 2024
0.1.4 Sep 8, 2024
0.1.3 Aug 23, 2024
0.0.1 Aug 21, 2024

#331 in Command-line interface

Download history 95/week @ 2024-08-24 22/week @ 2024-08-31 199/week @ 2024-09-07 20/week @ 2024-09-14 25/week @ 2024-09-21 162/week @ 2024-09-28 34/week @ 2024-10-05 612/week @ 2024-10-12 54/week @ 2024-10-19 55/week @ 2024-10-26 149/week @ 2024-11-02 86/week @ 2024-11-09 61/week @ 2024-11-16 31/week @ 2024-11-23 15/week @ 2024-11-30 43/week @ 2024-12-07

168 downloads per month
Used in 4 crates (2 directly)

Unlicense

27KB
433 lines

Clientele.rs

License Compatibility Package

Clientele makes it easy to write superb command-line utilities in Rust that follow consistent best practices on all target platforms including Linux, macOS, and Windows. It packages and re-exports clap, camino, dotenvy, argfile, and wild into a single easy dependency.

✨ Features

  • Showcases how to structure a CLI program in Rust (see the examples).
  • Loads environment variables from .env files (using the dotenvy crate).
  • Expands wildcards (globs) on Windows (using the wild crate).
  • Expands @argfiles similarly to javac or Python (using the argfile crate).
  • Defines a standard set of essential CLI options (using the clap crate).
  • Provides the Utf8Path and Utf8PathBuf types (using the camino crate).
  • Supports opting out of any feature using comprehensive feature flags.
  • Adheres to the Rust API Guidelines in its naming conventions.
  • 100% free and unencumbered public domain software.

🛠️ Prerequisites

⬇️ Installation

Installation via Cargo

cargo add clientele

👉 Examples

See lib/clientele/examples/skeleton/main.rs for a complete example.

Importing the library

use clientele::*;

📚 Reference

Options

StandardOptions

Options:
      --color <COLOR>  Set the color output mode [default: auto] [possible values: auto, always, never]
  -d, --debug          Enable debugging output
      --license        Show license information
  -v, --verbose...     Enable verbose output (may be repeated for more verbosity)
  -V, --version        Print version information
  -h, --help           Print help

👨‍💻 Development

git clone https://github.com/artob/clientele.rs.git

Share on Twitter Share on Reddit Share on Hacker News Share on Facebook

Dependencies

~0.2–10MB
~110K SLoC