All it does is run some pre-configured tasks for you, like running your applications, tests, building binaries, or some other scripts.
It is inspired by other task runners like Taskfile, Make etc. I decided to build my version of it, accounting the experiences that i want to see in a task runner.
- Run tasks (commands)
- Run tasks with Key-Value environment variables
- Run tasks with dynamic environment variables (referencing values by shell execution)
- Run tasks with dotenv files as their environment variables
- Importing tasks from different working directory (must in a monorepo) reference
- Running tasks in parallel (e.g. css generation and build in parallel)
- Running tasks with watch mode (e.g. like hot reload)
- Requirements prior to running a target (e.g. sanity tests)
- Environment validations and default value
| Tool | Command |
|---|---|
| Go | go install github.com/nxtcoder17/runfile/cmd/run@latest |
go install github.com/nxtcoder17/runfile/cmd/run@latestCreate a Runfile in the root of your project, and add tasks to it.
- simple tasks
tasks:
example:
cmd:
- echo "example"- using environment variables
tasks:
example:
env:
key: "hello world"
cmd:
- echo $key- using dynamic environment variables
tasks:
example:
env:
key:
sh: echo $HOME
cmd:
- echo $key- using dotenv based environment variables
tasks:
example:
dotenv:
- .env
cmd:
- echo $key# file: .env
key="my-dotenv-secret"- validating required environment variable
tasks:
example:
env:
key:
required: true
cmd:
- echo $key- referencing other tasks
tasks:
script1:
cmd:
- echo "i am script 1 (key=$key)"
example:
cmd:
- run: script1
env:
key: "hello"
- echo this is example (key=$key)




