Skip to content
C

Cmd2

Quickly build feature-rich and user-friendly interactive command line…

by python-cmd2Free

#2471in Developer Tools
0In stores

Description

cmd2 is a Python library for building interactive command-line applications and REPLs. You start from a subclass of the standard library's c…

Highlights

  • Extends Python's cmd.Cmd
  • argparse or type-hint argument definitions
  • Auto help, tab completion and validation
  • History, aliases, macros and scripting
  • Rich tables and styled output
  • Modular CommandSets

Ratings & Reviews

No ratings yet

Be the first to rate Cmd2.

People also visit

C

cli-developer

Building CLI tools, implementing argument parsing, or adding interactive prompts

AI Skills
Get
D

domain-cli

Building CLI tools. Keywords: CLI, command line, terminal, clap, structopt

AI Skills
Get
C

cli-anything

Codex to build, refine, test, validate

AI Skills
Get
N

ngxpert/cmdk

Fast, composable, unstyled command menu for Angular

Developer Tools
Launch
C

cli-for-agents

Designs or reviews CLIs so coding agents can run them reliably: non-interactive

AI Skills
Get
C

control-cli

Build or adapt a local harness to drive, inspect

AI Skills
Get

Cmd2 FAQ

What is cmd2?

A Python framework for building feature-rich interactive command-line applications and REPLs, based on the standard library's cmd module.

How do I define command arguments?

Use argparse parsers, or annotate a method with @cmd2.with_annotated and use type hints; the same definition powers validation, help and tab completion.

What do I get without extra code?

Generated help, tab completion, command history, aliases, macros, scripting and shell integration.

How do I get started?

Install cmd2 with pip, create an app.py that subclasses cmd2.Cmd, and run it with python app.py. A getting started tutorial covers a fuller application.

What are the best Cmd2 alternatives?

Popular alternatives to Cmd2 include ngxpert/cmdk, Commands Manager and BeeWare. See all Cmd2 alternatives

Developer Stuff

Badges