{"id":17696101,"url":"https://github.com/ovyerus/vexil","last_synced_at":"2025-10-16T18:59:08.754Z","repository":{"id":62430715,"uuid":"402070606","full_name":"Ovyerus/vexil","owner":"Ovyerus","description":"An Elixir CLI flag parser that does just enough.","archived":false,"fork":false,"pushed_at":"2022-11-16T02:20:12.000Z","size":53,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T02:20:57.198Z","etag":null,"topics":["cli","command-line","elixir","flag-parser","flags"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/vexil","language":"Elixir","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/Ovyerus.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}},"created_at":"2021-09-01T13:27:07.000Z","updated_at":"2022-11-30T08:48:52.000Z","dependencies_parsed_at":"2023-01-23T08:00:39.509Z","dependency_job_id":null,"html_url":"https://github.com/Ovyerus/vexil","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ovyerus%2Fvexil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ovyerus%2Fvexil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ovyerus%2Fvexil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ovyerus%2Fvexil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ovyerus","download_url":"https://codeload.github.com/Ovyerus/vexil/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253877363,"owners_count":21977634,"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":["cli","command-line","elixir","flag-parser","flags"],"created_at":"2024-10-24T14:43:16.711Z","updated_at":"2025-10-16T18:59:03.722Z","avatar_url":"https://github.com/Ovyerus.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vexil\n\n\u003e An Elixir flag parser that does _just_ enough.\n\nVexil is a CLI flag parsing library for Elixir, intended to be used in places\nwhere you might want to parse user input akin to how command line arguments are\nparsed, but in an area where you aren't getting the input from an actual command\nline, say a website or a chat platform bot.\n\nI found [OptionParser](https://hexdocs.pm/elixir/1.12/OptionParser.html)'s\nsettings to be too confusing for me, and\n[Optimus](https://github.com/funbox/optimus) is intended for use in regular\ncommand line application (with the in-built help and closing the application\nwhen encountering input errors), so Vexil slots in between the two as a sort of\nmiddle ground, letting you control how errors are displayed/handled for the\nuser, and still having a sane interface for defining flags and options.\n\n---\n\nVexil is currently beta-quality software, but is well tested with over 90%\ncoverage at time of writing, including most standard usage scenarios for it.\nUntil proper documentation is written and it has been sufficiently tested in a\nreal-world application however, it will staying in [ZeroVer](https://0ver.org/)\nand certain aspects of its functionality may change at any time until a stable\n`1.0` release.\n\nPull requests for bug fixes are welcome, including corresponding tests to make\nsure they actually work for what it is they're trying to fix.\n\n## Installation\n\nAdd `vexil` to your dependencies in `mix.exs`.\n\n```elixir\ndef deps do\n  [{:vexil, \"~\u003e 0.1\"}]\nend\n```\n\n## Example\n\n```elixir\niex\u003e argv = \"--end-at 256 -vvv some stuff after\" |\u003e OptionParser.split()\n[\"--end-at\", \"256\", \"-vvv\", \"some\", \"stuff\", \"after\"]\niex\u003e options = [\n...\u003e   options: [\n...\u003e     end_at: %Vexil.Structs.Option{\n...\u003e       short: \"e\",\n...\u003e       long: \"end-at\",\n...\u003e       parser: :integer, # Default `:string`\n...\u003e       required: true\n...\u003e     }\n...\u003e   ],\n...\u003e   flags: [\n...\u003e     verbose: %Vexil.Structs.Flag{\n...\u003e       short: \"v\",\n...\u003e       long: \"verbose\",\n...\u003e       multiple: true\n...\u003e     }\n...\u003e   ]\n...\u003e ]\niex\u003e {:ok, values, {option_errors, flag_errors}} = Vexil.parse(argv, options)\n{:ok,\n %{\n   argv: [\"some\", \"stuff\", \"after\"],\n   flags: %{verbose: 3},\n   options: %{end_at: 256}\n }, {[], []}}\niex\u003e argv2 = \"-vvv some stuff after\" |\u003e OptionParser.split()\niex\u003e {:ok, values, {option_errors, flag_errors}} = Vexil.parse(argv2, options)\n{:ok, %{argv: [\"some\", \"stuff\", \"after\"], flags: %{verbose: 3}, options: %{}},\n {[{:error, :missing_required_options, [:end_at]}], []}}\n```\n\nThis section will be updated as documentation is expanded.\n\n## License\n\nVexil is released under the MIT License, see the [LICENSE](./LICENSE) file for\ndetails.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovyerus%2Fvexil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovyerus%2Fvexil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovyerus%2Fvexil/lists"}