Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

cmd2 - a tool for building interactive command line applications in Python

Project Description

cmd2 is a tool for building interactive command line applications in Python. Its goal is to make it quick and easy for developers to build feature-rich and user-friendly interactive command line applications. It provides a simple API which is an extension of Python’s built-in cmd module. cmd2 provides a wealth of features on top of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary when using cmd.

The latest documentation for cmd2 can be read online here: https://cmd2.readthedocs.io/

Main features:

  • Searchable command history (history command and <Ctrl>+r)
  • Text file scripting of your application with load (@) and _relative_load (@@)
  • Python scripting of your application with pyscript
  • Run shell commands with !
  • Pipe command output to shell commands with |
  • Redirect command output to file with >, >>; input from file with <
  • Bare >, >> with no filename send output to paste buffer (clipboard)
  • py enters interactive Python console (opt-in ipy for IPython console)
  • Multi-line, case-insensitive, and abbreviated commands
  • Special-character command shortcuts (beyond cmd’s @ and !)
  • Settable environment parameters
  • Parsing commands with flags
  • Unicode character support (Python 3 only)
  • Good tab-completion of commands, file system paths, and shell commands
  • Python 2.7 and 3.3+ support
  • Linux, macOS and Windows support
  • Trivial to provide built-in help for all commands
  • Built-in regression testing framework for your applications (transcript-based testing)

Usable without modification anywhere cmd is used; simply import cmd2.Cmd in place of cmd.Cmd.

Release History

Release History

This version
History Node

0.7.7

History Node

0.7.6

History Node

0.7.5

History Node

0.7.4

History Node

0.7.3

History Node

0.7.2

History Node

0.7.1

History Node

0.7.0

History Node

0.6.9

History Node

0.6.8

History Node

0.6.7

History Node

0.6.6.1

History Node

0.6.6

History Node

0.6.5.1

History Node

0.6.5

History Node

0.6.4

History Node

0.6.3

History Node

0.6.2

History Node

0.6.1

History Node

0.6.0

History Node

0.5.5

History Node

0.5.4

History Node

0.5.3

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.8

History Node

0.4.7

History Node

0.4.6

History Node

0.4.5

History Node

0.4.4

History Node

0.4.3

History Node

0.4.2

History Node

0.4.1

History Node

0.4

History Node

0.3.7

History Node

0.3.6

History Node

0.3.5

History Node

0.3.4.1

History Node

0.3.4

History Node

0.3.3

History Node

0.3.2

History Node

0.3.1

History Node

0.3.0

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
cmd2-0.7.7.tar.gz (69.9 kB) Copy SHA256 Checksum SHA256 Source Aug 25, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting