{"id":29053485,"url":"https://github.com/charmbracelet/fang","last_synced_at":"2025-06-27T01:06:37.458Z","repository":{"id":299886672,"uuid":"892791171","full_name":"charmbracelet/fang","owner":"charmbracelet","description":"The CLI starter kit","archived":false,"fork":false,"pushed_at":"2025-06-26T18:08:01.000Z","size":464,"stargazers_count":1186,"open_issues_count":5,"forks_count":18,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-26T18:32:50.851Z","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/charmbracelet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-22T19:35:05.000Z","updated_at":"2025-06-26T17:26:51.000Z","dependencies_parsed_at":"2025-06-18T20:43:48.386Z","dependency_job_id":null,"html_url":"https://github.com/charmbracelet/fang","commit_stats":null,"previous_names":["charmbracelet/fang"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/charmbracelet/fang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Ffang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Ffang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Ffang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Ffang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charmbracelet","download_url":"https://codeload.github.com/charmbracelet/fang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Ffang/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262170227,"owners_count":23269605,"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":"2025-06-27T01:06:34.859Z","updated_at":"2025-06-27T01:06:37.445Z","avatar_url":"https://github.com/charmbracelet.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Fang\n\n\u003cp\u003e\n    \u003cimg width=\"485\" alt=\"Charm Fang\" src=\"https://github.com/user-attachments/assets/3f34ea01-3750-4760-beb2-a1b700e110f5\"\u003e\n\u003c/p\u003e\n\u003cp\u003e\n    \u003ca href=\"https://github.com/charmbracelet/fang/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/charmbracelet/fang.svg\" alt=\"Latest Release\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/charmbracelet/fang?tab=doc\"\u003e\u003cimg src=\"https://godoc.org/github.com/charmbracelet/fang?status.svg\" alt=\"GoDoc\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/charmbracelet/fang/actions\"\u003e\u003cimg src=\"https://github.com/charmbracelet/fang/workflows/build/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThe CLI starter kit. A small, experimental library for batteries-included [Cobra][cobra] applications.\n\n\u003cp\u003e\n    \u003cimg width=\"859\" alt=\"The Charm Fang mascot and title treatment\" src=\"https://github.com/user-attachments/assets/5c35e1fa-9577-4f81-a879-3ddb4d4a43f0\" /\u003e\n\u003c/p\u003e\n\n## Features\n\n- **Fancy output**: fully styled help and usage pages\n- **Fancy errors**: fully styled errors\n- **Automatic `--version`**: set it to the [build info][info], or a version of your choice\n- **Manpages**: Adds a hidden `man` command to generate _manpages_ using\n  [mango][][^1]\n- **Completions**: Adds a `completion` command to generate shell completions\n- **Themeable**: use the built-in theme, or make your own\n- **UX**: Silent `usage` output (help is not shown after a user error)\n\n[info]: https://pkg.go.dev/runtime/debug#BuildInfo\n[cobra]: https://github.com/spf13/cobra\n[mango]: https://github.com/muesli/mango\n\n[^1]:\n    Default cobra man pages generates one man page for each command. This is\n    generally fine for programs with a lot of sub commands, like git, but its an\n    overkill for smaller programs.\n    Mango also uses _roff_ directly instead of converting from markdown, so it\n    should render better looking man pages.\n\n## Usage\n\nTo use it, invoke `fang.Execute` passing your root `*cobra.Command`:\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"os\"\n\n\t\"github.com/charmbracelet/fang\"\n\t\"github.com/spf13/cobra\"\n)\n\nfunc main() {\n\tcmd := \u0026cobra.Command{\n\t\tUse:   \"example\",\n\t\tShort: \"A simple example program!\",\n\t}\n\tif err := fang.Execute(context.Background(), cmd); err != nil {\n\t\tos.Exit(1)\n\t}\n}\n```\n\nThat's all there is to it!\n\n## Contributing\n\nSee [contributing][contribute].\n\n[contribute]: https://github.com/charmbracelet/fang/contribute\n\n## Feedback\n\nWe’d love to hear your thoughts on this project. Feel free to drop us a note!\n\n- [Twitter](https://twitter.com/charmcli)\n- [Discord](https://charm.sh/chat)\n- [The Fediverse](https://mastodon.social/@charmcli)\n\n## License\n\n[MIT](https://github.com/charmbracelet/gum/raw/main/LICENSE)\n\n---\n\nPart of [Charm](https://charm.sh).\n\n\u003ca href=\"https://charm.sh/\"\u003e\u003cimg alt=\"The Charm logo\" src=\"https://stuff.charm.sh/charm-badge.jpg\" width=\"400\" /\u003e\u003c/a\u003e\n\nCharm热爱开源 • Charm loves open source\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharmbracelet%2Ffang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharmbracelet%2Ffang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharmbracelet%2Ffang/lists"}