about summary refs log tree commit diff
path: root/users/wpcarro/tools/run/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'users/wpcarro/tools/run/README.md')
-rw-r--r--users/wpcarro/tools/run/README.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/users/wpcarro/tools/run/README.md b/users/wpcarro/tools/run/README.md
new file mode 100644
index 000000000000..fd24495035ba
--- /dev/null
+++ b/users/wpcarro/tools/run/README.md
@@ -0,0 +1,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
+```