this repo has no description
1# `tangled-on-commit`
2
3Run a shell command whenever a specific repo gets a commit
4
5```sh
6$ tangled-on-commit @vielle.dev/tangled-on-commit ./commit.sh
7```
8
9## Installation
10
11Prerequisites:
12
13- `Git`
14- `Rust` (1.88+)
15- `Cargo`
16
171. Clone this repo:
18 `git clone git@tangled.sh:vielle.dev/tangled-on-commit`
192. Compile the binary:
20 `cargo build --release`
213. Copy the binary to your path:
22 `sudo cp ./target/release/tangled-on-commit /bin`
23
24## Usage
25
26### CLI Arguments
27
28- `tangled-on-commit (-h | --help)`
29 Displays this message
30
31- `tangled-on-commit`
32 No specified handle, repo, or command. Falls back to config/env
33
34- `tangled-on-commit SHELL`
35 Uses config/env for handle and repo
36
37- `tangled-on-commit @HANDLE SHELL`
38 Uses config/env for repo
39
40- `tangled-on-commit REPO SHELL`
41 Uses config/env for handle
42
43- `tangled-on-commit @HANDLE/REPO SHELL`
44 `tangled-on-commit HANDLE REPO SHELL`
45 No config/env
46
47### JSON
48
49Loads the file `tangled-on-commit.json` from cwd if it exists.
50Reads keys \"handle\", \"repo_name\", and \"shell\".
51Unknown keys are ignored and any key can be ommitted
52JSON is used if the arguments aren't passed to the CLI
53
54### Env
55
56Loads the environment variables `TANGLED_ON_COMMIT_HANDLE` and `TANGLED_ON_COMMIT_REPO_NAME`
57Shell cannot be set by environment variables.
58Env variables are used if relevant keys are ommitted an arguments aren't passed to the CLI.