From 2d2e51db94f7b10b9e5e287ed2d7a93d730cd00c Mon Sep 17 00:00:00 2001 From: afterlifepro Date: Sun, 7 Sep 2025 12:45:48 +0100 Subject: [PATCH] Update readme --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 126e964..20248f6 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,51 @@ $ tangled-on-commit @vielle.dev/tangled-on-commit ./commit.sh ## Installation -// TODO +Prerequisites: + +- `Git` +- `Rust` (1.88+) +- `Cargo` + +1. Clone this repo: + `git clone git@tangled.sh:vielle.dev/tangled-on-commit` +2. Compile the binary: + `cargo build --release` +3. Copy the binary to your path: + `sudo cp ./target/release/tangled-on-commit /bin` ## Usage -// TODO +### CLI Arguments + +- `tangled-on-commit (-h | --help)` + Displays this message + +- `tangled-on-commit` + No specified handle, repo, or command. Falls back to config/env + +- `tangled-on-commit SHELL` + Uses config/env for handle and repo + +- `tangled-on-commit @HANDLE SHELL` + Uses config/env for repo + +- `tangled-on-commit REPO SHELL` + Uses config/env for handle + +- `tangled-on-commit @HANDLE/REPO SHELL` + `tangled-on-commit HANDLE REPO SHELL` + No config/env + +### JSON + +Loads the file `tangled-on-commit.json` from cwd if it exists. +Reads keys \"handle\", \"repo_name\", and \"shell\". +Unknown keys are ignored and any key can be ommitted +JSON is used if the arguments aren't passed to the CLI -## Configuration +### Env -// TODO +Loads the environment variables `TANGLED_ON_COMMIT_HANDLE` and `TANGLED_ON_COMMIT_REPO_NAME` +Shell cannot be set by environment variables. +Env variables are used if relevant keys are ommitted an arguments aren't passed to the CLI. -- 2.51.2