Package: pcshell
pretty-click-shell :pager:Create shell applications using Click for Python, with several out-of-the-box bells and whistles for a snazzier look and simple customizationFeaturesPcshellprovides several features that piggyback off of the Click Framework to make writing intuitive, versatile Shell applications as simple as writing a standard Click CLI. This includes:Pretty Formatting of all Help & Error textFull Autocompletion for Click Groups, Commands, and Sub-Shells.Automatic Lexing of your CLISupport for Typed Tuple Literals as Option ParametersBult-in Shell Commands: repeat, clear screen, clear history, etc.Command/Group AliasesSuggestions for mistyped commandsFull support for Windows OSFull customization of colorsInstallingInstalling Pretty Click Shell is easy. Simply use PyPi to install the module. Please review the requirements before installing.pip install pcshellWarning: This package is currently in anAlphastate.Windows Users:
In order for Mouse Support to work for autocompletion prompts,you will need to patch Prompt_Toolkit. I have included the patch inthis repository. You can patch the*.py files yourself or use thewindows_patch.bat.If you do not care about mouse support, be sure to setmouse_support=Falsewhen initializing your Shell.RequirementsPcshellis built for Windows OS. However, it should work with other systems as well, but it has never been tested.Pcshellrequires the following modules:click==7.1.2coloramaAnd, theneither:pyreadlineOrprompt-toolkit==2.0.10pygmentsPcshelluses Prompt Toolkit to provide Click autocompletion, lexing, and more- but it is not required. If you do not need want these features, then onlypyreadlineis required, and your Shell Application will function with these features simply absent.Prompt Toolkit v.2.0.10 is specifically required at this time due to incompatibilities with the Windows Terminal in the latest version. This may change in the future.
Click v.7.1.2 is specifically required at this time due to breaking changes in >v.8.x.xAt this time, thePyPi packageforpcshellrequires all of these listed modules as dependencies to make for easier testing of the package, as most of the core features rely on Prompt Toolkit. If you are a minimalist, you can go ahead and uninstall what you don't need or disable the features when initializing your shell.Getting StartedCreating a new shell application is simple. You will only need to importpcshelland use this module in place ofclick, as appropriate.To get started, take a look at these sample applications to get an understanding of all of the featurespcshellhas to offer:Bare Bones Shell ApplicationPcshell PlaygroundBe sure to read the libraries docstrings, too, where appropriate for further details about keyword arguments,  constants, and methods / decorators.To-Do List:These are additional features I would like to implement intopcshellin the future:Prompt Toolkit "rprompt" for live analysis of command errorsCustomizable Prompt Toolkit Toolbar for additional meta info/help textLexing for invalid typed tuple literal Option ParametersFeedback?I wrote Pretty Click Shell because I wanted a versatile template for writing shell applications with my favorite CLI framework, Click, specifically on Windows. This grew into me learning a lot more about Prompt Toolkit and how I could integrate these features automatically with my Click apps.If you have any suggestions or bugs to report, please create an issue here for me to review. Help me grow this project so that other developers on Windows OS can make some cool shell applications with Click :smile: