mx

module
v0.0.0-...-4a57d31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2026 License: Apache-2.0

README

mx

Interactive parallel task runner with a TUI. Define jobs and dependencies in mx.yaml, run mx, and watch them execute in a DAG-ordered grid with streaming logs.

This project is an experiment. It is probably broken.

Install

go install codeberg.org/splitringresonator/mx/cmd/mx@latest

Usage

Create an mx.yaml in your project root:

defaults:
  timeout: 5m

jobs:
  vet:
    run: go vet ./...

  test:
    needs: [vet]
    run: go test -race ./...

  build:
    needs: [vet]
    run: go build ./cmd/myapp/

Run mx from anywhere in the project tree. It walks up to find mx.yaml.

mx                  # launch TUI
mx --parallel 4     # limit concurrent jobs
mx --config path    # explicit config path

Config

Jobs declare a run command and optional needs dependencies. mx resolves the DAG, runs root jobs first, and starts downstream jobs as dependencies complete.

jobs:
  lint:
    run: golangci-lint run
    timeout: 2m
    env:
      GOGC: "off"

  test:
    needs: [lint]
    run: go test -v ./...
    matrix:
      os: [ubuntu, alpine]
      arch: [amd64, arm64]
      exclude:
        - os: alpine
          arch: arm64

Matrix jobs expand into one instance per combination. All instances of a dependency must complete before downstream jobs start.

External sources (planned)

mx can import job definitions from existing build files instead of duplicating them. Set use to point at the source:

use: Makefile
use: .gitlab-ci.yml

Source type is inferred from the filename (Makefile/GNUmakefile for Make, .yml/.yaml for GitLab CI). Set type explicitly if needed:

use: ci/pipeline.yml
type: gitlab

Native jobs in mx.yaml coexist with external sources. Native jobs override imported ones with the same name.

Not yet implemented. The config schema accepts these fields and validates them, but the parsers aren't wired up.

Keybindings

Grid (job selection)
Key Action
h/l Move between job columns
j/k Move between matrix instances
tab Cycle to next job (wraps)
r Run selected job (triggers deps if idle)
R Run all jobs (retriggers completed)
f Retrigger all failed
a Retrigger all instances of selected job
e Open log in $EDITOR
o Open log with system viewer
enter Focus log pane
q Quit
Log viewer
Key Action
j/k Scroll line by line
ctrl-f/ctrl-b Page down/up
G/g Bottom/top
f Toggle follow mode
/ Search
n/N Next/prev match
e Open in $EDITOR
o Open with system viewer
esc Return to grid

License

Apache 2.0

Directories

Path Synopsis
cmd
mx command
pkg
dag
tui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL