{"id":18812229,"url":"https://github.com/blobfolio/argyle","last_synced_at":"2026-01-23T04:59:10.220Z","repository":{"id":56731151,"uuid":"340752140","full_name":"Blobfolio/argyle","owner":"Blobfolio","description":"A lightweight, agnostic CLI argument parsing library for Rust.","archived":false,"fork":false,"pushed_at":"2025-04-03T18:26:48.000Z","size":214,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T13:45:50.095Z","etag":null,"topics":["argument-parser","cli","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Blobfolio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Blobfolio"}},"created_at":"2021-02-20T20:59:18.000Z","updated_at":"2025-04-03T18:23:20.000Z","dependencies_parsed_at":"2025-02-26T07:15:18.573Z","dependency_job_id":null,"html_url":"https://github.com/Blobfolio/argyle","commit_stats":{"total_commits":134,"total_committers":1,"mean_commits":134.0,"dds":0.0,"last_synced_commit":"f21bed19a32b206ca7fbeaa0ae99d5018c4fb0bb"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blobfolio%2Fargyle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blobfolio%2Fargyle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blobfolio%2Fargyle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blobfolio%2Fargyle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blobfolio","download_url":"https://codeload.github.com/Blobfolio/argyle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782261,"owners_count":21160717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argument-parser","cli","rust"],"created_at":"2024-11-07T23:30:59.751Z","updated_at":"2026-01-23T04:59:10.215Z","avatar_url":"https://github.com/Blobfolio.png","language":"Rust","funding_links":["https://github.com/sponsors/Blobfolio"],"categories":[],"sub_categories":[],"readme":"# Argyle\n\n[![docs.rs](https://img.shields.io/docsrs/argyle.svg?style=flat-square\u0026label=docs.rs)](https://docs.rs/argyle/)\n[![changelog](https://img.shields.io/crates/v/argyle.svg?style=flat-square\u0026label=changelog\u0026color=9b59b6)](https://github.com/Blobfolio/argyle/blob/master/CHANGELOG.md)\u003cbr\u003e\n[![crates.io](https://img.shields.io/crates/v/argyle.svg?style=flat-square\u0026label=crates.io)](https://crates.io/crates/argyle)\n[![ci](https://img.shields.io/github/actions/workflow/status/Blobfolio/argyle/ci.yaml?style=flat-square\u0026label=ci)](https://github.com/Blobfolio/argyle/actions)\n[![deps.rs](https://deps.rs/crate/argyle/latest/status.svg?style=flat-square\u0026label=deps.rs)](https://deps.rs/crate/argyle/)\u003cbr\u003e\n[![license](https://img.shields.io/badge/license-wtfpl-ff1493?style=flat-square)](https://en.wikipedia.org/wiki/WTFPL)\n[![contributions welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\u0026label=contributions)](https://github.com/Blobfolio/argyle/issues)\n\nThis crate provides an `argue!` macro for generating a CLI argument enum and parsing iterator, ideal for use cases requiring more than the standard library's barebones `args_os` helper, but less than full-service options like [clap](https://crates.io/crates/clap).\n\n\n## Example\n\nThe [docs](https://docs.rs/argyle/latest/argyle/) contain a lot of addition details, but here's a minimal preview to give you an idea of what it's all about.\n\n```rust\nuse argyle::argue;\n\n// Construct the enum and iterator.\nargue! {\n    Help    \"-h\" \"--help\",\n    Version \"-V\" \"--version\",\n    Stderr       \"--stderr\",\n\n    @options\n    Format       \"--format\",\n    Level   \"-l\" \"--level\",\n}\n\n/// # Main.\nfn main() {\n    // Example settings.\n    let mut stderr = false;\n    let mut format: Option\u003cFormat\u003e = None;\n    let mut level = 0_u8;\n    let mut paths: Vec\u003cPathBuf\u003e = Vec::new();\n\n    // Loop through the environmental arguments, taking whatever actions\n    // make sense for your application.\n    for arg in Argument::args_os() {\n        match arg {\n            // You named these!\n            Argument::Help =\u003e print_help(),\n            Argument::Version =\u003e print_version(),\n            Argument::Stderr =\u003e { stderr = true; },\n\n            // Options come with the value as a String.\n            Argument::Format(v) =\u003e {\n                format = Format::from_str(v);\n            },\n            Argument::Level(v) =\u003e {\n                level = v.parse().unwrap_or(0);\n            },\n\n            // Unmatched String values map to the first generic catchall.\n            Argument::Other(v) =\u003e {\n                eprintln!(\"Warning: unrecognized CLI argument {v}.\");\n            },\n\n            // Unmatched values with invalid UTF-8 will be passed through\n            // to the second generic catchall as OsString values.\n            Argument::OtherOs(v) =\u003e {\n                eprintln!(\n                    \"Warning: unrecognized CLI argument {}.\",\n                    v.display(),\n                );\n            },\n        }\n    }\n\n    // Now that the settings have been worked out, do something!\n    // …\n}\n```\n\n\n## Installation\n\nAdd `argyle` to your `dependencies` in `Cargo.toml`, like:\n\n```toml\n[dependencies]\nargyle = \"0.14.*\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblobfolio%2Fargyle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblobfolio%2Fargyle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblobfolio%2Fargyle/lists"}