click-shell
An extension to click that easily turns your click app into a shell utility
What it is and what it does
click-shell is a decorator that wraps click command groups to provide an interactive shell interface instead of a one-shot CLI. When you run your app with no arguments, it enters a persistent shell prompt where users can type commands repeatedly; if arguments are passed, it behaves like a normal click app. The shell includes command completion built on Python's cmd module, adapted to work with click's command structure.
The package is designed for developers who want to turn existing click applications into interactive utilities with minimal code changes—typically just swapping the @click.group decorator for @click_shell.shell. It's useful when you want users to run multiple commands in a session without restarting the process each time.
Use it for:
- Convert a CLI tool into an interactive shell so users can run multiple commands without restarting.
- Add command completion to a click app for better user experience in shell mode.
- Build a REPL-like interface for administrative or utility tools built with click.
- Create an interactive application shell for data processing or system management tasks.
- Provide both one-shot CLI and interactive shell modes from the same click command group.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts a click command-line app into an interactive shell with command completion by replacing @click.group with @click_shell.shell.
Yes, if you have a click app and want to add interactive shell mode with minimal effort. The package is stable, has low install friction, and is actively maintained. The main caveat is that the last release was in 2021—verify compatibility with your Python version before relying on it for new projects.
Install
click-shell on PyPI
pip
pip install click-shelluv
uv add click-shellpoetry
poetry add click-shellInstalling click-shell
Before you install
Low friction: single runtime dependency (click) and a pure-Python wheel. Maintenance is active with recent commits, though the last release was in 2021.
License in practice
BSD license is permissive; you can use, modify, and distribute this package with minimal restrictions.
Quickstart
from click_shell import shell
@shell(prompt='my-app > ', intro='Starting my app...')
def my_app():
pass
@my_app.command()
def testcommand():
print('testcommand is running')
if __name__ == '__main__':
my_app()
Verify before relying
- Whether command completion works across all supported Python versions (2.7, 3.6–3.9 listed in classifiers).
- Current compatibility with modern Python 3.10+ versions, given the latest release was in 2021.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — click |
| Maintenance | actively maintained — 1,874 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 101,297/month — #12,948 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: click_shell-2.1-py2.py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
click-replAdds an interactive REPL mode to Click…
permissive · top 1,000 on PyPI
cmd2cmd2 is a Python framework for building…
permissive · top 5,000 on PyPI
click-didyoumeanAdds git-like "did-you-mean" suggestions to…
permissive · top 1,000 on PyPI
click-aliasesAdds command aliases to Click CLI groups and…
permissive · top 5,000 on PyPI
click-default-groupExtends Click's Group class to invoke a default…
permissive · top 5,000 on PyPI
click-logIntegrates Python's standard logging module…
permissive · top 5,000 on PyPI
click-help-colorsAdds color customization to Click command-line…
permissive · top 5,000 on PyPI
trogonTrogon auto-generates a terminal user interface…
permissive · top 15,000 on PyPI
sphinx-clickSphinx-click is a Sphinx extension that…
permissive · top 15,000 on PyPI