{"id":13410347,"url":"https://github.com/leaanthony/clir","last_synced_at":"2025-04-06T03:09:08.556Z","repository":{"id":50760404,"uuid":"222531705","full_name":"leaanthony/clir","owner":"leaanthony","description":"A Simple and Clear CLI library. Dependency free.","archived":false,"fork":false,"pushed_at":"2024-06-10T21:26:38.000Z","size":3186,"stargazers_count":178,"open_issues_count":7,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-14T08:45:13.257Z","etag":null,"topics":[],"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/leaanthony.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2019-11-18T19:52:00.000Z","updated_at":"2024-10-14T03:19:00.000Z","dependencies_parsed_at":"2024-01-08T14:30:55.171Z","dependency_job_id":"6d284de5-e3de-4681-bab8-65c93a472605","html_url":"https://github.com/leaanthony/clir","commit_stats":{"total_commits":75,"total_committers":7,"mean_commits":"10.714285714285714","dds":"0.31999999999999995","last_synced_commit":"75e92810dae3f8f8035eb6d06081e5702ce84906"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaanthony%2Fclir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaanthony%2Fclir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaanthony%2Fclir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaanthony%2Fclir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leaanthony","download_url":"https://codeload.github.com/leaanthony/clir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247427006,"owners_count":20937201,"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":[],"created_at":"2024-07-30T20:01:06.359Z","updated_at":"2025-04-06T03:09:08.522Z","avatar_url":"https://github.com/leaanthony.png","language":"Go","funding_links":[],"categories":["Command Line","命令行","命令行工具","Build Automation"],"sub_categories":["Standard CLI","标准CLI","标准 CLI"],"readme":"\u003cp align=\"center\" style=\"text-align: center\"\u003e\n   \u003cimg src=\"clir_logo.png\" width=\"40%\"\u003e\u003cbr/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n   A Simple and Clear CLI library. Dependency free.\u003cbr/\u003e\u003cbr/\u003e\n   \u003ca href=\"https://github.com/leaanthony/clir/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://goreportcard.com/report/github.com/leaanthony/clir\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/leaanthony/clir\"/\u003e\u003c/a\u003e\n   \u003ca href=\"https://github.com/avelino/awesome-go\" rel=\"nofollow\"\u003e\u003cimg src=\"https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg\" alt=\"Awesome\"\u003e\u003c/a\u003e\n\t\u003ca href=\"http://godoc.org/github.com/leaanthony/clir\"\u003e\u003cimg src=\"https://img.shields.io/badge/godoc-reference-blue.svg\"/\u003e\u003c/a\u003e\n   \u003ca href=\"https://github.com/leaanthony/clir/issues\"\u003e\u003cimg src=\"https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat\" alt=\"CodeFactor\" /\u003e\u003c/a\u003e\n   \u003ca href=\"https://app.fossa.com/projects/git%2Bgithub.com%2Fleaanthony%2Fclir?ref=badge_shield\" alt=\"FOSSA Status\"\u003e\u003cimg src=\"https://app.fossa.com/api/projects/git%2Bgithub.com%2Fleaanthony%2Fclir.svg?type=shield\"/\u003e\u003c/a\u003e\n   \u003ca href=\"https://houndci.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg\"/\u003e\u003c/a\u003e\n   \u003ca href='https://github.com/jpoles1/gopherbadger' target='_blank'\u003e\u003cimg src=\"https://img.shields.io/badge/Go%20Coverage-98%25-brightgreen.svg?longCache=true\u0026style=flat\"\u003e\u003c/a\u003e\n\t\u003ca \u003e\u003cimg src=\"https://github.com/leaanthony/clir/workflows/build/badge.svg?branch=master\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n### Features\n\n  * Nested Subcommands\n  * Uses the standard library `flag` package\n  * Struct based flags\n  * Positional Args\n  * Auto-generated help\n  * Custom banners\n  * Hidden Subcommands\n  * Default Subcommand\n  * Dependency free\n\n### Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/leaanthony/clir\"\n)\n\nfunc main() {\n\t// Create new cli\n\tcli := clir.NewCli(\"Flags\", \"A simple example\", \"v0.0.1\")\n\n\t// Name\n\tname := \"Anonymous\"\n\tcli.StringFlag(\"name\", \"Your name\", \u0026name)\n\n\t// Define action for the command\n\tcli.Action(func() error {\n\t\tfmt.Printf(\"Hello %s!\\n\", name)\n\t\treturn nil\n\t})\n\n\tif err := cli.Run(); err != nil {\n\t\tfmt.Printf(\"Error encountered: %v\\n\", err)\n\t}\n}\n```\n\n#### Generated Help\n\n```shell\n$ flags --help\nFlags v0.0.1 - A simple example\n\nFlags:\n\n  -help\n        Get help on the 'flags' command.\n  -name string\n        Your name\n```\n\n#### Documentation\n\nThe main documentation may be found [here](https://clir.leaanthony.com).\n\n#### License Status\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fleaanthony%2Fclir.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fleaanthony%2Fclir?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleaanthony%2Fclir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleaanthony%2Fclir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleaanthony%2Fclir/lists"}