[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1022":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":42,"readmeContent":43,"aiSummary":44,"trendingCount":16,"starSnapshotCount":16,"syncStatus":45,"lastSyncTime":46,"discoverSource":47},1022,"cobra","spf13\u002Fcobra","spf13","A Commander for modern Go CLI interactions","https:\u002F\u002Fcobra.dev",null,"Go",44075,3148,362,244,0,5,26,204,21,103,"Apache License 2.0",false,"main",true,[27,28,5,29,30,31,32,33,34,35,36,37,38,39,40,41],"cli","cli-app","cobra-generator","cobra-library","command","command-cobra","command-line","commandline","go","golang","golang-application","golang-library","posix","posix-compliant-flags","subcommands","2026-06-12 04:00:07","\u003Cdiv align=\"center\">\n\u003Ca href=\"https:\u002F\u002Fcobra.dev\">\n\u003Cimg width=\"512\" height=\"535\" alt=\"cobra-logo\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fc8bf9aad-b5ae-41d3-8899-d83baec10af8\" \u002F>\n\u003C\u002Fa>\n\u003C\u002Fdiv>\n\nCobra is a library for creating powerful modern CLI applications.\n\n\u003Ca href=\"https:\u002F\u002Fcobra.dev\">Visit Cobra.dev for extensive documentation\u003C\u002Fa> \n\n\nCobra is used in many Go projects such as [Kubernetes](https:\u002F\u002Fkubernetes.io\u002F),\n[Hugo](https:\u002F\u002Fgohugo.io), and [GitHub CLI](https:\u002F\u002Fgithub.com\u002Fcli\u002Fcli) to\nname a few. [This list](site\u002Fcontent\u002Fprojects_using_cobra.md) contains a more extensive list of projects using Cobra.\n\n[![](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fspf13\u002Fcobra\u002Ftest.yml?branch=main&longCache=true&label=Test&logo=github%20actions&logoColor=fff)](https:\u002F\u002Fgithub.com\u002Fspf13\u002Fcobra\u002Factions?query=workflow%3ATest)\n[![Go Reference](https:\u002F\u002Fpkg.go.dev\u002Fbadge\u002Fgithub.com\u002Fspf13\u002Fcobra.svg)](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fspf13\u002Fcobra)\n[![Go Report Card](https:\u002F\u002Fgoreportcard.com\u002Fbadge\u002Fgithub.com\u002Fspf13\u002Fcobra)](https:\u002F\u002Fgoreportcard.com\u002Freport\u002Fgithub.com\u002Fspf13\u002Fcobra)\n[![Slack](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSlack-cobra-brightgreen)](https:\u002F\u002Fgophers.slack.com\u002Farchives\u002FCD3LP1199)\n\u003Chr>\n\u003Cdiv align=\"center\" markdown=\"1\">\n   \u003Csup>Supported by:\u003C\u002Fsup>\n   \u003Cbr>\n   \u003Cbr>\n   \u003Ca href=\"https:\u002F\u002Fwww.warp.dev\u002Fcobra\">\n      \u003Cimg alt=\"Warp sponsorship\" width=\"400\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fab8dd143-b0fd-4904-bdc5-dd7ecac94eae\">\n   \u003C\u002Fa>\n\n### [Warp, the AI terminal for devs](https:\u002F\u002Fwww.warp.dev\u002Fcobra)\n[Try Cobra in Warp today](https:\u002F\u002Fwww.warp.dev\u002Fcobra)\u003Cbr>\n\n\u003C\u002Fdiv>\n\u003Chr>\n\n# Overview\n\nCobra is a library providing a simple interface to create powerful modern CLI\ninterfaces similar to git & go tools.\n\nCobra provides:\n* Easy subcommand-based CLIs: `app server`, `app fetch`, etc.\n* Fully POSIX-compliant flags (including short & long versions)\n* Nested subcommands\n* Global, local and cascading flags\n* Intelligent suggestions (`app srver`... did you mean `app server`?)\n* Automatic help generation for commands and flags\n* Grouping help for subcommands\n* Automatic help flag recognition of `-h`, `--help`, etc.\n* Automatically generated shell autocomplete for your application (bash, zsh, fish, powershell)\n* Automatically generated man pages for your application\n* Command aliases so you can change things without breaking them\n* The flexibility to define your own help, usage, etc.\n* Optional seamless integration with [viper](https:\u002F\u002Fgithub.com\u002Fspf13\u002Fviper) for 12-factor apps\n\n# Concepts\n\nCobra is built on a structure of commands, arguments & flags.\n\n**Commands** represent actions, **Args** are things and **Flags** are modifiers for those actions.\n\nThe best applications read like sentences when used, and as a result, users\nintuitively know how to interact with them.\n\nThe pattern to follow is\n`APPNAME VERB NOUN --ADJECTIVE`\n    or\n`APPNAME COMMAND ARG --FLAG`.\n\nA few good real world examples may better illustrate this point.\n\nIn the following example, 'server' is a command, and 'port' is a flag:\n\n    hugo server --port=1313\n\nIn this command we are telling Git to clone the url bare.\n\n    git clone URL --bare\n\n## Commands\n\nCommand is the central point of the application. Each interaction that\nthe application supports will be contained in a Command. A command can\nhave children commands and optionally run an action.\n\nIn the example above, 'server' is the command.\n\n[More about cobra.Command](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fspf13\u002Fcobra#Command)\n\n## Flags\n\nA flag is a way to modify the behavior of a command. Cobra supports\nfully POSIX-compliant flags as well as the Go [flag package](https:\u002F\u002Fgolang.org\u002Fpkg\u002Fflag\u002F).\nA Cobra command can define flags that persist through to children commands\nand flags that are only available to that command.\n\nIn the example above, 'port' is the flag.\n\nFlag functionality is provided by the [pflag\nlibrary](https:\u002F\u002Fgithub.com\u002Fspf13\u002Fpflag), a fork of the flag standard library\nwhich maintains the same interface while adding POSIX compliance.\n\n# Installing\nUsing Cobra is easy. First, use `go get` to install the latest version\nof the library.\n\n```\ngo get -u github.com\u002Fspf13\u002Fcobra@latest\n```\n\nNext, include Cobra in your application:\n\n```go\nimport \"github.com\u002Fspf13\u002Fcobra\"\n```\n\n# Usage\n`cobra-cli` is a command line program to generate cobra applications and command files.\nIt will bootstrap your application scaffolding to rapidly\ndevelop a Cobra-based application. It is the easiest way to incorporate Cobra into your application.\n\nIt can be installed by running:\n\n```\ngo install github.com\u002Fspf13\u002Fcobra-cli@latest\n```\n\nFor complete details on using the Cobra-CLI generator, please read [The Cobra Generator README](https:\u002F\u002Fgithub.com\u002Fspf13\u002Fcobra-cli\u002Fblob\u002Fmain\u002FREADME.md)\n\nFor complete details on using the Cobra library, please read [The Cobra User Guide](site\u002Fcontent\u002Fuser_guide.md).\n\n# License\n\nCobra is released under the Apache 2.0 license. See [LICENSE.txt](LICENSE.txt)\n","Cobra 是一个用于创建现代CLI应用程序的强大库。它支持子命令、完全POSIX兼容的标志（包括短版和长版）、嵌套子命令、全局及级联标志等核心功能，并提供智能建议、自动生成帮助文档、自动补全脚本生成等功能，极大简化了CLI应用开发流程。Cobra适合需要构建复杂命令行界面的应用场景，如系统管理工具、开发者工具等，已经在Kubernetes、Hugo等多个知名Go项目中得到广泛应用。",2,"2026-06-11 02:41:07","top_all"]