# clap

> Command line argument parser for Rust, declarative (derive) or procedural (builder)

Source: https://talira.ai/catalog/clap-5rrdhgzb
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / cli frameworks](https://talira.ai/categories/libraries/cli-frameworks), [languages / rust](https://talira.ai/categories/languages/rust)
- Licence: MIT OR Apache-2.0[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- Backed by: [clap-rs](https://talira.ai/orgs/clap-rs.md)

clap is the most widely used command line argument parser for Rust. You define a CLI declaratively with its derive macros or procedurally with its builder API, and users get a polished experience out of the box: common argument behaviour, generated help, suggested fixes for typos, coloured output and shell completions (with the companion clap_complete crate). It aims to be flexible enough to port an existing CLI interface, with reasonable parse performance. It's dual-licensed MIT or Apache 2.0 and funded through Open Collective.

## Links

- GitHub: https://github.com/clap-rs/clap
- Docs: https://docs.rs/clap/

## Problems it solves

- parse command line arguments in my Rust program
- generate --help output and shell completions for a Rust CLI
- define CLI flags and subcommands with a struct and derive macro
- build a Rust CLI with subcommands

## Features

- derive macros and a builder API
- generated help
- suggested fixes for mistyped arguments
- coloured output
- shell completions via clap_complete
- subcommands

## Trust

Overall: 0.27 out of 1.
Signals: backing 0.30, extensibility 0.00.

- backed by clap-rs

Warnings:

- GitHub activity not fetched yet

## Sources

[^1]: https://github.com/clap-rs/clap/blob/main/Cargo.toml (checked 24 Nov 2026)
[^2]: https://github.com/clap-rs/clap (checked 24 Nov 2026)
