{"id":26120884,"url":"https://github.com/pyrmont/argy-bargy","last_synced_at":"2026-03-10T02:01:13.242Z","repository":{"id":147551574,"uuid":"422110483","full_name":"pyrmont/argy-bargy","owner":"pyrmont","description":"A fancy argument parsing library for Janet","archived":false,"fork":false,"pushed_at":"2025-10-15T06:57:04.000Z","size":213,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-15T19:47:25.147Z","etag":null,"topics":["argument-parser","janet"],"latest_commit_sha":null,"homepage":"","language":"Janet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyrmont.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-10-28T07:41:49.000Z","updated_at":"2025-10-15T06:57:08.000Z","dependencies_parsed_at":"2023-12-11T17:44:15.134Z","dependency_job_id":"10daa469-3edd-45fd-915a-452c751f8504","html_url":"https://github.com/pyrmont/argy-bargy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pyrmont/argy-bargy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Fargy-bargy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Fargy-bargy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Fargy-bargy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Fargy-bargy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyrmont","download_url":"https://codeload.github.com/pyrmont/argy-bargy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Fargy-bargy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30322634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T01:36:58.598Z","status":"online","status_checked_at":"2026-03-10T02:00:06.579Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","janet"],"created_at":"2025-03-10T13:53:02.981Z","updated_at":"2026-03-10T02:01:13.236Z","avatar_url":"https://github.com/pyrmont.png","language":"Janet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Argy-Bargy\n\n[![Test Status][icon]][status]\n\n[icon]: https://github.com/pyrmont/argy-bargy/workflows/test/badge.svg\n[status]: https://github.com/pyrmont/argy-bargy/actions?query=workflow%3Atest\n\nArgy-Bargy is a fancy argument parsing library for Janet.\n\n## Features\n\nArgy-Bargy has the following features:\n\n- parses options (arguments that begin with a `--` or `-`)\n  - supports four option types (flags, counts, single values and\n    multiple values)\n  - supports user-defined conversions from text input\n  - support parsing of combined short options (e.g. `-lah`)\n  - support the use of `=` and white space between long options and values\n- parses parameters (arguments that are not options)\n  - supports positional parameters and catch-all parameters\n  - supports user-defined conversions from text\n  - supports required parameters and default values\n- parses subcommands\n  - supports arbitrary number of subcommands\n  - supports per-subcommand options and parameters\n- generates documentation\n  - generates usage help based on parsing rules\n  - supports user-defined usage examples\n  - indents usage instructions automatically\n\n## Installation\n\nAdd the dependency to your `info.jdn` file:\n\n```janet\n  :dependencies [\"https://github.com/pyrmont/argy-bargy\"]\n```\n\n## Usage\n\nArgy-Bargy can be used like this:\n\n### Without Subcommands\n\n```janet\n(import argy-bargy)\n\n(def rules\n  [\"--foo\" {:kind :single\n            :help \"The option foo takes a single value.\"}\n   \"--bar\" {:kind :flag\n            :help \"The option bar is a flag.\"}\n   :srcs   {:help  \"The source files for the program.\"\n            :rest? true}])\n\n(def info\n  {:about \"A program that does something to the 'srcs' parameters.\"\n   :rider \"For more information, visit our website at example.com/program.\"})\n\n(def config {:rules rules :info info})\n\n(argy-bargy/parse-args \"program\" config)\n```\n\nIf the argument is `-h`, the following will be printed to stdout:\n\n```text\nusage: program [--foo \u003cfoo\u003e] [--bar] srcs...\n\nA program that does something to the 'srcs' parameters.\n\nParameters:\n\n srcs    The source files for the program.\n\nOptions:\n\n     --foo \u003cfoo\u003e    The option foo takes a single value.\n     --bar          The option bar is a flag.\n -h, --help         Show this help message.\n\nFor more information, visit our website at example.com/program.\n```\n\n### With Subcommands\n\n```janet\n(import argy-bargy)\n\n(def subcommands\n  [\"foo\" {:rules {:kind :single\n                  :help \"The option foo takes a single value.\"}\n          :help  \"Run the foo command.\"}\n   \"bar\" {:rules {:kind :flag\n                  :help \"The option bar is a flag.\"}\n          :help  \"Run the bar command.\"}])\n\n(def info\n  {:about \"A program that provides subcommands that do something.\"\n   :rider \"For more information, visit our website at example.com/program.\"})\n\n(def config {:info info :subs subcommands})\n\n(argy-bargy/parse-args \"program\" config)\n```\n\nIf the argument is `-h`, the following will be printed to stdout:\n\n```text\nusage: program \u003csubcommand\u003e [\u003cargs\u003e]\n\nA program that provides subcommands that do something.\n\nOptions:\n\n -h, --help    Show this help message.\n\nSubcommands:\n\n foo    Run the foo command.\n bar    Run the bar command.\n\nFor more information on each subcommand, type 'program help \u003csubcommand\u003e'.\n\nFor more information, visit our website at example.com/program.\n```\n\n## API\n\nDocumentation for Argy-Bargy's API is in [api.md][api].\n\n[api]: https://github.com/pyrmont/argy-bargy/blob/master/api.md\n\n## Bugs\n\nFound a bug? I'd love to know about it. The best way is to report your bug in\nthe [Issues][] section on GitHub.\n\n[Issues]: https://github.com/pyrmont/argy-bargy/issues\n\n## Licence\n\nArgy-Bargy is licensed under the MIT Licence. See [LICENSE][] for more details.\n\n[LICENSE]: https://github.com/pyrmont/argy-bargy/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrmont%2Fargy-bargy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyrmont%2Fargy-bargy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrmont%2Fargy-bargy/lists"}