about summary refs log tree commit diff
path: root/users/wpcarro/tools/run/README.md
blob: fd24495035ba401c79a836ed71e8e71f3e9aecad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# run

Simplify the commands you call to run scripts on the command line.

```shell
> run path/to/file.py
> run path/to/file.ts
```

## How?

Define a run.json configuration mapping commands to filename extensions like
so:
```json
{
  ".ts": "npx ts-node $file",
  ".py": "python3 $file"
}
```

Then call `run path/to/some/file.ts` on the command line, and `npx ts-node
file.ts` will run.

## Installation

Install `run` using Nix.

```shell
> nix-env -iA users.wpcarro.run
```