# Flux
[](https://www.rust-lang.org/)
[](LICENSE)
[](https://github.com/yunusgungor/flux/releases)
> Declarative task runner with dependency management. Modern alternative to Makefile and package.json scripts.
```bash
flux build # Run task
flux build,test # Run in parallel
flux watch build # Watch for changes
```
## Quick Start
```bash
# Install
cargo install flux-core
# Create config
cat > flux.yaml << 'EOF'
build:
command: "cargo build --release"
runner: "cargo"
test:
command: "cargo test"
depends_on: ["build"]
EOF
# Run
flux build
flux test # Runs build first, then test
```
## Features
| π Declarative | `flux.yaml` | Define tasks in YAML |
| π Dependencies | `depends_on` | Automatic task ordering |
| β‘ Parallel | `flux build,test` | Run multiple tasks at once |
| ποΈ Watch | `flux watch build` | Auto-run on file changes |
| πͺ Hooks | `pre_hook` / `post_hook` | Execute before/after |
| π Multi-lang | `cargo`, `npm`, `make` | Works with any runner |
| π³ Docker | `flux-runner` | Containerized deployment |
| π WASM | `flux-wasm` | Edge runtime support |
## Usage
```bash
flux <task> # Run single task
flux <t1,t2,t3> # Run parallel
flux watch <task> [dir] # Watch mode
flux <task> --dry-run # Simulate
flux graph # Show dependency tree
flux runners # List all runners
```
## Configuration Example
```yaml
dev:
command: "cargo run"
description: "Start dev server"
build:
command: "cargo build --release"
depends_on: ["test"]
pre_hook: "echo 'Building...'"
test:
command: "cargo test"
runner: "cargo"
publish:
command: "cargo publish"
depends_on: ["build", "lint"]
post_hook: "echo 'Published!'"
```
## Installation
### Cargo
```bash
cargo install flux-core
```
### Docker
```bash
docker run --rm -v $(pwd):/workspace ghcr.io/yunusgungor/flux:latest help
```
### From Source
```bash
git clone https://github.com/yunusgungor/flux.git
cd flux && cargo build --release
sudo cp target/release/flux-core /usr/local/bin/flux
```
## Why Flux?
| Syntax | Complex | JSON-only | YAML |
| Dependencies | Limited | β | β
DAG |
| Parallel | β | β | β
|
| Watch | β | Needs tool | β
Built-in |
| Multi-lang | β
| β JS-only | β
|
## Documentation
- [Full Documentation](https://docs.rs/flux-core)
- [Docker Guide](docs/docker.md)
- [WASM Guide](docs/wasm.md)
- [Examples](examples/)
## License
MIT Β© [Yunus GΓΌngΓΆr](https://github.com/yunusgungor)