--- id: docopt version: "0.6.2" license: MIT license_treatment: permissive maintenance: abandoned --- # docopt — Pythonic argument parser, that will make you smile License: permissive · Maintenance: abandoned · Downloads: 18.7M/mo ## What it is and what it does docopt is a command-line argument parser that inverts the typical workflow: instead of writing parser code to match your help message, you write a clean help message in your module docstring and docopt generates the parser from it. It parses the usage pattern and option descriptions from your docstring, validates command invocations against that pattern, and returns a dictionary of parsed arguments and options. The package has no runtime dependencies and is small enough to embed directly in a project. However, it is abandoned—the last release was 2014-06-16 and was only tested on Python 2.5, 2.6, 2.7, 3.2, and 3.3. While it may still work on modern Python, there is no active maintenance, no bug fixes, and no forward compatibility guarantees. Use it for: - Build a simple CLI tool where the help message is your single source of truth for argument parsing. - Quickly prototype a command-line utility without writing boilerplate argument-parsing code. - Create a CLI with multiple exclusive command patterns (e.g., different subcommands with different options). - Add argument parsing to a small script without introducing a heavy dependency. - Parse custom argument vectors for testing or programmatic CLI invocation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses command-line arguments based on a help message docstring, generating an argument parser without writing repetitive parser code. No—do not install for new projects. The package is abandoned with no maintenance since 2014-06-16 and was only tested on Python 2.5, 2.6, 2.7, 3.2, and 3.3. Install only if you are maintaining legacy code that already depends on docopt 0.6.2 and cannot be migrated. ## Install pip install docopt uv add docopt poetry add docopt ## Installing docopt Before you install: High install friction: the package is abandoned (last release 2014-06-16, 4442 days ago) with no active maintenance. It has zero runtime dependencies, making installation itself straightforward, but the lack of ongoing support poses a long-term risk for bug fixes or compatibility updates. License in practice: MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects. Quickstart: pip install docopt==0.6.2 from docopt import docopt if __name__ == '__main__': doc = """Usage: prog [-h] [--verbose] Options: -h --help Show this screen. --verbose Verbose output. """ arguments = docopt(doc) print(arguments) Package is abandoned; no updates since 2014. Compatibility with modern Python versions is untested and unsupported. Verify before relying: - Whether the package actually works on Python versions beyond 3.3 despite lack of testing or maintenance. - Whether any known issues or edge cases have emerged since last release that would affect current use. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 18.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags command-line argument parsing, docstring-based CLI parser, generate argument parser from help text, simple command-line interface, option and argument parsing, CLI argument handling, docopt-style argument parsing, cli-parsing, abandoned [View on SkillFed](https://skillfed.io/packages/docopt) · [View on PyPI](https://pypi.org/project/docopt/)