devrun-0.1.0 is not a library.
run
A simple scripting language for CLI automation. Define functions in a Runfile (or ~/.runfile) and call them from the command line to streamline your development workflow.
Installation
Clone this repo and build with Cargo:
Usage
- Run a script file:
- Call a function defined in your
Runfile: - Pass arguments to functions:
- Start an interactive shell (REPL):
Runfile Examples (npm, uv, docker, arguments)
# Example for python, node, and docker
python:install() uv venv && uv pip install -r requirements.txt
python:test() uv pip install pytest && pytest
node:dev() npm install && npm run dev
node:lint() npm run lint
docker:build() docker build -t myapp .
docker:run() docker run -it --rm myapp
docker:shell() docker compose exec $1 bash
docker:logs() docker compose logs -f $1
Calling Nested Functions and Passing Arguments
- To call a nested function, use space-separated names:
- Arguments are passed positionally and available as
$1,$2,$@, etc. Default values can be set using shell syntax (e.g.,${2:-done}).
Configuration
- Place your
Runfilein the project root or in your home directory as.runfile. - Functions are defined as
name()followed by a command on the same line. - Arguments can be passed to functions and accessed as
$1,$2,$@, etc.
License
MIT