$npx skillfedfor your agent

shtab

Automagic shell tab completion for Python CLI applications

Worth itPyPI Software DevelopmentReleased Aug 20264.6M downloads / moMPL-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — shtab-1.10.0-py3-none-any.whl
v1.10.0 · released 2026-08-07 · Python >=3.9

Yes. shtab is production-stable, actively maintained, has zero security vulnerabilities, and solves a real problem (shell completion) with zero runtime overhead. The copyleft license is not a barrier for using it as a library in your own CLI. Install it if you build Python command-line tools and want to offer your users fast, reliable shell completion.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later; shell completion installation is a separate end-user step (not automatic).
  • Low friction: pure Python wheel with no runtime dependencies.
  • Active maintenance with a release 7 days ago and 461 repository stars.

License · maintenance · safety

MPL-2.0 (copyleft) — MPL-2.0 (copyleft): you must disclose source modifications and distribute under the same license if you modify and redistribute shtab itself, but using it as a library in your own CLI does not impose restrictions on your application's license.

last release 2026-08-07 (7 days) · last repo commit 2026-08-13 · 461 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,607,544 downloads/mo, #2,274 on PyPI

Verify before relying

pip install shtab

import argparse
from shtab import add_argument_to_parser

parser = argparse.ArgumentParser()
add_argument_to_parser(parser)
# End-users then run: your_app --print-completion bash | source
  • Whether dynamic shell commands (e.g., git branch completion) work reliably across all supported shells
  • Performance characteristics when handling very large choice sets or deeply nested subcommands
Same gist for agents: .md · .json

What it is and what it does

shtab generates static shell completion scripts for Python CLI applications that use argparse. Instead of executing your application every time a user presses tab (which is slow and can have side effects), shtab analyzes your ArgumentParser once and outputs a completion script that your shell can source. It supports bash, zsh, fish, and tcsh, and handles argument choices, file/directory paths, and dynamic shell commands.

You integrate shtab into your CLI in two ways: as a library (add a few lines to your app to expose a --print-completion flag), or as a standalone CLI tool that inspects an external parser object. The package has no runtime dependencies and is actively maintained with support for Python 3.9 through 3.14.

Use it for

  • Add bash/zsh completion to an existing argparse CLI with minimal code changes
  • Generate completion scripts for distribution with your application package
  • Support multiple shells (bash, zsh, fish, tcsh) from a single argparse definition
  • Enable dynamic completions (e.g., git branch names) without re-executing the CLI on every tab press
  • Provide completion for subcommands and nested argument groups automatically

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

shtab is production-stable, actively maintained, has zero security vulnerabilities, and solves a real problem (shell completion) with zero runtime overhead. The copyleft license is not a barrier for using it as a library in your own CLI. Install it if you build Python command-line tools and want to offer your users fast, reliable shell completion.

Install

shtab on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Active maintenance with a release 7 days ago and 461 repository stars.

Requires Python 3.9 or later; shell completion installation is a separate end-user step (not automatic).

License in practice

MPL-2.0 (copyleft): you must disclose source modifications and distribute under the same license if you modify and redistribute shtab itself, but using it as a library in your own CLI does not impose restrictions on your application's license.

Quickstart

pip install shtab

import argparse
from shtab import add_argument_to_parser

parser = argparse.ArgumentParser()
add_argument_to_parser(parser)
# End-users then run: your_app --print-completion bash | source

Verify before relying

  • Whether dynamic shell commands (e.g., git branch completion) work reliably across all supported shells
  • Performance characteristics when handling very large choice sets or deeply nested subcommands

Package facts

LicenseMPL-2.0 copyleft
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 7 days since the last release
Last repo commit
First released
Downloads4,607,544 / month, #2,274 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: MacOS XEnvironment :: Other EnvironmentIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: End Users/DesktopIntended Audience :: Other AudienceIntended Audience :: System AdministratorsOperating System :: MacOSOperating System :: MacOS :: MacOS XOperating System :: POSIXOperating System :: POSIX :: BSDOperating System :: POSIX :: BSD :: FreeBSDOperating System :: POSIX :: LinuxOperating System :: POSIX :: SunOS/SolarisOperating System :: UnixProgramming Language :: Other Scripting EnginesProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Unix ShellTopic :: Desktop EnvironmentTopic :: Education :: Computer Aided Instruction (CAI)Topic :: Education :: TestingTopic :: Office/BusinessTopic :: Other/Nonlisted TopicTopic :: Software DevelopmentTopic :: Software Development :: Build ToolsTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Pre-processorsTopic :: Software Development :: User InterfacesTopic :: SystemTopic :: System :: Installation/SetupTopic :: System :: ShellsTopic :: System :: System ShellsTopic :: TerminalsTopic :: Utilities

Evidence: shtab-1.10.0-py3-none-any.whl

Tags

Capabilities
shell tab completion generatorargparse bash completioncli autocomplete scriptzsh fish bash completionpython command line completionshell completion for argparse
Topics
cli-toolingshell-integration
PyPI keywords
tabcompletionshellbashzshtcshfishargparse

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “shell tab completion generator”

  • shtabGenerates shell tab completion scripts for Python CLI applications…
  • auto-click-autoAutomatically enables tab shell completion for Bash, Zsh, and Fish in…
  • argcompleteProvides bash and zsh tab completion for Python applications using…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also argcomplete · click-completion · auto-click-auto · colcon-argcomplete · cmd2 · colcon-zsh · jsonargparse · tqdm-loggable · argparse · targ