rundir/README.md
2025-05-10 11:23:32 -04:00

53 lines
1.2 KiB
Markdown

# rundir
A CLI for managing `.run` script directories.
## Concept
Make a `.run` directory in your project (or wherever) which houses relevant scripts as extensionless executable files. The `rundir` cli can help create and manage these scripts.
```shell
mkdir .run
rundir create build # Creates a template script at .run/build
```
When running a script, invoke them directly:
```shell
$ .run/build
```
If you are in a child directory of the root project folder where the `.run` directory lives, you can use `rundir x`:
```shell
$ cd some/nested/path
$ rundir x build # runs the `build` script in the original `.run` directory
```
## CLI
```
Usage: rundir [command]
Commands:
x <name> Run a script from the nearest rundir (alias: run)
new <name> Create a new script in the rundir (alias: create)
ls List all scripts in the rundir
ls <name> Print the absolute path to a specific script
which Print the absolute path of the rundir
help Show this help message
```
## `rdx` alias
Consider setting an alias for `rundir x` to `rdx` for convenience:
```shell
alias rdx="rundir x"
```
Then you can run scripts with `rdx` instead of `rundir x`:
```shell
rdx build
```