Relux
Expect-style integration testing for interactive shell programs.
test "service healthcheck" {
let DATABASE_PORT := available_port()
let SERVICE_PORT := available_port()
start Service as service { DATABASE_PORT, SERVICE_PORT }
shell test {
> curl localhost:${SERVICE_PORT}/status
<? ^status: running
}
}
Relux sends input to PTY shells and matches output against regex or literal patterns with timeouts. Tests read like a transcript of a shell session - send a command, match the response, repeat.
Features
- Pattern matching - literal (
<=) and regex (<?) with capture groups - Timeouts - per-operator, per-test, and suite-level, with tolerance and assertion modes
- Effects - declarative test infrastructure with dependency graphs and automatic teardown
- Parallel execution - run tests concurrently with isolated environments
- Functions and modules - extract reusable logic, organize suites across files
- Fail patterns - continuous background monitoring for errors
- HTML reports - rich test output with shell I/O logs
- Single binary - no runtime dependencies
Installation
cargo install relux
Or build from source:
git clone https://github.com/shizzard/relux.git
cd relux
cargo build --release
Pre-built binaries are also available on the Releases page.
Quick start
relux new # scaffold a project
$EDITOR relux/tests/hello.relux # write a test
relux run # run all tests
Documentation
- DSL Tutorial - learn the Relux language from scratch
- Suite Tutorial - build a real-world test suite with shared infrastructure
- Reference - semantic model, configuration, syntax, built-in functions, CI integration
Editor support
- VS Code / Cursor: Visual Studio Marketplace
- VSCodium / code-server: Open VSX
- IntelliJ family: JetBrains Marketplace
See the editor support reference for details.
Claude Code plugin
Relux ships a Claude Code plugin - composable skills for authoring, running, and diagnosing Relux suites, surfaced as /relux:<skill-name> slash commands and auto-triggered while you work.
claude plugin marketplace add shizzard/relux
claude plugin install relux@relux
See agents/README.md for the skill catalog and how it is structured.