xeq
Run sequences of commands from a JSON file with a single word.
Stop writing the same commands over and over. Define them once, run them anywhere.
Why xeq?
Setting up a new project usually means running 5-10 commands in order. You either remember them, keep them in a notes file, or write a shell script that only work from one place.
xeq fixes that. Write your commands in a JSON file once, commit it to your repo, and anyone on any OS can run the same setup with one command.
Installation
macOS / Linux
|
Windows (PowerShell)
iwr https://raw.githubusercontent.com/opmr0/xeq/main/install.ps1 -UseBasicParsing | iex
Via cargo
Quick Start
Create a xeq.json file in your project:
Tell xeq where your file is:
Run a script:
Commands
xeq config [path]
Save the path to your JSON file. xeq will use it every time you run a script.
Running xeq config with no arguments opens the saved file in your default editor.
xeq run <script>
Run a named script from your JSON file. Commands execute sequentially — if one fails, xeq stops unless you pass --continue-on-error.
| Flag | Short | Description |
|---|---|---|
--continue-on-error |
-C |
Keep running even if a command fails |
--quiet |
-q |
Hide xeq's own output, only show command output |
--clear |
-c |
Clear the screen before each command |
xeq list
List all scripts in your JSON file and the commands they run.
Output:
build runs:
cargo fmt
cargo clippy
cargo build --release
JSON Format
You can define as many scripts as you want in a single file. Each script is a named list of commands that run in order.
Nested scripts (beta)
You can define nested scripts using xeq://task_name syntax in the JSON file
example
deploy script runs both build and setup scripts respectively without needing to run both
How It Works
- Commands run sequentially, one at a time
cdcommands change the working directory for all commands that follow in the same script- On failure, xeq exits with the same exit code as the failed command
- Works on Linux, macOS, and Windows with the same JSON file
Examples
See the examples/ folder for ready-to-use JSON files:
react-tailwind.json— React + Tailwind CSS setupnextjs.json— Next.js project setuprust-project.json— Rust project workflowdocker-app.json— Docker Compose workflowgit-workflow.json— Common git operationsscripts-nesting.json— Example on nested tasks
License
MIT — LICENSE