flux-core 0.5.2

Declarative task runner with dependency management, parallel execution, and watch mode
# Flux

[![Rust](https://img.shields.io/badge/rust-%23000000.svg?style=flat&logo=rust&logoColor=white)](https://www.rust-lang.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Version](https://img.shields.io/badge/version-v0.5.2-blue.svg)](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

| Feature | Command | Description |
|---------|---------|-------------|
| πŸ“ 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?

| | Make | npm | 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)