# mitchellh/cli

A Go library for implementing command-line interfaces.

Repository: https://github.com/mitchellh/cli
Canonical: https://ross.abutalabs.com/products/mitchellh-cli
Language: Go
License: MPL-2.0
License Family: copyleft
Archived: true
Last push: 2024-07-22T20:43:09+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4686, "days_push": 772, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1735, forks 128 (observed 2026-08-28T04:05:29.082658+00:00)

## What it is
A Go library for building command-line interfaces with subcommands, autocompletion, and automatic help generation. It powered the CLIs of HashiCorp tools like Terraform, Vault, Consul, Packer, and Nomad, but is now archived.

## Use cases
- build a cli tool in go with subcommands
- add shell autocompletion to a go command-line app
- generate automatic help output for subcommands
- implement nested subcommands like cli foo bar
- handle -h and --version flags in a go cli
- prompt users for terminal input in a go program

## When to choose
- you are maintaining an existing project already using this library
- you want a minimal, dependency-light subcommand framework in Go
- you need the exact patterns used by classic HashiCorp tool CLIs

## When to avoid
- starting a new Go CLI project - the library is archived and unmaintained
- you need active support, bug fixes, or modern CLI features
- you want a framework with an active community like cobra or urfave/cli

## Facets
- artifact type: library
- maturity: abandoned
- function: cli, developer-tools
- domain: developer-tools
- platform: go, cross-platform, cli
- tags: subcommands, shell-autocompletion, hashicorp, archived, command-line

## Member repositories
- mitchellh/cli (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:29.082658+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:30:49.959211+00:00, confidence not recorded.
  - readme: https://github.com/mitchellh/cli (fetched 2026-08-28T04:05:29.082658+00:00, sha c49fe27d669b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
