65 lines
No EOL
1 KiB
Markdown
65 lines
No EOL
1 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
|
|
|
|
### List scripts
|
|
|
|
```shell
|
|
$ rundir
|
|
```
|
|
|
|
### Create script
|
|
|
|
```shell
|
|
$ rundir create myscript
|
|
```
|
|
|
|
### Run a script
|
|
|
|
```shell
|
|
$ rundir x myscript
|
|
|
|
# ... or if you're in the root directory just...
|
|
$ .run/myscript
|
|
```
|
|
|
|
### Print the path of the current rundir
|
|
|
|
```shell
|
|
$ rundir which
|
|
```
|
|
|
|
### Open a script in your editor
|
|
|
|
```shell
|
|
$ rundir edit myscript
|
|
```
|
|
|
|
### Print help message
|
|
```shell
|
|
$ rundir help
|
|
``` |