From 7b309af6af45e5f9f798ff95d6f6e5b18c39609b Mon Sep 17 00:00:00 2001 From: Amolith Date: Sun, 9 Nov 2025 18:17:16 -0700 Subject: [PATCH] docs(installation): add bin method --- README.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b45aeb7a837cb87667401bc3dde836f69aedeed0..17c8840652ccf8ea32c50807b68d84236f2f29ef 100644 --- a/README.md +++ b/README.md @@ -39,16 +39,26 @@ the best more-open options and [Amp](https://ampcode.com/) as the overall best option if you don't mind completely proprietary and paying for 100% of your API usage. -You may install `formatted-commit` manually using the following command. You may -also skip this and just add the prompt snippet; it tells the model about the -command so it can try to run it on its own or ask you to run it. - -```bash -go install git.secluded.site/formatted-commit@latest -``` - -Check for upgrades with `formatted-commit upgrade`, then apply with -`formatted-commit upgrade -a`. +You need both the binary and the prompt. If you don't have the binary +when the model tries to use it, it's instructed to ask you to install +it using the appropriate command. + +### The binary + +- Using [bin](https://github.com/marcosnils/bin) (highly recommended + because it's one tool to manage and update myriad CLI tools + distributed as statically-linked binaries, like _formatted-commit_) + ```bash + bin install goinstall://git.secluded.site/formatted-commit@latest + ``` +- Using the [go toolchain](https://go.dev/dl) (requires tracking updates + manually, though you can check with `formatted-commit upgrade` and + apply with `formatted-commit upgrade -a`) + ```bash + go install git.secluded.site/formatted-commit@latest + ``` + +### The prompt Copy/paste this into wherever you tell your models how to write commits. For Crush, that might be `~/.config/crush/CRUSH.md` or `./CRUSH.md` in a repo. For @@ -56,6 +66,39 @@ Crush, that might be `~/.config/crush/CRUSH.md` or `./CRUSH.md` in a repo. For `~/.config/AGENTS.md`. Look up where your tool checks for rules files and put this in a section like `## Creating git commits` or something. +
+Using bin + +```markdown +Create/amend commits exclusively using `formatted-commit`. Try to use it normally, but if it's not in my PATH, ask me to `bin install goinstall://git.secluded.site/formatted-commit@latest`. It has no sub-commands and the following options: + +-t --type Commit type (required) +-s --scope Commit scope (optional) +-B --breaking Mark as breaking change (optional) +-m --message Commit message (required) +-b --body Commit body (optional) +-T --trailer Trailer in 'Sentence-case-key: value' format (optional, repeatable) +-a --add Stage all modified files before committing (optional) +--amend Amend the previous commit (optional) +-h --help + + +formatted-commit -t feat -s "web/git-bug" -m "do a fancy new thing" -T "Assisted-by: GLM 4.6 via Crush" -b "$(cat <<'EOF' +Multi-line + +- Body +- Here + +EOF +)" + +``` + +
+ +
+Using go install + ```markdown Create/amend commits exclusively using `formatted-commit`. Try to use it normally, but if it's not in my PATH, ask me to `go install git.secluded.site/formatted-commit@latest`. It has no sub-commands and the following options: @@ -81,6 +124,8 @@ EOF ``` +
+ ## Contributions Patch requests are in [amolith/llm-projects] on [pr.pico.sh]. You don't need a