qmetrics.net

argcomplete

Bash and zsh tab completion for Python argparse

TerminalsDesktop/CLI app
argcomplete screenshot

Argcomplete adds shell tab completion to Python CLI programs built with argparse. It supports bash and zsh with optional global activation across installed scripts.

Overview

Argcomplete bridges Python's argparse module and shell completion frameworks so users can tab-complete options, subcommands, and argument values at the terminal. Programs call argcomplete.autocomplete() on the parser before parse_args(), and mark scripts with PYTHONARGCOMPLETEOK when using global completion discovery.

Completion can be static from argparse choices or dynamic through custom completer callables that receive prefix text, the active action, parser state, and partially parsed arguments. Zsh can show help strings alongside suggestions when completers return description mappings.

Registration per application uses register-python-argcomplete, while activate-global-python-argcomplete enables discovery for any executable exposing the marker in its first kilobyte. Global mode relies on bash features introduced in 4.2; macOS users on older bash builds may need a newer bash or zsh.

The library requires Python 3.10 or newer. Maintainers document bash and zsh on Linux and macOS as supported shells, with contributed notes for fish, PowerShell, and other environments in a separate contrib area rather than core support.

Key features

  • argparse parser integration hook
  • Custom dynamic completer functions
  • Global PYTHONARGCOMPLETEOK discovery
  • Per-app shell registration helper
  • Zsh completion descriptions
  • Readline-style completer support
  • Choice-based static completions
  • Custom completion validators

Use cases

  • CLI tools with many subcommands
  • Network-backed completion values
  • Developer ergonomics for Python scripts
  • Operations tools with long option lists

Tags

Similar software

Oh My Zsh

Community zsh configuration framework with plugins

Oh My Zsh manages zsh setup with bundled plugins, themes, and an installer driven by curl, wget, or fetch.

★ 190.9k⟳ yesterdayMIT
TerminalsDesktop/CLI app

Gemini CLI

Terminal AI agent for enterprise Gemini Code Assist

Gemini CLI is an open-source command-line agent for querying and editing codebases, running shell workflows, and connecting MCP tools under Gemini Code Assist on Google Cloud.

★ 109.2k⟳ 2 days agoApache-2.0
AI Assisted CodingDesktop/CLI app

Terminal

Modern tabbed terminal for Windows command-line users

Windows Terminal is a desktop terminal application for Windows with tabs, theming, and rich text. The same codebase includes the classic console host and shared rendering components.

★ 105.5k⟳ 2 days agoMIT
TerminalsDesktop/CLI app

fzf

General-purpose command-line fuzzy finder

Fzf filters lists interactively in the terminal using fuzzy matching. It ships as a single binary with shell and editor integrations.

★ 84.5k⟳ 3 days agoMIT
TerminalsDesktop/CLI app

Lazygit

Terminal user interface for everyday Git workflows

Lazygit wraps common Git operations in a keyboard-driven terminal UI. You can stage partial changes, rebase, cherry-pick, and inspect history without memorizing fragile command sequences.

★ 84.1k⟳ 5 days agoMIT

Tabby

Configurable cross-platform terminal with SSH and serial

Tabby is a terminal emulator for local shells, SSH, Telnet, and serial links on Windows, macOS, and Linux. It adds splits, tabs, themes, and integrated connection management.

★ 75.6k⟳ 4 days agoMIT
TerminalsDesktop/CLI app
Open Source Alternative to:Termius