# Install cobra-cli with Homebrew, apt, Nix

Tool to generate cobra applications and commands. Version 1.3.0 via Homebrew; verified 2026-07-25. Also installable with debian: sudo apt install cobra-cli.

## Install

```sh
sudo av install brew:cobra-cli
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cobra-cli
```

  Evidence: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install cobra-cli
```

  Evidence: Debian stable package indexes: cobra-cli from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#cobra-cli
```

  Evidence: nixpkgs package indexes: pkgs/by-name/co/cobra-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:cobra-cli
- **Package manager:** Homebrew
- **Version:** 1.3.0
- **Source summary:** Tool to generate cobra applications and commands
- **Homepage:** <https://cobra.dev>
- **Repository:** <https://github.com/spf13/cobra-cli>
- **Last updated:** 2026-07-25T14:20:51-04:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- cobra-cli (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.3.0
## Project history and usage

cobra-cli is the generator companion for Cobra, the Go library used to build command-line applications. It matters less as a standalone framework and more as a small scaffolding tool in the Go CLI ecosystem.

### Project history

The standalone `spf13/cobra-cli` repository was created in 2022 and released v1.3.0 in March 2022. Its README describes it as Cobra's generator for creating an application skeleton and adding commands.

The tool reflects a split between the Cobra runtime library and a generator binary. The README points users to `go install github.com/spf13/cobra-cli@latest`, then exposes only two core operations: `cobra-cli init` and `cobra-cli add`.

### Adoption history

cobra-cli inherits its importance from Cobra's wide use in Go command-line projects. The input shows packaging in Homebrew, Debian, Ubuntu, and Nix, while Go module distribution is the upstream installation path.

### How it is used

`cobra-cli init` creates a barebones Cobra application inside a Go module. `cobra-cli add` adds subcommands under the generated `cmd` structure.

The optional `~/.cobra.yaml` file stores repeated generator defaults such as author, license, year, and whether to wire in Viper support.

### Why package nerds care

cobra-cli is a neat example of Go's module-aware binary install story: the package manager formula is convenient, but upstream expects `go install` to fetch and build the command.

It also shows the packaging split common in developer tools: a library (`spf13/cobra`) carries most of the ecosystem weight, while a smaller generator binary gets packaged separately for repeatable local scaffolding.

### Timeline

- 2022: `spf13/cobra-cli` repository created.
- 2022: v1.3.0 release published.
- 2022: Go module proxy lists v1.3.0 for `github.com/spf13/cobra-cli`.
- 2020s: Packaged by Homebrew, Debian, Ubuntu, and Nix according to the input package-manager facts.

### Related projects

- Cobra is the underlying Go CLI framework that generated applications use.
- Viper is the related configuration library that cobra-cli can wire into new projects with `--viper`.

### Sources

- <https://github.com/spf13/cobra-cli>
- <https://raw.githubusercontent.com/spf13/cobra-cli/main/README.md>
- <https://cobra.dev/docs>
- <https://proxy.golang.org/github.com/spf13/cobra-cli/@v/list>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.cobra.yaml
## Other Package-Manager Records

- Debian apt - cobra-cli - 1.3.0-3+b17: normalized package name match | Debian stable package indexes: cobra-cli from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Cobra CLI tool to generate Go applications and commands | https://github.com/spf13/cobra-cli
- Nix - cobra-cli: normalized package name match | nixpkgs package indexes: pkgs/by-name/co/cobra-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - cobra-cli - 1.3.0-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: cobra-cli from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Cobra CLI tool to generate Go applications and commands | https://github.com/spf13/cobra-cli


## Combined YAML source

View the package source record on GitHub. [combined/cobra-cli.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cobra-cli.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
