# docopt

Create *beautiful* command-line interfaces with Python

Repository: https://github.com/docopt/docopt
Canonical: https://ross.abutalabs.com/products/docopt
Language: Python
License: MIT
License Family: permissive
Last push: 2025-06-23T09:03:15+00:00
Link (homepage): http://docopt.org/

## Health v2 (maintenance only)
Score: 45/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 28, release rhythm 35, longevity 100
- inputs: {"age_days": 5261, "days_push": 436, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8009, forks 558 (observed 2026-08-28T04:10:11.617540+00:00)

## What it is
docopt is a command-line argument parsing library that generates a parser from the help message/usage patterns you write in your program's docstring. It has official implementations in Python, Go, and C++, and ports to many other languages.

## Use cases
- parse command-line arguments from a docstring
- build a CLI without writing boilerplate parser code
- generate help messages from usage patterns
- define CLI options and positional arguments declaratively
- replace argparse with a help-message-driven parser

## When to choose
- you want the CLI interface defined entirely in the help text
- you prefer declarative usage patterns over imperative parser code
- you want consistent parsing across Python, Go, or C++ projects

## When to avoid
- you need subcommands with rich per-command help or type validation (argparse/click may fit better)
- you need runtime-generated or dynamic argument definitions
- the project is in maintenance mode and you want actively evolving features

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, cli, developer-tools
- domain: developer-tools, parsers
- platform: python, go, cpp, cross-platform
- tags: argument-parsing, docstring-parser, cli-framework, usage-patterns, command-line

## Member repositories
- docopt/docopt (main) score 45
- docopt/docopt.go (sdk) score 23
- docopt/docopt.cpp (sdk) score 43

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:11.617540+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-29T17:32:06.529574+00:00, confidence not recorded.
  - readme: https://github.com/docopt/docopt (fetched 2026-08-28T04:10:11.617540+00:00, sha 3fd91b151063)
  - homepage: http://docopt.org/ (fetched 2026-08-29T08:29:23.759661+00:00, sha cfab93cfcb05)
- Data as of 2026-08-30T08:39:29.467469+00:00.
