claptrap
Install latest/stable of claptrap
Ubuntu 16.04 or later?
Make sure snap support is enabled in your Desktop store.
Details for claptrap
Package name
- claptrap
License
- Apache-2.0
Last updated
- 17 August 2025 - latest/stable
- 29 December 2025 - latest/edge
Websites
Contact
Source code
Report a bug
External link warning
You are about to open
Do you wish to proceed?
Report a Snap Store violation
Report claptrap for a Snap Store violation
Snap Store Violation Report submitted successfully
Thank you for your report. Information you provided will help us investigate further.
Error submitting report
There was an error while sending your report. Please try again later.
Share this snap
Generate an embeddable card to be shared on external websites.
Bring the power of Clap to shell scripts
Claptrap is a tool that allows you to parse complex command line arguments in shell scripts using a declarative specification.
Features:
Claptrap brings the full power of Clap command line parsing to shell scripts. Command line interface specifications can
be declared in toml, yaml or json and used as standalone files or embedded directly in scripts.
Claptrap Supports bash, zsh, fish and PowerShell scripts and can run on Linux, BSD, macOS, and Windows. Claptrap
can also automatically generate shell completions, man pages, markdown documentation and template scripts.
See the [documentation](https://claptrap.sh) for more details.
Example:
#!/usr/bin/env bash
set -euo pipefail
eval "$(claptrap --spec - -- "$@" <<'SPEC'
name = "hello"
[args]
name = { short = 'n', long = "name", default-value = "world" }
SPEC
)"
echo "hello, ${claptrap_name}!"
| Revision | Channel | Version | Build | Commit | Download SBOM |
|---|
The build and commit information is derived from build infrastructure records.
Install claptrap on your Linux distribution
Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get more details on the installing snapd documentation.