argh is a tiny, pragmatic command-line argument parsing library that favors simple, readable code over elaborate configuration. It’s designed for the case where you just want to declare a few flags, accept some positional arguments, and print helpful usage text without wiring up a heavy framework. The API is intentionally compact so you can parse arguments inline near main() and map them straight into native types. It supports short and long options, boolean switches, and key–value flags while keeping error messages and help output understandable for end users. Subcommands can be modeled without much boilerplate, letting you structure larger CLIs while keeping each command self-contained. The overall feel is “get out of your way”: minimal setup, zero magic, and a straightforward path from argv to validated inputs.

Features

  • Minimal API for flags, options, and positional args
  • Clean help and usage generation with sane defaults
  • Straightforward type conversion and validation hooks
  • Optional subcommand structure for multi-tool CLIs
  • Friendly error reporting for unknown or malformed flags
  • Header- or source-only footprint that drops into small apps

Project Samples

Project Activity

See All Activity >

License

BSD License

Follow Argh

Argh Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Argh!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Rust

Related Categories

Rust Parser Generators

Registered

2025-10-10