|
1 | | -cmd2 |
2 | | -==== |
3 | | -[](https://travis-ci.org/python-cmd2/cmd2) |
4 | | -[](https://ci.appveyor.com/project/FedericoCeratto/cmd2) |
5 | | -[](http://cmd2.readthedocs.io/en/latest/?badge=latest) |
6 | | -[](https://pypi.python.org/pypi/cmd2/) |
| 1 | +cmd2: a tool for building interactive command line applications |
| 2 | +=============================================================== |
| 3 | +[](https://pypi.python.org/pypi/cmd2/) |
| 4 | +[](https://travis-ci.org/python-cmd2/cmd2) |
| 5 | +[](https://ci.appveyor.com/project/FedericoCeratto/cmd2) |
7 | 6 | [](https://codecov.io/gh/python-cmd2/cmd2) |
8 | | -[](https://pypi.python.org/pypi/cmd2/) |
| 7 | +[](http://cmd2.readthedocs.io/en/latest/?badge=latest) |
9 | 8 |
|
10 | | -cmd2 is a tool for writing interactive command-line applications for Python 2.7 and Python 3.3+. It is based on the |
11 | | -Python Standard Library's [cmd](https://docs.python.org/3/library/cmd.html) module, and can be used any place cmd is used simply by importing cmd2 instead. It is |
12 | | -pure Python code with the only 3rd-party dependencies being on [six](https://pypi.python.org/pypi/six), [pyparsing](http://pyparsing.wikispaces.com), |
13 | | -and [pyperclip](https://github.com/asweigart/pyperclip). |
| 9 | +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](https://docs.python.org/3/library/cmd.html) module. cmd2 provides a wealth of features on top of cmd to make your life easier. |
| 10 | + |
| 11 | +Main Features |
| 12 | +------------- |
| 13 | +- Searchable command history (`history` command and `<Ctrl>+r`) |
| 14 | +- Text file scripting of your application with `load` (`@`) and `_relative_load` (`@@`) |
| 15 | +- Python scripting of your application with ``pyscript`` |
| 16 | +- Run shell commands with ``!`` |
| 17 | +- Pipe command output to shell commands with `|` |
| 18 | +- Redirect command output to file with `>`, `>>`; input from file with `<` |
| 19 | +- Bare `>`, `>>` with no filename send output to paste buffer (clipboard) |
| 20 | +- `py` enters interactive Python console (opt-in `ipy` for IPython console) |
| 21 | +- Multi-line, case-insensitive, and abbreviated commands |
| 22 | +- Special-character command shortcuts (beyond cmd's `@` and `!`) |
| 23 | +- Settable environment parameters |
| 24 | +- Parsing commands with flags |
| 25 | +- Unicode character support (*Python 3 only*) |
| 26 | +- Good tab-completion of commands, file system paths, and shell commands` |
| 27 | +- Python 2.7 and 3.3+ support |
| 28 | +- Linux, macOS and Windows support |
| 29 | +- Trivial to provide built-in help for all commands |
| 30 | +- Built-in regression testing framework for your applications (transcript-based testing) |
14 | 31 |
|
15 | | -The latest documentation for cmd2 can be read online here: https://cmd2.readthedocs.io/en/latest/ |
| 32 | +Installation |
| 33 | +------------ |
| 34 | +On all operating systems, the latest stable version of `cmd2` can be installed using pip: |
| 35 | + |
| 36 | +```bash |
| 37 | +pip install -U cmd2 |
| 38 | +``` |
16 | 39 |
|
17 | | -See the [Installation Instructions](https://cmd2.readthedocs.io/en/latest/install.html) in the cmd2 documentation for instructions on installing, upgrading, and |
18 | | -uninstalling cmd2. |
| 40 | +cmd2 works with Python 2.7 and Python 3.3+ on Windows, macOS, and Linux. It is pure Python code with the only 3rd-party dependencies being on [six](https://pypi.python.org/pypi/six), [pyparsing](http://pyparsing.wikispaces.com), |
| 41 | +and [pyperclip](https://github.com/asweigart/pyperclip). |
19 | 42 |
|
20 | | -Bug reports may be submitted directly to the [issue tracker](https://github.com/python-cmd2/cmd2/issues). Pull Requests are welcome, see the |
21 | | -[Contributor's Guide](https://github.com/python-cmd2/cmd2/blob/master/CONTRIBUTING.md) for more information. |
| 43 | +For information on other installation options, see [Installation Instructions](https://cmd2.readthedocs.io/en/latest/install.html) in the cmd2 documentation. |
22 | 44 |
|
23 | | -Feature Support |
24 | | ---------------- |
| 45 | +Documentation |
| 46 | +------------- |
| 47 | +The latest documentation for cmd2 can be read online here: https://cmd2.readthedocs.io/en/latest/ |
| 48 | + |
| 49 | +It is available in HTML, PDF, and ePub formats. |
25 | 50 |
|
26 | | -cmd2 provides the following features, in addition to those already existing in cmd: |
27 | 51 |
|
28 | | -- Searchable command history |
29 | | -- Load commands from file, save to file, edit commands in file |
30 | | -- Multi-line commands |
31 | | -- Case-insensitive commands |
32 | | -- Special-character shortcut commands (beyond cmd's `@` and `!`) |
33 | | -- Settable environment parameters |
34 | | -- Parsing commands with flags |
35 | | -- Redirection to file with `>`, `>>`; input from file with `<` |
36 | | -- Bare `>`, `>>` with no filename send output to paste buffer |
37 | | -- Pipe output to shell commands with `|` |
38 | | -- Simple transcript-based application testing |
39 | | -- Unicode character support (*Python 3 only*) |
40 | | -- Tab completion of file system paths for ``edit``, ``load``, ``pyscript``, ``save``, and ``shell`` commands |
41 | | -- Integrated Python scripting capability via ``pyscript`` and ``py`` commands |
42 | | -- (Optional) Embedded IPython shell integration via optional opt-in ``ipy`` command |
43 | 52 |
|
| 53 | +Feature Overview |
| 54 | +---------------- |
44 | 55 | Instructions for implementing each feature follow. |
45 | 56 |
|
46 | 57 | - Searchable command history |
|
0 commit comments