Skip to content

rexrun-dev/rex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rex

run anything, know nothing.

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, Docker, Make, and Just projects.

Demo

$ 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

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 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
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.

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

Optional: rex.toml

For repos that want to pin commands explicitly:

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

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

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors