MCPcopy
hub / github.com/pallets/click

github.com/pallets/click @8.4.2 sqlite

repository ↗ · DeepWiki ↗ · release 8.4.2 ↗
1,518 symbols 4,625 edges 63 files 484 documented · 32%
README

Click

Click is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary. It's the "Command Line Interface Creation Kit". It's highly configurable but comes with sensible defaults out of the box.

It aims to make the process of writing command line tools quick and fun while also preventing any frustration caused by the inability to implement an intended CLI API.

Click in three points:

  • Arbitrary nesting of commands
  • Automatic help page generation
  • Supports lazy loading of subcommands at runtime

A Simple Example

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 _ in range(count):
        click.echo(f"Hello, {name}!")

if __name__ == '__main__':
    hello()
$ python hello.py --count=3
Your name: Click
Hello, Click!
Hello, Click!
Hello, Click!

Donate

The Pallets organization develops and supports Click and other popular packages. In order to grow the community of contributors and users, and allow the maintainers to devote more time to the projects, please donate today.

Contributing

See our detailed contributing documentation for many ways to contribute, including reporting issues, requesting features, asking or answering questions, and making PRs.

Core symbols most depended-on inside this repo

getvalue
called by 32
src/click/formatting.py
echo
called by 25
src/click/utils.py
open
called by 25
examples/termui/termui.py
exit
called by 20
src/click/core.py
term_len
called by 20
src/click/_compat.py
update
called by 19
src/click/_termui_impl.py
write
called by 19
src/click/formatting.py
fail
called by 15
src/click/core.py

Shape

Function 891
Method 439
Class 150
Route 38

Languages

Python100%

Modules by API surface

tests/test_options.py148 symbols
src/click/core.py138 symbols
tests/test_termui.py107 symbols
src/click/types.py94 symbols
tests/test_testing.py63 symbols
tests/test_basic.py58 symbols
tests/test_context.py57 symbols
tests/test_commands.py57 symbols
src/click/_compat.py51 symbols
tests/test_utils.py50 symbols
tests/test_shell_completion.py49 symbols
src/click/testing.py49 symbols

Dependencies from manifests, versioned

click8.1 · 1×

For agents

$ claude mcp add click \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact