skillfed

click-shell

An extension to click that easily turns your click app into a shell utility

click-shell v2.1 101.3K downloads/30d#12,948 on PyPI95
Permissive license BSD Active released

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-shell

uv

uv add click-shell

poetry

poetry add click-shell

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: User InterfacesTopic :: System :: ShellsTopic :: Utilities

Tags

interactive shell for click appsclick command completionturn cli into shellclick shell decoratorcommand-line shell wrapperinteractive repl for clickshell mode for click commands
cli-frameworkinteractive-shellrepl

More Utilities packages