Mate: Extremely pluggable and modular shell
Features
- Easy plugin creation using setuptools
- Manage group of plugins better by
mate --shells - Built-in auto complete
- Forced modularity in plugins
- Dope looking shell
- Provides command output redirect to embedded ipython
- Supports batch executions by
mate --execand JSON formatted output
Installation
Using pypi
pip3 install mate-shell
Using git
git clone https://github.com/twisted-fun/mate.git
cd mate
pip3 install -e .
Usage
Hope this asciinema will help.
Plugins
Commands can be added into mate shell as plugins. And it's super easy!
Writing a plugin
# demo_plugin.py
from mate import add_plugins, command
def sxor(s1, s2):
return "".join(chr(ord(a) ^ ord(b)) for a, b in zip(s1, s2))
@command(option="xor")
def bitwise_string_xor(self, str1, str2):
"""A bitwise xor operation for two strings."""
return {"result": sxor(str1, str2).__repr__()}
add_plugins(modules=[bitwise_string_xor])
# setup.py
from setuptools import setup
setup(
name="mate-demo-plugin",
install_requires="mate-shell",
entry_points={"mate": ["bitwise_str_xor = demo_plugin"]},
py_modules=["demo_plugin"],
)
Installing the plugin
pip3 install -e .
Accessing the plugin
Check out this asciinema.
More? Example Plugins
Metadata
Release files for mate-shell 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mate-shell-0.0.5.tar.gz | 27.1 kB | Without provenance | Details for mate-shell-0.0.5.tar.gz |
Release files / mate-shell-0.0.5.tar.gz
| Download URL | mate-shell-0.0.5.tar.gz |
|---|---|
| Size | 27.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
760fff45ff2603315400af899c0b5faaea76e9f1b7cbc970e72e2f1bb901bdff
|
|
BLAKE2b-256 checksum How to use checksums |
a6d72de512c09786f1b265f7e5bd06fa7a364e02d45981c204cc1a3b52babedb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/57.4.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Security for mate-shell 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.