chore: Add more detail to the README's installation instructions. (#30)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 71fc76a..4531988 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -6,7 +6,6 @@
- id: keep-sorted
name: keep-sorted
language: golang
- # Remember to also update language_version in .pre-commit-hooks.yaml!
language_version: 1.21.6
entry: go run .
- repo: https://github.com/pre-commit/pre-commit
diff --git a/README.md b/README.md
index 96bb9f7..508a2ca 100644
--- a/README.md
+++ b/README.md
@@ -109,15 +109,28 @@
### Sorting your file
-```sh
-$ keep-sorted [file1] [file2] ...
-```
+1. Install go: https://go.dev/doc/install
-If the file is `-`, the tool will read from stdin and write to stdout.
+> [!NOTE]
+> keep-sorted currently requires at least go 1.21.
+
+2. Install keep-sorted:
+
+ ```sh
+ $ go install github.com/google/keep-sorted@v0.4.0
+ ```
+
+3. Run keep-sorted:
+
+ ```sh
+ $ keep-sorted [file1] [file2] ...
+ ```
+
+ If the file is `-`, the tool will read from stdin and write to stdout.
#### pre-commit
-You can automatically run keep-sorted by adding this repository to your
+You can run keep-sorted automatically by adding this repository to your
[pre-commit](https://pre-commit.com/).
```yaml
diff --git a/go.mod b/go.mod
index 16f3d94..86fbe55 100644
--- a/go.mod
+++ b/go.mod
@@ -1,5 +1,7 @@
module github.com/google/keep-sorted
+// Remember to also update language_version in .pre-commit-config.yaml,
+// .pre-commit-hooks.yaml, and README.md!
go 1.21
require (