fluxfile

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2025 License: MIT Imports: 3 Imported by: 0

README

FluxFile

Modern task runner and build automation tool with a clean, minimal syntax.

Features

  • Clean, indentation-based DSL
  • Dependency graph resolution with cycle detection
  • Task result caching based on file hashes
  • File watching for automatic re-execution
  • Matrix builds for multi-platform compilation
  • Docker container execution
  • Remote execution over SSH
  • Variable expansion and shell command execution
  • Profile support for environment-specific configuration
  • Include directive for modular FluxFiles

Installation

Linux / macOS
curl -fsSL https://get.flux.sh/install.sh | sh
Windows
iwr -useb https://get.flux.sh/install.ps1 | iex
From Source
git clone https://github.com/ashavijit/fluxfile
cd fluxfile
make install

Quick Start

Create a FluxFile in your project root:

task build:
    run:
        go build -o app ./cmd

task test:
    deps: build
    run:
        go test ./...

task dev:
    watch: **/*.go
    run:
        go run ./cmd

Run tasks:

flux build
flux -t test
flux -w dev

Syntax Reference

Variables
var PROJECT = myapp
var VERSION = $(shell "git describe --tags")
Tasks
task name:
    deps: dep1, dep2
    env:
        KEY = value
    run:
        command1
        command2
    watch: **/*.go
    matrix:
        os: linux, darwin
        arch: amd64, arm64
    docker: true
    remote: user@host
Profiles
profile dev:
    env:
        MODE = development
        DEBUG = true
Include
include "tasks/docker.flux"

CLI Usage

flux [options] <task>

Options:
  -t string     Task to execute
  -p string     Profile to apply
  -l            List all tasks
  -w            Watch mode
  -no-cache     Disable caching
  -f string     Path to FluxFile
  -v            Show version

Examples

Matrix Build
task cross-compile:
    matrix:
        os: linux, darwin, windows
        arch: amd64, arm64
    run:
        GOOS=${os} GOARCH=${arch} go build -o dist/app-${os}-${arch}
Docker Build
task docker-test:
    docker: true
    run:
        npm install
        npm test
Remote Deployment
task deploy:
    remote: deploy@prod.example.com
    run:
        docker-compose pull
        docker-compose up -d

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
flux command
internal
ast

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL