{"id":20971834,"url":"https://github.com/marco-m/clim","last_synced_at":"2025-08-28T22:22:44.672Z","repository":{"id":233349046,"uuid":"730396780","full_name":"marco-m/clim","owner":"marco-m","description":"command-line argument parsing for Go","archived":false,"fork":false,"pushed_at":"2025-06-30T20:17:29.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-26T09:46:21.096Z","etag":null,"topics":["cli","command-line","command-line-parser","getopt","parsing"],"latest_commit_sha":null,"homepage":"","language":"Go","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/marco-m.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}},"created_at":"2023-12-11T20:48:36.000Z","updated_at":"2025-06-30T20:17:32.000Z","dependencies_parsed_at":"2024-04-15T22:54:50.101Z","dependency_job_id":"9e9e3008-8654-4df0-b70b-daba7a061c5c","html_url":"https://github.com/marco-m/clim","commit_stats":null,"previous_names":["marco-m/clim"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/marco-m/clim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-m%2Fclim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-m%2Fclim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-m%2Fclim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-m%2Fclim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marco-m","download_url":"https://codeload.github.com/marco-m/clim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-m%2Fclim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272567330,"owners_count":24956779,"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","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"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":["cli","command-line","command-line-parser","getopt","parsing"],"created_at":"2024-11-19T04:05:24.067Z","updated_at":"2025-08-28T22:22:44.656Z","avatar_url":"https://github.com/marco-m.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🫧  clim  🫧\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/marco-m/clim.svg)](https://pkg.go.dev/github.com/marco-m/clim)\n[![Build Status](https://api.cirrus-ci.com/github/marco-m/clim.svg?branch=master)](https://cirrus-ci.com/github/marco-m/clim)\n\nCommand-line argument parsing for Go:\n\n* Simple, small, can parse anything via the Value interface.\n* No calls to os.Exit: easy to test, total control over termination.\n* No output behind your back, always returns a string: easy to test.\n* Support for subcommands.\n* Support for help.\n* Support for subcommand groups.\n\n## How does it look like?\n\n```console\n$ go run ./examples/hg -h\nhg -- Mercurial Distributed SCM\n\nUsage: hg \u003ccommand\u003e [options]\n\navailable commands:\n\nRepository creation:\n\n clone        make a copy of an existing repository\n init         create a new repository in the given directory\n\nRemote repository management:\n\n incoming     show new changesets found in source\n outgoing     show changesets not found in the destination\n\nOptions:\n\n -h, --help    Print this help and exit\n```\n\nLet's follow a subcommand:\n\n```console\n$ go run ./examples/hg incoming -h\nhg incoming -- show new changesets found in source\n\nUsage: hg incoming [options]\n\nOptions:\n\n --bundle FILE             file to store the bundles into\n -f, --force               run even if remote repository is unrelated (default: false)\n -n, --newest-first        show newest record first (default: false)\n -r, --rev REV[,REV,..]    remote changeset(s) intended to be added\n\n -h, --help                Print this help and exit\n```\n\nIt also supports optional multi-line description, multi-line examples and multi-line footer:\n\n```console\n$ go run ./examples/flat -h\nflat -- bangs head against wall\n\n Long description.\n Could be multi-line.\n\nUsage: flat [options]\n\nExamples:\n\n One or more examples.\n\n Could be multi-line.\n\nOptions:\n\n -c, --count N              How many times (default: 3)\n --dry-run                  Enable dry-run (default: false)\n -s, --sequence N[,N,..]    bang sequence (default: 1,2,3)\n --wall WALL                Type of wall (default: cardboard)\n\n -h, --help                 Print this help and exit\n\n For more information, see https://www.example.org/\n```\n\n## Examples\n\nSee directory [examples](examples/).\n\n## Testing\n\nThere are two ways to test a program using clim. Pick the one you prefer:\n\n1. Directly with Go tests.\n2. With [rogpeppe/go-internal/testscript](https://github.com/rogpeppe/go-internal). If you are not familiar with testscript, try it. It is both powerful and simple. For a gentle introduction, see the blog series:\n   [Test scripts in Go](https://bitfieldconsulting.com/posts/test-scripts).\n\nIn particular, see [examples/flat](examples/flat), where the two approaches are shown.\n\n## Status\n\nVersion 0.x, API can have breaking changes.\n\n## Credits\n\nSome code and inspiration taken from std/flag.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarco-m%2Fclim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarco-m%2Fclim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarco-m%2Fclim/lists"}