# Python CLI libraries

Python CLI (command-line interface) libraries turn the arguments typed after a command into values and function calls inside a program. These libraries give scripts and developer tools the flags, subcommands, and help text that people and coding agents read to learn a command.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [Click](#click) | 1.1B | 17.8K | Nov 2026 | BSD-3-Clause |
| [Typer](#typer) | 305.5M | 20.4K | Nov 2026 | MIT |
| [Abseil](#absl-py) | 50.3M | 2.5K | Oct 2026 | Apache-2.0 |
| [Cleo](#cleo) | 44.6M | 1.4K | Oct 2023 | MIT |
| [docopt](#docopt) | 25.1M | 8.0K | Jun 2014 | MIT |
| [Python Fire](#python-fire) | 23.9M | 28.2K | Aug 2025 | Apache-2.0 |
| [ConfigArgParse](#configargparse) | 21.6M | 761 | Nov 2026 | MIT |
| [Hydra](#hydra-core) | 17.7M | 10.8K | Oct 2026 | MIT |

Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[Click](#click) has the most monthly downloads among the registry packages in this comparison, at 1.1B.

## Capabilities

| Library | Subcommands | Shell completion |
| --- | --- | --- |
| [Click](#click) | Yes | Yes |
| [Typer](#typer) | Yes | Yes |
| [Abseil](#absl-py) | Yes | Undocumented |
| [Cleo](#cleo) | Yes | Yes |
| [docopt](#docopt) | Yes | Via plugin |
| [Python Fire](#python-fire) | Yes | Yes |
| [ConfigArgParse](#configargparse) | Yes | Undocumented |
| [Hydra](#hydra-core) | No | Yes |

## Libraries

### Click

[GitHub](https://github.com/pallets/click) · [PyPI](https://pypi.org/project/click) · [Docs](https://click.palletsprojects.com/)

Click builds command-line interfaces from decorated functions. `@click.command` turns a function into a command, and each `@click.option` adds a flag with its default and help text, which Click collects into a generated help page. Commands nest inside groups to any depth, and subcommands can load lazily at runtime. An option marked with `prompt` asks for its value when the flag is missing.

- Downloads / mo: 1.1B
- Stars: 17.8K
- Last release: 8.5.1
- License: BSD-3-Clause
- Capabilities: [From the Click docs](https://click.palletsprojects.com/)

**Strengths**

- **Shares context across subcommands.** Let subcommands use data from their parent command.
- **Prompts for missing options.** Accept supplied options or ask interactively for missing values.

**Watch out for**

- **Fixed help layout.** Click limits how far help pages can be customized, so that separately written Click commands still work together.
- **Completion needs an entry point.** Shell completion works only for a script installed through an entry point, not one started with the `python` command.

```sh
pip install click
```

**psf/black** (42.2K stars)

[psf/black](https://github.com/psf/black) 

```python
@mypyc_attr(patchable=True)
def _out(message: Optional[str] = None, nl: bool = True, **styles: Any) -> None:
    if message is not None:
        if "bold" not in styles:
            styles["bold"] = True
        message = style(message, **styles)
    echo(message, nl=nl, err=True)

```

[src/black/output.py](https://github.com/psf/black/blob/1b2427a2b785cc4aac97c19bb4b9a0de063f9547/src/black/output.py#L15-L21) · [More projects using Click →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20click%20to%20build%20command-line%20tools%20with%20argument%20parsing%2C%20subcommands%20and%20help%20messages&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**pallets/flask** (75.2K stars)

[pallets/flask](https://github.com/pallets/flask) 

```python
@click.command("routes", short_help="Show the routes for the app.")
@click.option(
    "--sort",
    "-s",
    type=click.Choice(("endpoint", "methods", "domain", "rule", "match")),
    default="endpoint",
    help=(
        "Method to sort routes by. 'match' is the order that Flask will match routes"
        " when dispatching a request."
    ),
)
@click.option("--all-methods", is_flag=True, help="Show HEAD and OPTIONS methods.")
@with_appcontext
def routes_command(sort: str, all_methods: bool) -> None:
    """Show all registered routes with endpoints and methods."""
    rules = list(current_app.url_map.iter_rules())

    if not rules:
        click.echo("No routes were registered.")
        return

    ignored_methods = set() if all_methods else {"HEAD", "OPTIONS"}
    host_matching = current_app.url_map.host_matching
    has_domain = any(rule.host if host_matching else rule.subdomain for rule in rules)
    rows = []

    for rule in rules:
        row = [
            rule.endpoint,
            ", ".join(sorted((rule.methods or set()) - ignored_methods)),
        ]

        if has_domain:
            row.append((rule.host if host_matching else rule.subdomain) or "")

        row.append(rule.rule)
        rows.append(row)

    headers = ["Endpoint", "Methods"]
    sorts = ["endpoint", "methods"]

    if has_domain:
        headers.append("Host" if host_matching else "Subdomain")
        sorts.append("domain")

    headers.append("Rule")
    sorts.append("rule")

    try:
        rows.sort(key=itemgetter(sorts.index(sort)))
    except ValueError:
        pass

    rows.insert(0, headers)
    widths = [max(len(row[i]) for row in rows) for i in range(len(headers))]
    rows.insert(1, ["-" * w for w in widths])
    template = "  ".join(f"{{{i}:<{w}}}" for i, w in enumerate(widths))

    for row in rows:
        click.echo(template.format(*row))

```

[src/flask/cli.py](https://github.com/pallets/flask/blob/c12a5d874c5a014495eb2db8a73f40037bc813ac/src/flask/cli.py#L1030-L1089) · [More projects using Click →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20click%20to%20build%20command-line%20tools%20with%20argument%20parsing%2C%20subcommands%20and%20help%20messages&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import click

@click.command()
@click.option('--count', default=1, help='Number of greetings.')
@click.option('--name', prompt='Your name',
              help='The person to greet.')
def hello(count, name):
    """Simple program that greets NAME for a total of COUNT times."""
    for x in range(count):
        click.echo(f"Hello {name}!")

if __name__ == '__main__':
    hello()

```

From [index.md](https://github.com/pallets/click/blob/main/docs/index.md)

### Typer

[GitHub](https://github.com/fastapi/typer) · [PyPI](https://pypi.org/project/typer) · [Docs](https://typer.tiangolo.com/)

Typer builds command-line interfaces from ordinary Python functions, reading each parameter's name, type, and default from the function signature. `typer.run(main)` turns one function into a command, and a `typer.Typer()` app registers several with `@app.command()`. Help text and shell completion come from the same declarations. The package also installs a `typer` command that runs a plain script as a CLI, even one that never imports Typer.

- Downloads / mo: 305.5M
- Stars: 20.4K
- Last release: 0.29.2
- License: MIT
- Capabilities: [From the Typer docs](https://typer.tiangolo.com/)

**Strengths**

- **Uses Python type hints.** Declare parameter types once and receive converted command-line values.
- **Builds nested command trees.** Group related commands and subcommands within the same application.

**Watch out for**

- **Single command drops its name.** An app with one command runs it without a subcommand name. Adding a callback keeps the name.
- **Bundled copy of Click.** Typer includes Click's source instead of installing Click, and the maintainers plan to drop some Click features from that copy.

```sh
uv add typer
```

**fastapi/fastapi-cli** (649 stars)

[fastapi/fastapi-cli](https://github.com/fastapi/fastapi-cli) 

```python
@app.callback()
def callback(
    version: Annotated[
        bool | None,
        typer.Option(
            "--version", help="Show the version and exit.", callback=version_callback
        ),
    ] = None,
    verbose: bool = typer.Option(False, help="Enable verbose output"),
) -> None:
    """
    FastAPI CLI - The [bold]fastapi[/bold] command line app. 😎

    Manage your [bold]FastAPI[/bold] projects, run your FastAPI apps, and more.

    Read more in the docs: [link=https://fastapi.tiangolo.com/fastapi-cli/]https://fastapi.tiangolo.com/fastapi-cli/[/link].
    """

    log_level = logging.DEBUG if verbose else logging.INFO

    setup_logging(level=log_level)

```

[src/fastapi_cli/cli.py](https://github.com/fastapi/fastapi-cli/blob/a93728649bbab4f26a5216f420066695d3b2ee00/src/fastapi_cli/cli.py#L86-L106) · [More projects using Typer →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20typer%20to%20build%20command-line%20tools%20with%20argument%20parsing%2C%20subcommands%20and%20help%20messages&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import typer

def main(name: str):
    print(f"Hello {name}")

if __name__ == "__main__":
    typer.run(main)

```

From [README.md](https://typer.tiangolo.com/)

### Abseil

[GitHub](https://github.com/abseil/abseil-py) · [PyPI](https://pypi.org/project/absl-py) · [Docs](https://abseil.io/docs/python/)

Abseil Python (`absl-py`) collects Python code from Google's own code base for application startup, command-line flags, logging, and testing. `app.run(main)` parses the command line and then calls `main`. Flags are defined with functions such as `flags.DEFINE_string` in any module, and each one joins the command line of every program that imports that module.

- Downloads / mo: 50.3M
- Stars: 2.5K
- Last release: 2.5.1
- License: Apache-2.0
- Capabilities: [From the Abseil docs](https://abseil.io/docs/python/)

**Strengths**

- **Flags across modules.** A module defines its own flags, and any program that imports it accepts them.

**Watch out for**

- **No command tree.** Flags apply to the whole program. Subcommands go through the `argparse_flags` bridge to argparse subparsers.

```sh
pip install absl-py
```

**tensorflow/tensorflow** (201.6K stars)

[tensorflow/tensorflow](https://github.com/tensorflow/tensorflow) 

```python
@tf_export(v1=['app.run'])
def run(main=None, argv=None):
  """Runs the program with an optional 'main' function and 'argv' list."""

  main = main or _sys.modules['__main__'].main

  _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)

```

[tensorflow/python/platform/app.py](https://github.com/tensorflow/tensorflow/blob/2831ab9defab2adc77c16b73b8cda7896059a6e6/tensorflow/python/platform/app.py#L30-L36) · [More projects using Abseil →](https://dashboard.exa.ai/playground/search?q=absl-py%20GitHub%20projects)

**Quickstart**

```python
from absl import app
from absl import flags

FLAGS = flags.FLAGS
flags.DEFINE_string('name', 'Jane Random', 'Your name.')

def main(argv):
    print('Happy Birthday', FLAGS.name)

if __name__ == '__main__':
    app.run(main)

```

From [flags.md](https://abseil.io/docs/python/guides/flags)

### Cleo

[GitHub](https://github.com/python-poetry/cleo) · [PyPI](https://pypi.org/project/cleo) · [Docs](https://cleo.readthedocs.io/)

Cleo builds command-line applications from command classes. Each command subclasses `Command`, sets its name, lists its arguments and options with the `argument` and `option` helpers, and does its work in `handle`. An `Application` holds the registered commands and runs the one named on the command line. The Poetry project maintains Cleo.

- Downloads / mo: 44.6M
- Stars: 1.4K
- Last release: 2.1.0
- License: MIT
- Capabilities: [From the Cleo docs](https://cleo.readthedocs.io/)

**Strengths**

- **Completion scripts included.** A built-in completions command writes shell completion scripts for bash, zsh, and fish.

**Watch out for**

- **Rewrite under way.** The maintainers are rewriting Cleo for version three and ask contributors to read the plan first.

```sh
pip install cleo
```

**python-poetry/poetry** (34.3K stars)

[python-poetry/poetry](https://github.com/python-poetry/poetry) 

```python
def handle(self) -> int:
    from poetry.utils.env import EnvManager

    manager = EnvManager(self.poetry, io=self.io)

    if self.argument("python") == "system":
        manager.deactivate()

        return 0

    env = manager.activate(self.argument("python"))

    self.line(f"Using virtualenv: <comment>{env.path}</>")

    return 0

```

[src/poetry/console/commands/env/use.py](https://github.com/python-poetry/poetry/blob/8c9066af1342cd9fe38dffb5d12f6d90b01225dd/src/poetry/console/commands/env/use.py#L23-L37) · [More projects using Cleo →](https://dashboard.exa.ai/playground/search?q=cleo%20GitHub%20projects)

**Quickstart**

```python
from cleo.application import Application
from cleo.commands.command import Command

class GreetCommand(Command):
    name = "greet"
    def handle(self):
        self.line("Hello")

application = Application()
application.add(GreetCommand())
application.run()

```

From [README.md](https://raw.githubusercontent.com/python-poetry/cleo/2.1.0/README.md)

### docopt

[GitHub](https://github.com/docopt/docopt) · [PyPI](https://pypi.org/project/docopt) · [Docs](https://docopt.readthedocs.io/)

docopt builds a parser from a program's help message. The usage patterns and options written in the module docstring define which commands and flags are valid, and `docopt(__doc__)` returns a dictionary of the values found on the command line. The program reads that dictionary and calls the matching code itself.

- Downloads / mo: 25.1M
- Stars: 8.0K
- Last release: 0.6.2
- License: MIT
- Capabilities: [From the docopt docs](https://docopt.readthedocs.io/)

**Strengths**

- **Help text is the spec.** Editing the usage message changes the parser.

**Watch out for**

- **Completion is separate.** Shell completion comes from the separate infi.docopt_completion project, which reads the help output.

```sh
pip install docopt
```

**shiwaforce/poco** (113 stars)

[shiwaforce/poco](https://github.com/shiwaforce/poco) 

```python
def get_args(self, command, classes, argv):
        for cls in classes:
            cmd = getattr(cls, 'command')
            if not isinstance(cmd, list):
                cmd = [cmd]
            if argv and argv[0] in cmd:
                self.active_object = cls()
                return docopt(Poco.build_command_help(cls), argv=[command] + argv if command is not None else argv)
            # argv only contains options (e.g. poco --no-matrix up)
            if command is not None and argv and argv[0].startswith("-") and command in cmd:
                self.active_object = cls()
                return docopt(Poco.build_command_help(cls), argv=[command] + argv)
            # empty argv, command name already known (e.g. poco helm-repos)
            if command is not None and not argv and command in cmd:
                self.active_object = cls()
                return docopt(Poco.build_command_help(cls), argv=[command])
```

[poco/poco.py](https://github.com/shiwaforce/poco/blob/1afb07007bc523184f5979d144a18716c2852365/poco/poco.py#L234-L249) · [More projects using docopt →](https://dashboard.exa.ai/playground/search?q=docopt%20GitHub%20projects)

**Quickstart**

```python
"""Naval Fate.

Usage:
  naval_fate.py ship new <name>...
"""
from docopt import docopt

if __name__ == '__main__':
    arguments = docopt(__doc__)
    print(arguments)

```

From [naval_fate.py](https://github.com/docopt/docopt/blob/master/examples/naval_fate.py)

### Python Fire

[GitHub](https://github.com/google/python-fire) · [PyPI](https://pypi.org/project/fire) · [Docs](https://google.github.io/python-fire/)

Python Fire generates a command-line interface from any Python object. One call, `fire.Fire(hello)`, exposes a function, and passing a class, module, or dictionary exposes its methods or entries as commands. Fire parses each argument as a Python value, such as a number, a list, or a dictionary. The same call turns existing code, including other people's, into a CLI.

- Downloads / mo: 23.9M
- Stars: 28.2K
- Last release: 0.7.1
- License: Apache-2.0
- Capabilities: [From the Python Fire docs](https://google.github.io/python-fire/)

**Strengths**

- **Exposes selected functions directly.** Pass a command dictionary to expose only selected functions.
- **Accepts structured command-line values.** Pass lists, tuples, and dictionaries as Python literals.

**Watch out for**

- **Types come from values.** Fire ignores type hints in the function signature and parses each argument from the value typed.
- **Boolean flags take the next token.** A token right after a boolean flag becomes that flag's value. A separator after the last flag, or an explicit value, prevents it.

```sh
pip install fire
```

**serengil/deepface** (23.7K stars)

[serengil/deepface](https://github.com/serengil/deepface) 

```python
def cli() -> None:
    """
    command line interface function will be offered in this block
    """
    try:
        import fire  # pylint: disable=import-error
    except ImportError as import_err:
        raise ImportError(
            "fire is required to use deepface from the command line. "
            'Please run `pip install "deepface[cli]"` to install it.'
        ) from import_err

    fire.Fire()

```

[deepface/DeepFace.py](https://github.com/serengil/deepface/blob/c2a6fd9a2b845a958ec5d0e61d592ec7fedc0a49/deepface/DeepFace.py#L699-L711) · [More projects using Python Fire →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20fire%20to%20build%20command-line%20tools%20with%20argument%20parsing%2C%20subcommands%20and%20help%20messages&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import fire

def hello(name):
  return f'Hello {name}!'

if __name__ == '__main__':
  fire.Fire(hello)

```

From [README.md](https://google.github.io/python-fire/guide/)

### ConfigArgParse

[GitHub](https://github.com/bw2/ConfigArgParse) · [PyPI](https://pypi.org/project/configargparse) · [Docs](https://bw2.github.io/ConfigArgParse/)

ConfigArgParse extends argparse so that each option can also come from a config file or an environment variable. When a value is set in more than one place, the command line wins over environment variables, which win over config files, which win over defaults. Config files use INI or YAML style syntax, and `print_values` reports where each value was set. Every argparse feature carries over.

- Downloads / mo: 21.6M
- Stars: 761
- Last release: 1.10.1
- License: MIT
- Capabilities: [From the ConfigArgParse docs](https://bw2.github.io/ConfigArgParse/)

**Strengths**

- **Help lists every source.** The help message documents the environment variables and config file keys next to the flags.

```sh
pip install ConfigArgParse
```

**bmild/nerf** (11.0K stars)

[bmild/nerf](https://github.com/bmild/nerf) 

```python
def config_parser():

    import configargparse
    parser = configargparse.ArgumentParser()
    parser.add_argument('--config', is_config_file=True,
                        help='config file path')
    parser.add_argument("--expname", type=str, help='experiment name')
    parser.add_argument("--basedir", type=str, default='./logs/',
                        help='where to store ckpts and logs')
    parser.add_argument("--datadir", type=str,
                        default='./data/llff/fern', help='input data directory')

    # training options
    parser.add_argument("--netdepth", type=int, default=8,
                        help='layers in network')
    parser.add_argument("--netwidth", type=int, default=256,
                        help='channels per layer')
    parser.add_argument("--netdepth_fine", type=int,
                        default=8, help='layers in fine network')
    parser.add_argument("--netwidth_fine", type=int, default=256,
                        help='channels per layer in fine network')
    parser.add_argument("--N_rand", type=int, default=32*32*4,
                        help='batch size (number of random rays per gradient step)')
    parser.add_argument("--lrate", type=float,
                        default=5e-4, help='learning rate')
    parser.add_argument("--lrate_decay", type=int, default=250,
                        help='exponential learning rate decay (in 1000s)')
    parser.add_argument("--chunk", type=int, default=1024*32,
                        help='number of rays processed in parallel, decrease if running out of memory')
    parser.add_argument("--netchunk", type=int, default=1024*64,
                        help='number of pts sent through network in parallel, decrease if running out of memory')
    parser.add_argument("--no_batching", action='store_true',
                        help='only take random rays from 1 image at a time')
    parser.add_argument("--no_reload", action='store_true',
                        help='do not reload weights from saved ckpt')
    parser.add_argument("--ft_path", type=str, default=None,
                        help='specific weights npy file to reload for coarse network')
    parser.add_argument("--random_seed", type=int, default=None,
                        help='fix random seed for repeatability')

    # pre-crop options
    parser.add_argument("--precrop_iters", type=int, default=0,
                        help='number of steps to train on central crops')
    parser.add_argument("--precrop_frac", type=float,
                        default=.5, help='fraction of img taken for central crops')    

    # rendering options
    parser.add_argument("--N_samples", type=int, default=64,
                        help='number of coarse samples per ray')
    parser.add_argument("--N_importance", type=int, default=0,
                        help='number of additional fine samples per ray')
    parser.add_argument("--perturb", type=float, default=1.,
                        help='set to 0. for no jitter, 1. for jitter')
    parser.add_argument("--use_viewdirs", action='store_true',
                        help='use full 5D input instead of 3D')
    parser.add_argument("--i_embed", type=int, default=0,
                        help='set 0 for default positional encoding, -1 for none')
    parser.add_argument("--multires", type=int, default=10,
                        help='log2 of max freq for positional encoding (3D location)')
    parser.add_argument("--multires_views", type=int, default=4,
                        help='log2 of max freq for positional encoding (2D direction)')
    parser.add_argument("--raw_noise_std", type=float, default=0.,
                        help='std dev of noise added to regularize sigma_a output, 1e0 recommended')

    parser.add_argument("--render_only", action='store_true',
                        help='do not optimize, reload weights and render out render_poses path')
    parser.add_argument("--render_test", action='store_true',
                        help='render the test set instead of render_poses path')
    parser.add_argument("--render_factor", type=int, default=0,
                        help='downsampling factor to speed up rendering, set 4 or 8 for fast preview')

    # dataset options
    parser.add_argument("--dataset_type", type=str, default='llff',
                        help='options: llff / blender / deepvoxels')
    parser.add_argument("--testskip", type=int, default=8,
                        help='will load 1/N images from test/val sets, useful for large datasets like deepvoxels')

    # deepvoxels flags
    parser.add_argument("--shape", type=str, default='greek',
                        help='options : armchair / cube / greek / vase')

    # blender flags
    parser.add_argument("--white_bkgd", action='store_true',
                        help='set to render synthetic data on a white bkgd (always use for dvoxels)')
    parser.add_argument("--half_res", action='store_true',
                        help='load blender synthetic data at 400x400 instead of 800x800')

    # llff flags
    parser.add_argument("--factor", type=int, default=8,
                        help='downsample factor for LLFF images')
    parser.add_argument("--no_ndc", action='store_true',
                        help='do not use normalized device coordinates (set for non-forward facing scenes)')
    parser.add_argument("--lindisp", action='store_true',
                        help='sampling linearly in disparity rather than depth')
    parser.add_argument("--spherify", action='store_true',
                        help='set for spherical 360 scenes')
    parser.add_argument("--llffhold", type=int, default=8,
                        help='will take every 1/N images as LLFF test set, paper uses 8')

    # logging/saving options
    parser.add_argument("--i_print",   type=int, default=100,
                        help='frequency of console printout and metric loggin')
    parser.add_argument("--i_img",     type=int, default=500,
                        help='frequency of tensorboard image logging')
    parser.add_argument("--i_weights", type=int, default=10000,
                        help='frequency of weight ckpt saving')
    parser.add_argument("--i_testset", type=int, default=50000,
                        help='frequency of testset saving')
    parser.add_argument("--i_video",   type=int, default=50000,
                        help='frequency of render_poses video saving')

    return parser

```

[run_nerf.py](https://github.com/bmild/nerf/blob/14c55567a6d0fbd75d3fd12b0411f98160ba3237/run_nerf.py#L461-L572) · [More projects using ConfigArgParse →](https://dashboard.exa.ai/playground/search?q=configargparse%20GitHub%20projects)

**Quickstart**

```python
import configargparse

p = configargparse.ArgParser(default_config_files=['/etc/app/conf.d/*.conf', '~/.my_settings'])
p.add('-c', '--my-config', required=True, is_config_file=True, help='config file path')
p.add('--genome', required=True, help='path to genome file')  # this option can be set in a config file because it starts with '--'
p.add('-v', help='verbose', action='store_true')
p.add('-d', '--dbsnp', help='known variants .vcf', env_var='DBSNP_PATH')  # this option can be set in a config file because it starts with '--'
p.add('vcf', nargs='+', help='variant file(s)')

options = p.parse_args()

print(options)

```

From [README.md](https://github.com/bw2/ConfigArgParse/blob/master/README.md)

### Hydra

[GitHub](https://github.com/hydra-ecosystem/hydra) · [PyPI](https://pypi.org/project/hydra-core) · [Docs](https://hydra.cc/docs/1.3/)

Hydra configures applications from YAML files combined into one configuration object. A function decorated with `@hydra.main` receives that object, and any value in it can be overridden from the command line with `key=value`. Tab completion covers configuration keys and overrides. OmegaConf, a separate library, holds the configuration.

- Downloads / mo: 17.7M
- Stars: 10.8K
- Last release: 1.3.8
- License: MIT
- Capabilities: [From the Hydra docs](https://hydra.cc/docs/1.3/)

**Strengths**

- **Composed configuration.** A configuration combines files from several sources into one hierarchy.
- **Many runs in one command.** Multirun launches several jobs with different arguments from a single command.

**Watch out for**

- **One task function.** `@hydra.main` wraps a single function. A tool with several subcommands needs another CLI library for them.

```sh
pip install --upgrade "hydra-core>=1.3,<1.4"
```

**ashleve/lightning-hydra-template** (5.4K stars)

[ashleve/lightning-hydra-template](https://github.com/ashleve/lightning-hydra-template) 

```python
@hydra.main(version_base="1.3", config_path="../configs", config_name="train.yaml")
def main(cfg: DictConfig) -> Optional[float]:
    """Main entry point for training.

    :param cfg: DictConfig configuration composed by Hydra.
    :return: Optional[float] with optimized metric value.
    """
    # apply extra utilities
    # (e.g. ask for tags if none are provided in cfg, print cfg tree, etc.)
    extras(cfg)

    # train the model
    metric_dict, _ = train(cfg)

    # safely retrieve metric value for hydra-based hyperparameter optimization
    metric_value = get_metric_value(
        metric_dict=metric_dict, metric_name=cfg.get("optimized_metric")
    )

    # return optimized metric
    return metric_value

```

[src/train.py](https://github.com/ashleve/lightning-hydra-template/blob/bddbc24b82ab6ccfa6243e815a49dc5bfe8d4144/src/train.py#L108-L128) · [More projects using Hydra →](https://dashboard.exa.ai/playground/search?q=hydra-core%20GitHub%20projects)

**Quickstart**

```python
from omegaconf import DictConfig, OmegaConf
import hydra

@hydra.main(version_base=None)
def my_app(cfg: DictConfig) -> None:
    print(OmegaConf.to_yaml(cfg))

if __name__ == "__main__":
    my_app()

```

From [simple_cli.md](https://hydra.cc/docs/1.3/tutorials/basic/your_first_app/simple_cli/)

## FAQ

### Which Python CLI library should I use?

[Click](#click) and [Typer](#typer) cover most command-line tools: Click declares options with decorators, and Typer derives them from type hints. For a script with a few options, Python's built-in argparse needs no install. [Hydra](#hydra-core) builds the command line from configuration files and lets any value be overridden with `key=value`.

### What is Python Fire?

[Python Fire](#python-fire) generates a command-line interface from any Python object with one call to `fire.Fire`. Passing a function makes one command, and passing a class, module, or dictionary exposes its members as commands.

### What is Hydra in Python?

[Hydra](#hydra-core) is a framework for configuring applications from YAML files. A function decorated with `@hydra.main` receives the combined configuration, and any value in it can be overridden from the command line.

### Click vs argparse: which should I use?

argparse ships with Python and returns the parsed values for the program to act on. Click also calls the function behind each command, nests commands inside groups, and generates help pages.

### Typer vs Click: which should I use?

Typer reads parameter names, types, and defaults from function signatures, while Click declares each option in a decorator. Typer includes its own copy of Click's source.

### What is docopt?

[docopt](#docopt) builds a parser from a program's help message. The usage patterns written in the module docstring define the valid commands and options, and `docopt(__doc__)` returns the values as a dictionary.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Python CLI libraries Typer Click argparse Python Fire subcommands type conversion code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
