Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rex

run anything, know nothing.

Mentioned in Awesome Go CI Go Report Card Coverage Release License

InstallDemoCommandsStacksHow it works


rex detects your project's stack and runs the right command. No config file. No README reading. No memorizing.

git clone https://github.com/someone/unknown-project
cd unknown-project
rex test

That's it. Works for Go, Node, Python, Rust, Java, Ruby, PHP, Zig, Elixir, Docker, Make, and Just projects.

Demo

https://github.com/rexrun-dev/rex/releases/download/v0.2.0/demo.mp4

Text version
$ cd some-go-project/
$ rex

  🦖 some-go-project

  stack  go

  commands
    rex test   → go test ./...
    rex run    → go run ./cmd/server
    rex build  → go build ./...
    rex deps   → go mod download
    rex fmt    → gofmt -w .
    rex lint   → go vet ./...
    rex clean  → go clean -cache

$ rex test
→ go test ./...
ok   github.com/example/app   1.2s
$ cd some-node-project/
$ rex

  🦖 some-node-project

  stack  node + pnpm

  commands
    rex test   → pnpm test
    rex run    → pnpm run dev
    rex build  → pnpm run build
    rex deps   → pnpm install
    rex clean  → rm -rf node_modules dist .next .nuxt build out

Install

# Homebrew (macOS/Linux)
brew tap rexrun-dev/tap && brew install rex

# Go
go install rexrun.dev/rex/cmd/rex@latest

Or download a binary from Releases.

Commands

Command What it does
rex Show project overview
rex test Run tests
rex run Start the app / dev server
rex build Build the project
rex deps Install dependencies
rex clean Remove build artifacts
rex fresh clean → deps → build (the "I pulled and it broke" fix)
rex fmt Format code
rex lint Lint code
rex watch [verb] Watch files and re-run on change (default: test)
rex ci Generate GitHub Actions CI workflow for your stack
rex docker Generate multi-stage Dockerfile for your stack
rex compose Generate docker-compose.yml for your stack
rex stats Show project report (files, lines, size)
rex badge Generate README badge markdown
rex clone <url> Clone + detect + install deps (URL to ready in one command)
rex init Generate rex.toml from detected commands (commit for your team)
rex completion Generate shell completions (bash/zsh/fish)
rex doctor Diagnose environment issues

Flags

rex --list       # show all detected commands
rex --dry-run test  # show what would run without executing
rex test -- -v -run TestFoo  # pass extra args to underlying command

Supported Stacks

Stack Package managers Detection
Go go modules go.mod
Node npm, pnpm, yarn, bun package.json + lockfile
Python pip, uv, poetry, pipenv pyproject.toml, requirements.txt, setup.py
Rust cargo Cargo.toml
PHP composer composer.json (detects Laravel via artisan)
Ruby bundler Gemfile (detects Rails via app/ + config/)
Java maven, gradle pom.xml, build.gradle (uses wrapper if present)
Zig zig build.zig
Elixir mix mix.exs (detects Phoenix via assets/)
Docker docker compose docker-compose.yml, compose.yml
Make Makefile
Just Justfile

Rex reads existing task runners first. If your project has a Makefile, Justfile, or Taskfile, those take priority.

Monorepo support

Rex auto-detects monorepos (packages/, apps/, services/ etc.) and shows all sub-projects:

$ rex

  🦖 my-monorepo (monorepo)

  workspace  3 sub-projects detected

    packages/api         → node + pnpm
    packages/web         → node + pnpm
    services/auth        → go

  hint: cd into a sub-project, then use rex test

How It Works

  1. Detect — Rex looks at your project root for known files (go.mod, package.json, Cargo.toml, etc.)
  2. Resolve — It maps standard verbs (test, run, build...) to the correct command for your stack
  3. Execute — It runs the command with full stdio passthrough and correct exit codes

No config needed. No lock-in. No magic.

Priority chain

1. Justfile / Makefile (task runner overrides)
2. package.json scripts / Cargo.toml / go.mod (ecosystem)
3. Language heuristics (fallback)

If a Makefile defines a test target, rex test runs make test — even in a Go project. Rex respects what's already there.

Philosophy

  • Zero config — works out of the box, in any repo
  • Transparent — always shows what it will run (the line)
  • Fast — single binary, <50ms startup, no network calls
  • Composable — correct exit codes, works in CI pipelines
  • Non-invasive — creates no files, modifies nothing
  • Watch moderex watch re-runs on file change
  • .env loading — auto-loads .env before commands

Optional: rex.toml

For repos that want to pin commands explicitly:

[commands]
test = "go test -race -count=1 ./..."
run = "air"
build = "goreleaser build --snapshot"

Generate one automatically:

rex init
# ✓ created rex.toml (go project)
# hint: edit commands to customize, then commit for your team

Rex uses this first when present. Your team always gets the right command.

CI Usage

# GitHub Actions
- run: rex test

# That's it. Works for any stack.

Contributing

git clone https://github.com/rexrun-dev/rex
cd rex
rex test  # yes, rex tests itself 🦖

License

Apache 2.0

About

Run anything, know nothing. Zero-config universal project runner.

Topics

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages