cmd2 2.4.2__py3-none-any.whl → 2.5.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,218 @@
1
+ Metadata-Version: 2.2
2
+ Name: cmd2
3
+ Version: 2.5.9
4
+ Summary: cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python
5
+ Author: cmd2 Contributors
6
+ License: The MIT License (MIT)
7
+
8
+ Copyright (c) 2008-2024 Catherine Devlin and others
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
+ THE SOFTWARE.
27
+
28
+ Keywords: CLI,cmd,command,interactive,prompt,Python
29
+ Classifier: Development Status :: 5 - Production/Stable
30
+ Classifier: Environment :: Console
31
+ Classifier: Operating System :: OS Independent
32
+ Classifier: Intended Audience :: Developers
33
+ Classifier: Intended Audience :: System Administrators
34
+ Classifier: License :: OSI Approved :: MIT License
35
+ Classifier: Programming Language :: Python :: 3 :: Only
36
+ Classifier: Programming Language :: Python :: 3.8
37
+ Classifier: Programming Language :: Python :: 3.9
38
+ Classifier: Programming Language :: Python :: 3.10
39
+ Classifier: Programming Language :: Python :: 3.11
40
+ Classifier: Programming Language :: Python :: 3.12
41
+ Classifier: Programming Language :: Python :: 3.13
42
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
43
+ Requires-Python: >=3.8
44
+ Description-Content-Type: text/markdown
45
+ License-File: LICENSE
46
+ Requires-Dist: gnureadline>=8; platform_system == "Darwin"
47
+ Requires-Dist: pyperclip>=1.8
48
+ Requires-Dist: pyreadline3>=3.4; platform_system == "Windows"
49
+ Requires-Dist: wcwidth>=0.2.10
50
+
51
+ <h1 align="center">cmd2 : immersive interactive command line applications</h1>
52
+
53
+ [![Latest Version](https://img.shields.io/pypi/v/cmd2.svg?style=flat-square&label=latest%20stable%20version)](https://pypi.python.org/pypi/cmd2/)
54
+ [![GitHub Actions](https://github.com/python-cmd2/cmd2/workflows/CI/badge.svg)](https://github.com/python-cmd2/cmd2/actions?query=workflow%3ACI)
55
+ [![codecov](https://codecov.io/gh/python-cmd2/cmd2/branch/master/graph/badge.svg)](https://codecov.io/gh/python-cmd2/cmd2)
56
+ [![Documentation Status](https://readthedocs.org/projects/cmd2/badge/?version=latest)](http://cmd2.readthedocs.io/en/latest/?badge=latest)
57
+ <a href="https://discord.gg/RpVG6tk"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg" alt="Chat"></a>
58
+
59
+ <p align="center">
60
+ <a href="#the-developers-toolbox">Developer's Toolbox</a> •
61
+ <a href="#philosophy">Philosophy</a> •
62
+ <a href="#installation">Installation</a> •
63
+ <a href="#documentation">Documentation</a> •
64
+ <a href="#tutorials">Tutorials</a> •
65
+ <a href="#hello-world">Hello World</a> •
66
+ <a href="#projects-using-cmd2">Projects using cmd2</a> •
67
+ </p>
68
+
69
+ [![Screenshot](https://raw.githubusercontent.com/python-cmd2/cmd2/master/cmd2.png)](https://youtu.be/DDU_JH6cFsA)
70
+
71
+ cmd2 is a tool for building interactive command line applications in Python. Its goal is to make it
72
+ quick and easy for developers to build feature-rich and user-friendly interactive command line
73
+ applications. It provides a simple API which is an extension of Python's built-in
74
+ [cmd](https://docs.python.org/3/library/cmd.html) module. cmd2 provides a wealth of features on top
75
+ of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary
76
+ when using cmd.
77
+
78
+ ## The developers toolbox
79
+
80
+ ![system schema](https://raw.githubusercontent.com/python-cmd2/cmd2/master/.github/images/graph.drawio.png)
81
+
82
+ When creating solutions developers have no shortage of tools to create rich and smart user interfaces.
83
+ System administrators have long been duct taping together brittle workflows based on a menagerie of simple command line tools created by strangers on github and the guy down the hall.
84
+ Unfortunately, when CLIs become significantly complex the ease of command discoverability tends to fade quickly.
85
+ On the other hand, Web and traditional desktop GUIs are first in class when it comes to easily discovering functionality.
86
+ The price we pay for beautifully colored displays is complexity required to aggregate disperate applications into larger systems.
87
+ `cmd2` fills the niche between high [ease of command discovery](https://clig.dev/#ease-of-discovery) applications and smart workflow automation systems.
88
+
89
+ The `cmd2` framework provides a great mixture of both worlds. Application designers can easily create complex applications and rely on the cmd2 library to offer effortless user facing help and extensive tab completion.
90
+ When users become comfortable with functionality, cmd2 turns into a feature rich library enabling a smooth transition to full automation. If designed with enough forethought, a well implemented cmd2 application can serve as a boutique workflow tool. `cmd2` pulls off this flexibility based on two pillars of philosophy:
91
+
92
+ - Tab Completion
93
+ - Automation Transition
94
+
95
+ ## Philosophy
96
+
97
+ <a href="https://imgflip.com/i/63h03x"><img src="https://i.imgflip.com/63h03x.jpg" title="made at imgflip.com" width="70%" height="%70"/></a>
98
+
99
+ Deep extensive tab completion and help text generation based on the argparse library create the first pillar of 'ease of command discovery'. The following is a list of features in this category.
100
+
101
+ - Great tab completion of commands, subcommands, file system paths, and shell commands.
102
+ - Custom tab completion for user designed commands via simple function overloading.
103
+ - Tab completion from `persistent_history_file` sources added with very little friction.
104
+ - Automatic tab completion of `argparse` flags and optional arguments.
105
+ - Path completion easily enabled.
106
+ - When all else fails, custom tab completion based on `choices_provider` can fill any gaps.
107
+
108
+ <a href="https://imgflip.com/i/66t0y0"><img src="https://i.imgflip.com/66t0y0.jpg" title="made at imgflip.com" width="70%" height="70%"/></a>
109
+
110
+ cmd2 creates the second pillar of 'ease of transition to automation' through alias/macro creation, command line argument parsing and execution of cmd2 scripting.
111
+
112
+ - Flexible alias and macro creation for quick abstraction of commands.
113
+ - Text file scripting of your application with `run_script` (`@`) and `_relative_run_script` (`@@`)
114
+ - Powerful and flexible built-in Python scripting of your application using the `run_pyscript` command
115
+ - Transcripts for use with built-in regression can be automatically generated from `history -t` or `run_script -t`
116
+
117
+ ## Installation
118
+
119
+ On all operating systems, the latest stable version of `cmd2` can be installed using pip:
120
+
121
+ ```bash
122
+ pip install -U cmd2
123
+ ```
124
+
125
+ cmd2 works with Python 3.8+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party dependencies.
126
+
127
+ For information on other installation options, see
128
+ [Installation Instructions](https://cmd2.readthedocs.io/en/latest/overview/installation.html) in the cmd2
129
+ documentation.
130
+
131
+ ## Documentation
132
+
133
+ The latest documentation for cmd2 can be read online here: https://cmd2.readthedocs.io/en/latest/
134
+
135
+ It is available in HTML, PDF, and ePub formats.
136
+
137
+ The best way to learn the cmd2 api is to delve into the example applications located in source under examples.
138
+
139
+ ## Tutorials
140
+
141
+ - PyOhio 2019 presentation:
142
+ - [video](https://www.youtube.com/watch?v=pebeWrTqIIw)
143
+ - [slides](https://github.com/python-cmd2/talks/blob/master/PyOhio_2019/cmd2-PyOhio_2019.pdf)
144
+ - [example code](https://github.com/python-cmd2/talks/tree/master/PyOhio_2019/examples)
145
+ - [Cookiecutter](https://github.com/cookiecutter/cookiecutter) Templates from community
146
+ - Basic cookiecutter template for cmd2 application : https://github.com/jayrod/cookiecutter-python-cmd2
147
+ - Advanced cookiecutter template with external plugin support : https://github.com/jayrod/cookiecutter-python-cmd2-ext-plug
148
+ - [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/master/examples)
149
+ - Basic cmd2 examples to demonstrate how to use various features
150
+ - [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
151
+ - More complex examples that demonstrate more featuers about how to put together a complete application
152
+
153
+ ## Hello World
154
+
155
+ ```python
156
+ #!/usr/bin/env python
157
+ """A simple cmd2 application."""
158
+ import cmd2
159
+
160
+
161
+ class FirstApp(cmd2.Cmd):
162
+ """A simple cmd2 application."""
163
+
164
+ def do_hello_world(self, _: cmd2.Statement):
165
+ self.poutput('Hello World')
166
+
167
+ if __name__ == '__main__':
168
+ import sys
169
+ c = FirstApp()
170
+ sys.exit(c.cmdloop())
171
+
172
+ ```
173
+
174
+ ## Found a bug?
175
+
176
+ If you think you've found a bug, please first read through the open [Issues](https://github.com/python-cmd2/cmd2/issues). If you're confident it's a new bug, go ahead and create a new GitHub issue. Be sure to include as much information as possible so we can reproduce the bug. At a minimum, please state the following:
177
+
178
+ - `cmd2` version
179
+ - Python version
180
+ - OS name and version
181
+ - What you did to cause the bug to occur
182
+ - Include any traceback or error message associated with the bug
183
+
184
+ ## Projects using cmd2
185
+
186
+ | Application Name | Description | Organization or Author |
187
+ | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
188
+ | [CephFS Shell](https://github.com/ceph/ceph) | The Ceph File System, or CephFS, is a POSIX-compliant file system built on top of Ceph’s distributed object store | [ceph](https://ceph.com/) |
189
+ | [garak](https://github.com/NVIDIA/garak) | LLM vulnerability scanner that checks if an LLM can be made to fail in a way we don't want | [NVIDIA](https://github.com/NVIDIA) |
190
+ | [medusa](https://github.com/Ch0pin/medusa) | Binary instrumentation framework that that automates processes for the dynamic analysis of Android and iOS Applications | [Ch0pin](https://github.com/Ch0pin) |
191
+ | [InternalBlue](https://github.com/seemoo-lab/internalblue) | Bluetooth experimentation framework for Broadcom and Cypress chips | [Secure Mobile Networking Lab](https://github.com/seemoo-lab) |
192
+ | [SCCMHunter](https://github.com/garrettfoster13/sccmhunter) | A post-ex tool built to streamline identifying, profiling, and attacking SCCM related assets in an Active Directory domain | [Garret Foster](https://github.com/garrettfoster13) |
193
+ | [Unipacker](https://github.com/unipacker/unipacker) | Automatic and platform-independent unpacker for Windows binaries based on emulation | [unipacker](https://github.com/unipacker) |
194
+ | [Frankenstein](https://github.com/seemoo-lab/frankenstein) | Broadcom and Cypress firmware emulation for fuzzing and further full-stack debugging | [Secure Mobile Networking Lab](https://github.com/seemoo-lab) |
195
+ | [Poseidon](https://github.com/faucetsdn/poseidon) | Leverages software-defined networks (SDNs) to acquire and then feed network traffic to a number of machine learning techniques. | [Faucet SDN](https://github.com/faucetsdn) |
196
+ | [DFTimewolf](https://github.com/log2timeline/dftimewolf) | A framework for orchestrating forensic collection, processing and data export | [log2timeline](https://github.com/log2timeline) |
197
+ | [GAP SDK](https://github.com/GreenWaves-Technologies/gap_sdk) | SDK for Greenwaves Technologies' GAP8 IoT Application Processor | [GreenWaves Technologies](https://github.com/GreenWaves-Technologies) |
198
+ | [REW Sploit](https://github.com/REW-sploit/REW-sploit) | Emulate and Dissect Metasploit Framework (MSF) and other attacks | [REW-sploit](https://github.com/REW-sploit) |
199
+ | [tomcatmanager](https://github.com/tomcatmanager/tomcatmanager) | A command line tool and python library for managing a tomcat server | [tomcatmanager](https://github.com/tomcatmanager) |
200
+ | [Falcon Toolkit](https://github.com/CrowdStrike/Falcon-Toolkit) | Unleash the power of the CrowdStrike Falcon Platform at the CLI | [CrowdStrike](https://github.com/CrowdStrike) |
201
+ | [EXPLIoT](https://gitlab.com/expliot_framework/expliot) | Internet of Things Security Testing and Exploitation framework | [expliot_framework](https://gitlab.com/expliot_framework/) |
202
+
203
+ Possibly defunct but still good examples
204
+
205
+ | Application Name | Description | Organization or Author |
206
+ | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
207
+ | [Katana](https://github.com/JohnHammond/katana) | Automatic CTF Challenge Solver | [John Hammond](https://github.com/JohnHammond) |
208
+ | [SatanSword](https://github.com/Lucifer1993/SatanSword) (in Chinese) | Comprehensive Penetration Framework for Red Teaming | [Lucifer1993](https://github.com/Lucifer1993) |
209
+ | [Jok3r](http://www.jok3r-framework.com) | Network & Web Pentest Automation Framework | [Koutto](https://github.com/koutto) |
210
+ | [Counterfit](https://github.com/Azure/counterfit) | a CLI that provides a generic automation layer for assessing the security of ML models | [Microsoft Azure](https://github.com/Azure) |
211
+ | [Overlord](https://github.com/qsecure-labs/overlord) | Red Teaming Infrastructure Automation | [QSecure Labs](https://github.com/qsecure-labs) |
212
+ | [Automated Reconnaissance Pipeline](https://github.com/epi052/recon-pipeline) | An automated target reconnaissance pipeline | [epi052](https://github.com/epi052) |
213
+ | [JSShell](https://github.com/Den1al/JSShell) | An interactive multi-user web JavaScript (JS) shell | [Den1al](https://github.com/Den1al) |
214
+ | [RedShell](https://github.com/Verizon/redshell) | An interactive command prompt for red teaming and pentesting | [Verizon](https://github.com/Verizon) |
215
+ | [FLASHMINGO](https://github.com/mandiant/flashmingo) | Automatic analysis of SWF files based on some heuristics. Extensible via plugins. | [Mandiant](https://github.com/mandiant) |
216
+ | [psiTurk](https://github.com/NYUCCL/psiTurk) | An open platform for science on Amazon Mechanical Turk | [NYU Computation and Cognition Lab](https://github.com/NYUCCL) |
217
+
218
+ Note: If you have created an application based on `cmd2` that you would like us to mention here, please get in touch.
@@ -0,0 +1,24 @@
1
+ cmd2/__init__.py,sha256=C6IHJ_uHgkqejuRwA10IK0-OzPxHKyZbPn82nMUwn-A,2602
2
+ cmd2/ansi.py,sha256=_3gAbMgqh8ksg43N2xQLp2u8uoB81BUl3CFoBN0990I,32036
3
+ cmd2/argparse_completer.py,sha256=6z0zmODqM7vhQhI0c6JUvCmR2V4qfdWQEyTZeNIea8c,36505
4
+ cmd2/argparse_custom.py,sha256=eZS-PodcF-UqhclKr61Wy0KXLRHM382Tk4T7mzlaWko,57689
5
+ cmd2/clipboard.py,sha256=7EISono76d7djj17hbvR9cCTB7jVGSBkUjgVQiMyUjE,549
6
+ cmd2/cmd2.py,sha256=GRIBAdRtDs2fXcUkE-IMaKIRLHV2slNbKTyPFq8QMHw,261090
7
+ cmd2/command_definition.py,sha256=OscFEk-O2N20fb8_fhkczqclaCxOwYyxNTnXWXOlngg,7655
8
+ cmd2/constants.py,sha256=DioxETv-_HzcMUnjuPyz7Cqw4YEt_MTrzOMotiHj-Jo,1981
9
+ cmd2/decorators.py,sha256=QVRyGQmAM6YBUhlZHqEVAvt9Tn1NqKGeSjDrLoUHvJg,20261
10
+ cmd2/exceptions.py,sha256=DwX7rQmon4eRyX1ZK4yne4lObdPO1j5Agg3Bav6pXwU,3600
11
+ cmd2/history.py,sha256=4iFi0Bny1CTjMx0ByQplrElvlZcus3lUgj2IyBfvAf0,14988
12
+ cmd2/parsing.py,sha256=58gD8hSvSV3nCliyoEZXJbvbzbnJ_5mSnwhTQhMM0BI,28297
13
+ cmd2/plugin.py,sha256=CCzzuHeBQbxH7YuG3UCdQ0uArnKYbodjhj-sYCbXSa0,814
14
+ cmd2/py.typed,sha256=qrkHrYJvGoZpU2BpVLNxJB44LlhqVSKyYOwD_L_1m3s,10
15
+ cmd2/py_bridge.py,sha256=DJCa7ff-XLwcz7Ij47nrwxgDDVUIVS5bRReLmayok1Q,5016
16
+ cmd2/rl_utils.py,sha256=HVPdNjuYyU67-XerPUJArmzhohzI1ABrZhU9cLc-EIs,11538
17
+ cmd2/table_creator.py,sha256=qoxt9s3MxQkfSkp4cIPFMlVzC7kRjUU55p0ow7pFQus,47544
18
+ cmd2/transcript.py,sha256=I0sD38RbG79Qz9GXIlfh1pHSNmWBTY2SLZAKEdSLWI4,9182
19
+ cmd2/utils.py,sha256=TElD9YnN5yT7BNuUcKSLpqRLcxrVmx_etkKHETFxRWU,49366
20
+ cmd2-2.5.9.dist-info/LICENSE,sha256=QXrW0Z0merk9mncyUkn-sgRxhT8_o1dL5HEaBNH47Q4,1099
21
+ cmd2-2.5.9.dist-info/METADATA,sha256=l1ODgTmFJO7C1Lgro-FIdGMldbIOCHrvmilsRCSUml8,17103
22
+ cmd2-2.5.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
23
+ cmd2-2.5.9.dist-info/top_level.txt,sha256=gJbOJmyrARwLhm5diXAtzlNQdxbDZ8iRJ8HJi65_5hg,5
24
+ cmd2-2.5.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.37.1)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,225 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: cmd2
3
- Version: 2.4.2
4
- Summary: cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python
5
- Home-page: https://github.com/python-cmd2/cmd2
6
- Author: Catherine Devlin
7
- Author-email: catherine.devlin@gmail.com
8
- License: MIT
9
- Keywords: command prompt console cmd
10
- Platform: any
11
- Classifier: Development Status :: 5 - Production/Stable
12
- Classifier: Environment :: Console
13
- Classifier: Operating System :: OS Independent
14
- Classifier: Intended Audience :: Developers
15
- Classifier: Intended Audience :: System Administrators
16
- Classifier: License :: OSI Approved :: MIT License
17
- Classifier: Programming Language :: Python
18
- Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.6
20
- Classifier: Programming Language :: Python :: 3.7
21
- Classifier: Programming Language :: Python :: 3.8
22
- Classifier: Programming Language :: Python :: 3.9
23
- Classifier: Programming Language :: Python :: 3.10
24
- Classifier: Programming Language :: Python :: Implementation :: CPython
25
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
- Requires-Python: >=3.6
27
- Description-Content-Type: text/markdown
28
- License-File: LICENSE
29
- Requires-Dist: attrs (>=16.3.0)
30
- Requires-Dist: pyperclip (>=1.6)
31
- Requires-Dist: wcwidth (>=0.1.7)
32
- Requires-Dist: importlib-metadata (>=1.6.0) ; python_version < "3.8"
33
- Requires-Dist: typing-extensions ; python_version < "3.8"
34
- Requires-Dist: pyreadline3 ; sys_platform=='win32'
35
- Provides-Extra: dev
36
- Requires-Dist: codecov ; extra == 'dev'
37
- Requires-Dist: doc8 ; extra == 'dev'
38
- Requires-Dist: flake8 ; extra == 'dev'
39
- Requires-Dist: invoke ; extra == 'dev'
40
- Requires-Dist: mypy (==0.902) ; extra == 'dev'
41
- Requires-Dist: nox ; extra == 'dev'
42
- Requires-Dist: pytest (>=4.6) ; extra == 'dev'
43
- Requires-Dist: pytest-cov ; extra == 'dev'
44
- Requires-Dist: pytest-mock ; extra == 'dev'
45
- Requires-Dist: sphinx ; extra == 'dev'
46
- Requires-Dist: sphinx-rtd-theme ; extra == 'dev'
47
- Requires-Dist: sphinx-autobuild ; extra == 'dev'
48
- Requires-Dist: twine (>=1.11) ; extra == 'dev'
49
- Provides-Extra: test
50
- Requires-Dist: codecov ; extra == 'test'
51
- Requires-Dist: coverage ; extra == 'test'
52
- Requires-Dist: pytest (>=4.6) ; extra == 'test'
53
- Requires-Dist: pytest-cov ; extra == 'test'
54
- Requires-Dist: pytest-mock ; extra == 'test'
55
- Requires-Dist: gnureadline ; (sys_platform == "darwin") and extra == 'test'
56
- Provides-Extra: validate
57
- Requires-Dist: flake8 ; extra == 'validate'
58
- Requires-Dist: mypy (==0.902) ; extra == 'validate'
59
- Requires-Dist: types-pkg-resources ; extra == 'validate'
60
-
61
- <h1 align="center">cmd2 : immersive interactive command line applications</h1>
62
-
63
- [![Latest Version](https://img.shields.io/pypi/v/cmd2.svg?style=flat-square&label=latest%20stable%20version)](https://pypi.python.org/pypi/cmd2/)
64
- [![GitHub Actions](https://github.com/python-cmd2/cmd2/workflows/CI/badge.svg)](https://github.com/python-cmd2/cmd2/actions?query=workflow%3ACI)
65
- [![Azure Build status](https://python-cmd2.visualstudio.com/cmd2/_apis/build/status/python-cmd2.cmd2?branch=master)](https://python-cmd2.visualstudio.com/cmd2/_build/latest?definitionId=1&branch=master)
66
- [![codecov](https://codecov.io/gh/python-cmd2/cmd2/branch/master/graph/badge.svg)](https://codecov.io/gh/python-cmd2/cmd2)
67
- [![Documentation Status](https://readthedocs.org/projects/cmd2/badge/?version=latest)](http://cmd2.readthedocs.io/en/latest/?badge=latest)
68
- <a href="https://discord.gg/RpVG6tk"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg" alt="Chat"></a>
69
-
70
-
71
- <p align="center">
72
- <a href="#main-features">Main Features</a> •
73
- <a href="#installation">Installation</a> •
74
- <a href="#tutorials">Tutorials</a> •
75
- <a href="#projects-using-cmd2">Projects using cmd2</a> •
76
- <a href="#version-two-notes">Version 2.0 Notes</a>
77
- </p>
78
-
79
- [![Screenshot](https://raw.githubusercontent.com/python-cmd2/cmd2/master/cmd2.png)](https://youtu.be/DDU_JH6cFsA)
80
-
81
- cmd2 is a tool for building interactive command line applications in Python. Its goal is to make it
82
- quick and easy for developers to build feature-rich and user-friendly interactive command line
83
- applications. It provides a simple API which is an extension of Python's built-in
84
- [cmd](https://docs.python.org/3/library/cmd.html) module. cmd2 provides a wealth of features on top
85
- of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary
86
- when using cmd.
87
-
88
- The developers toolbox
89
- ----------------------
90
-
91
- ![system schema](https://raw.githubusercontent.com/python-cmd2/cmd2/master/.github/images/graph.drawio.png)
92
-
93
-
94
- When creating solutions developers have no shortage of tools to create rich and smart user interfaces.
95
- System administrators have long been duct taping together brittle workflows based on a menagerie of simple command line tools created by strangers on github and the guy down the hall.
96
- Unfortunately, when CLIs become significantly complex the ease of command discoverability tends to fade quickly.
97
- On the other hand, Web and traditional desktop GUIs are first in class when it comes to easily discovering functionality.
98
- The price we pay for beautifully colored displays is complexity required to aggregate disperate applications into larger systems.
99
- `cmd2` fills the niche between high [ease of command discovery](https://clig.dev/#ease-of-discovery) applications and smart workflow automation systems.
100
-
101
- The `cmd2` framework provides a great mixture of both worlds. Application designers can easily create complex applications and rely on the cmd2 library to offer effortless user facing help and extensive tab completion.
102
- When users become comfortable with functionality, cmd2 turns into a feature rich library enabling a smooth transition to full automation. If designed with enough forethought, a well implemented cmd2 application can serve as a boutique workflow tool. `cmd2` pulls off this flexibility based on two pillars of philosophy:
103
-
104
- * Tab Completion
105
- * Automation Transition
106
-
107
- Philosophy
108
- -------------
109
-
110
- <a href="https://imgflip.com/i/63h03x"><img src="https://i.imgflip.com/63h03x.jpg" title="made at imgflip.com" width="70%" height="%70"/></a>
111
-
112
-
113
- Deep extensive tab completion and help text generation based on the argparse library create the first pillar of 'ease of command discovery'. The following is a list of features in this category.
114
-
115
- - Great tab completion of commands, subcommands, file system paths, and shell commands.
116
- - Custom tab completion for user designed commands via simple function overloading.
117
- - Tab completion from `persistent_history_file` sources added with very little friction.
118
- - Automatic tab completion of `argparse` flags and optional arguments.
119
- - Path completion easily enabled.
120
- - When all else fails, custom tab completion based on `choices_provider` can fill any gaps.
121
-
122
- <a href="https://imgflip.com/i/66t0y0"><img src="https://i.imgflip.com/66t0y0.jpg" title="made at imgflip.com" width="70%" height="70%"/></a>
123
-
124
- cmd2 creates the second pillar of 'ease of transition to automation' through alias/macro creation, command line argument parsing and execution of cmd2 scripting.
125
-
126
- - Flexible alias and macro creation for quick abstraction of commands.
127
- - Text file scripting of your application with `run_script` (`@`) and `_relative_run_script` (`@@`)
128
- - Powerful and flexible built-in Python scripting of your application using the `run_pyscript` command
129
- - Transcripts for use with built-in regression can be automatically generated from `history -t` or `run_script -t`
130
-
131
-
132
- Installation
133
- ------------
134
- On all operating systems, the latest stable version of `cmd2` can be installed using pip:
135
-
136
- ```bash
137
- pip install -U cmd2
138
- ```
139
-
140
- cmd2 works with Python 3.6+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party dependencies.
141
-
142
- For information on other installation options, see
143
- [Installation Instructions](https://cmd2.readthedocs.io/en/latest/overview/installation.html) in the cmd2
144
- documentation.
145
-
146
-
147
- Documentation
148
- -------------
149
- The latest documentation for cmd2 can be read online here: https://cmd2.readthedocs.io/en/latest/
150
-
151
- It is available in HTML, PDF, and ePub formats.
152
-
153
-
154
- The best way to learn the cmd2 api is to delve into the example applications located in source under examples.
155
-
156
- Tutorials
157
- ---------
158
-
159
- * PyOhio 2019 presentation:
160
- * [video](https://www.youtube.com/watch?v=pebeWrTqIIw)
161
- * [slides](https://github.com/python-cmd2/talks/blob/master/PyOhio_2019/cmd2-PyOhio_2019.pdf)
162
- * [example code](https://github.com/python-cmd2/talks/tree/master/PyOhio_2019/examples)
163
- * [Cookiecutter](https://github.com/cookiecutter/cookiecutter) Templates from community
164
- * Basic cookiecutter template for cmd2 application : https://github.com/jayrod/cookiecutter-python-cmd2
165
- * Advanced cookiecutter template with external plugin support : https://github.com/jayrod/cookiecutter-python-cmd2-ext-plug
166
- * [Example Applications](https://github.com/jayrod/cmd2-example-apps)
167
-
168
-
169
- Hello World
170
- -----------
171
-
172
- ```python
173
- #!/usr/bin/env python
174
- """A simple cmd2 application."""
175
- import cmd2
176
-
177
-
178
- class FirstApp(cmd2.Cmd):
179
- """A simple cmd2 application."""
180
-
181
- def do_hello_world(self, _: cmd2.Statement):
182
- self.poutput('Hello World')
183
-
184
- if __name__ == '__main__':
185
- import sys
186
- c = FirstApp()
187
- sys.exit(c.cmdloop())
188
-
189
- ```
190
-
191
-
192
- Found a bug?
193
- ------------
194
-
195
- If you think you've found a bug, please first read through the open [Issues](https://github.com/python-cmd2/cmd2/issues). If you're confident it's a new bug, go ahead and create a new GitHub issue. Be sure to include as much information as possible so we can reproduce the bug. At a minimum, please state the following:
196
-
197
- * ``cmd2`` version
198
- * Python version
199
- * OS name and version
200
- * What you did to cause the bug to occur
201
- * Include any traceback or error message associated with the bug
202
-
203
-
204
- Projects using cmd2
205
- -------------------------------
206
-
207
- | Application Name | Description | |
208
- |-----------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|---|
209
- | [Jok3r](http://www.jok3r-framework.com) | Network & Web Pentest Automation Framework | |
210
- | [CephFS Shell](https://github.com/ceph/ceph) | [Ceph](https://ceph.com/) is a distributed object, block, and file storage platform | |
211
- | [psiTurk](https://psiturk.org) | An open platform for science on Amazon Mechanical Turk | |
212
- | [Poseidon](https://github.com/CyberReboot/poseidon) | Leverages software-defined networks (SDNs) to acquire and then feed network traffic to a number of machine learning techniques. | |
213
- | [Unipacker](https://github.com/unipacker/unipacker) | Automatic and platform-independent unpacker for Windows binaries based on emulation | |
214
- | [tomcatmanager](https://github.com/tomcatmanager/tomcatmanager) | A command line tool and python library for managing a tomcat server | |
215
- | [Expliot](https://gitlab.com/expliot_framework/expliot) | Internet of Things (IoT) exploitation framework | |
216
- | [mptcpanalyzer]() | Tool to help analyze mptcp pcaps | |
217
- | [clanvas](https://github.com/marklalor/clanvas) | Command-line client for Canvas by Instructure | |
218
-
219
-
220
- Possibly defunct but still good examples
221
-
222
- * [JSShell](https://github.com/Den1al/JSShell)
223
- * [FLASHMINGO](https://github.com/fireeye/flashmingo)
224
-
225
-
@@ -1,24 +0,0 @@
1
- cmd2/__init__.py,sha256=kyKimWJ0rCDXub-faObNgvknbvc7owO7WtGY3fCDmBk,2723
2
- cmd2/ansi.py,sha256=Ccg7Uwwe7XyipH1V1PoTypkB5iNfIvS2aAdiOfIWSpk,32075
3
- cmd2/argparse_completer.py,sha256=WIZnY20LjbxPxdUsY_u7jvws_zgA5EGVf2Pr1S4x93I,36642
4
- cmd2/argparse_custom.py,sha256=Rve7G0rhxVhND40JRFNsS3WcQsCA7fFrLygUOCPdIFI,58821
5
- cmd2/clipboard.py,sha256=bLPn44J1qPREpd1PleiRw3Yla-gP2VK7Rtx46dpxUDA,1251
6
- cmd2/cmd2.py,sha256=YERYLzAJQsprPsSONryR9J-aB6Rqqw6RcEOzWZD_VEI,247287
7
- cmd2/command_definition.py,sha256=c8PXb3r7uSgy72QxXHQ7G4d_K14pr3WiLu34zs7xTpA,6277
8
- cmd2/constants.py,sha256=O5SfjAZGgCl5-IxuHqBMmgbG3HhllxIcZBtkzzLYohA,1865
9
- cmd2/decorators.py,sha256=ixO16KcEY-qnpl8ollYdGIWQ56m5mOEBWR7AYJ252YU,19570
10
- cmd2/exceptions.py,sha256=Ae7zLnvs2oea2XYb0gnQ6QXng5x9fQJYl8r5wG0qCq8,3638
11
- cmd2/history.py,sha256=0XMPYru90JuZV8ea-pa9MBla5uL3XzDi5MPqZGaKiVE,14524
12
- cmd2/parsing.py,sha256=MON7fXRCzZ7BxQ1OTdKTFb6qcUdxhwXkcAUlzB1fUvQ,29028
13
- cmd2/plugin.py,sha256=Fi8gN6B6tuKHs8VXq1UTqB3yTKGMMYqTh4WkszBfx4Y,847
14
- cmd2/py.typed,sha256=qrkHrYJvGoZpU2BpVLNxJB44LlhqVSKyYOwD_L_1m3s,10
15
- cmd2/py_bridge.py,sha256=zf991EIAq5IPlWKc1HsONUKPOaDI4vpkYz5Xpk4MS58,4605
16
- cmd2/rl_utils.py,sha256=SscZBRBR4LjSvo9Av4c0CIIFJAs5KD0WFx5YifQ0CNc,10317
17
- cmd2/table_creator.py,sha256=U1c8lDXTU0YoXpOVQzzdFQ1-Zyk_aYBLY0vNSOaCoXo,47543
18
- cmd2/transcript.py,sha256=DSvFYWtKDf4Ee6XsGDf2UNTvr2kvMVQ1lVYjNq3LSus,9184
19
- cmd2/utils.py,sha256=knEjaURM1fq3zJPxdHdpfnFGXKg_J0nYg98lNpURHAs,47727
20
- cmd2-2.4.2.dist-info/LICENSE,sha256=x0E8gRl_HmwPfgxLhl1SupadlwN7gAbLGIqCEA-GmA0,1099
21
- cmd2-2.4.2.dist-info/METADATA,sha256=-heniuarG0jE8sdZwAMok6wS8_TzQF2MNXJIHXzPWLg,12166
22
- cmd2-2.4.2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
23
- cmd2-2.4.2.dist-info/top_level.txt,sha256=gJbOJmyrARwLhm5diXAtzlNQdxbDZ8iRJ8HJi65_5hg,5
24
- cmd2-2.4.2.dist-info/RECORD,,