This package provides a command-line interface for running system commands with parsed options and arguments. It dynamically generates a function interface for any system command, allowing for easy execution and option handling.
- Dynamic parsing of command options from
--helpoutput - Support for short and long option formats
- Piping input from standard input or command line argument
- Ability to list available options for a command
To install the package, clone the repository and install the dependencies:
git clone <repository-url>
cd <repository-directory>
pip install -r requirements.txt
Run the script with the following syntax:
python mausify/main.py <command> [ARGS]... [OPTIONS]
command: The system command to runARGS: Additional arguments for the command (optional)
-o, --option TEXT: Specify command options (can be used multiple times)-p, --pipe TEXT: Provide input to pipe to the command-P, --print-args: Print available options for the command--help: Show help message and exit
-
List available options for a command:
python mausify/main.py ls --print-args -
Run a command with options:
python mausify/main.py ls -o l -o a /home -
Pipe input to a command:
python mausify/main.py grep -o i -p "search text" search_pattern -
Use standard input:
echo "Hello, World!" | python mausify/main.py grep World
This tool is designed for educational and development purposes. Use caution when running system commands, especially with elevated privileges.