CommandRunner is my daily used command execution tool. It helps me to do a lot of batching works easily and able to implement variety of small handy tools. With automatically generated user interface or manual defined user interface. This utiltiy provides me a quick way to do many interesing things and exploring a lot of possibilities.
- Able to use mayapy or blender python mode to batch asset processing
- Implement utility scripts with exposed parameters
- Quick functionality validation and exploration
- Graphical User Interface: Clean and intuitive Qt-based interface for managing commands
- Extensible Architecture: Simple plugin system for adding new commands
- Real-time Output: Live command output monitoring with dedicated log windows
- Process Management: Start, stop, and monitor multiple processes simultaneously
- Clone the repository:
git clone https://github.com/220225/CommandRunner.git
cd CommandRunner
git submodule update --init --recursive
- Install dependencies:
pip install -r requirements.txt- Start the application:
python src/CommandRunnerMain.py-
The main window will show available commands in the left panel and command parameters in the right panel.
-
Select a command from the list and configure its parameters.
-
Click "Add Job" to add the command to the execution queue.
-
Use the "Run" button to execute the command.
-
"Show Log" to view the command output for each processing jobs.
-
Create a new Python file in the
src/Commandsdirectory. -
Define a command class that inherits from
CommandBase. -
Implement the required methods:
__init__: Initialize command parametersrun: Implement the command's execution logicrebuild_ui(optional): if needed for customizing the UI
-
Use dataclass field for command parameters, and command parameters UI will auto-generate.
-
Built - in member variables are supported.
label: The name shown in the UItooltip: Tool tip messageactive: Whether the command is enabledcategory: The category of the commandui_class: The user interface class of the command
Example:
from CommandBase import CommandBase
from dataclasses import dataclass, field
@dataclass
class MyNewCommand(CommandBase):
name = "MyNewCommand"
tooltip = "Description of what my command does"
# dataclass fields for command parameters
param_A: str = field(default="", metadata={"help": "a text edit box"})
param_B: int = field(default=2, metadata={"help": "a integer slider"})
param_C: str = field(default="opt_1", metadata={"help": "combo box with opt_1 and opt_2 option", "items": ["opt_1", "opt_2"]})
def __init__(self):
super().__init__()
def run(self, data):
# Implement command logic
passsrc/: Main source code directoryCommands/: Command implementation filesconfig/: Configuration filesui/: UI-related files and resourcesCommandBase.py: Base classes for commandsCommandExecuter.py: Command execution logicCommandRunnerMain.py: Main application entry pointCore.py: Core functionality and utilitiesWidgets.py: Qt widget implementations
This project is licensed under the MIT License - see the LICENSE file for details.
- Qt for Python (PySide6) for the GUI framework
- Qt.py for Python bindings
- qargparse for argument parsing and automatic UI generation
