https://github.com/arnau478/pennant
Argument parser for Zig
https://github.com/arnau478/pennant
argprase zig zig-package
Last synced: 10 months ago
JSON representation
Argument parser for Zig
- Host: GitHub
- URL: https://github.com/arnau478/pennant
- Owner: Arnau478
- License: gpl-3.0
- Created: 2025-01-19T13:06:21.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-26T20:47:45.000Z (about 1 year ago)
- Last Synced: 2025-04-26T21:29:04.189Z (about 1 year ago)
- Topics: argprase, zig, zig-package
- Language: Zig
- Homepage:
- Size: 38.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pennant
Argument parser for Zig.
## Features
- Opposite flags (`--foo`/`--no-foo`, `--uppercase`/`--lowercase`), which act on a single variable and are mutually exclusive
- Values with and without equals sign (`--foo bar` and `--foo=bar` are both valid and equivalent)
- Bool flags never take a value, non-bool flags always do
- Shorthands for bool flags
- Everything is defined in a single struct, with the power of Zig's `comptime`
## Examples
Examples are available in the `examples` folder. They can also be run via `zig build example-[name]`.