Registry / cli / cargs
library1.2.0vcpkgunverified

A lightweight cross-platform getopt alternative that works on Linux, Windows and macOS. Command line argument parser library for C/C++. Can be used to parse argv and argc parameters.

vcpkg install cargs
INSTALL
IMPORT
SIG · CARGS
C
cargs
clicppv1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cargs.h
#include <cargs.h>

Parses command-line arguments with cargs

#include <cargs.h> #include <stdio.h> int main(int argc, char **argv) { struct cag_option options[] = { {.identifier = 'h', .access_letters = "h", .access_name = "help", .value_name = NULL, .description = "Show help"} }; char identifier; while ((identifier = cag_option_get(options, sizeof(options)/sizeof(options[0]), &argc, &argv)) != -1) { if (identifier == 'h') { printf("Help requested\n"); } } return 0; }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.2.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
28
Resources

No resource links recorded.