Manage .run directories to execute scripts
.run | ||
src | ||
.gitignore | ||
biome.json | ||
bun.lock | ||
LICENSE | ||
package.json | ||
README.md | ||
tsconfig.json |
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.
mkdir .run
rundir create build # Creates a template script at .run/build
When running a script, invoke them directly:
$ .run/build
If you are in a child directory of the root project folder where the .run
directory lives, you can use rundir x
:
$ 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:
alias rdx="rundir x"
Then you can run scripts with rdx
instead of rundir x
:
rdx build