XMach, the cross-platform task runner.
Project description
Table of Contents
XMach - X(.O) (make) mach(inery).
Cross-platform task runner with current implementation in Python.
About
XMach is a minimalist, cross-platform task runner that allows to define and execute custom actions through a plugin-like system.
It provides a command-line interface for running tasks, managing configuration, and extending functionality through Python scripts.
Features
- cross-platform task execution
- extensible action system through python scripts
- built-in actions (ie for listing tasks and configuration management)
- environment variable support
- parallel job execution support
- plugin-like architecture with `xmach.d` directory
Installation
Pip under user
pip install --break-system-packages --user xmach-app
Usage
Basic Commands
# List available actions
xmach list
# Write default configuration file
xmach write-default-config
# Run custom actions
xmach my-action arg1 arg2
# Run multiple actions
xmach action1,action2 arg1 arg2
# Run with multiple jobs
xmach my-action --jobs 4
Configuration and extension
XMach looks for configuration in the `xmach.d` directory:
xmach-config.json- main configuration filexmach-config.example.json- example configuration templatexmach_*.py- python files containing custom action definitions
Configuration File Format
{
"environment": {
"CUSTOM_VAR": "value"
},
"scons_args": {
"parameter": "value"
}
}
Custom Actions
Create Python files in the xmach.d directory with names like xmach_myactions.py:
#!/usr/bin/env python
class ActionScripts(ActionScriptsBase):
def action__my_custom_action(self, action_args: list[str] = []) -> None:
"""Action: my-custom-action"""
# Run shell commands
RunCmd.run_cmd(cmd=["echo", "Hello World"])
License
Code
Code in this project is licensed under the MPL, version 2.0.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xmach_app-1.0.0.tar.gz.
File metadata
- Download URL: xmach_app-1.0.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b74337944e1492cc65bedc44f3532974ff4f319c9842c685dc6c25e6b03da20d
|
|
| MD5 |
984ecaf8084df70fb7427960ff2ae760
|
|
| BLAKE2b-256 |
070388ae7933758a8ff9af7db5838ed09b327061e5aa22bd7fb32d2baa912f14
|
File details
Details for the file xmach_app-1.0.0-py3-none-any.whl.
File metadata
- Download URL: xmach_app-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
419f9ccd18021e9f193cb2f130f9e0b38a3e5f9e1fd23c72b5e1718ea05a9ea9
|
|
| MD5 |
ea73ebce94ef40c0d4b4dc3b9180e2f2
|
|
| BLAKE2b-256 |
7e91e2d79b467412f798f28479243d282ef44da952bcec7fac5f32147e72eef8
|