aboutsummaryrefslogtreecommitdiffstats
authorJesse Armand <jesse@jessearmand.com>2026-09-22 17:17:15 +0800
committerJesse Armand <jesse@jessearmand.com>2026-09-22 17:17:15 +0800
commit31e93204d8869ec0ac6a4a976d7fa9ca052495f1 (patch)
tree6738c2d886696502c80bac9686ebc2afebb1481f
parente97196e0ea068beb6a3ba593d1cf13b8dc8d2f3e (diff)
downloaddgit-31e93204d8.tar.gz zip
docs(readme): document dgit-repo
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat
README.md+37-0
1 file changed, 37 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md
@@ -143,6 +143,43 @@
ingest; by default objects are hashed with native SHA-1 — the same
object ids, without the check.
+### dgit-repo
+
+[`scripts/dgit-repo`](scripts/dgit-repo) wraps the same endpoints in a
+command-line tool. It also closes the one gap in the stock workflow: a
+first push creates a public repository, which stays readable until you
+send a `config` request. `create` avoids that. It registers the name as
+private before anything is pushed, so the repository is never readable
+without the token.
+
+```sh
+dgit-repo create myrepo -d "..." -s tools # private unless --public
+git remote add origin https://<host>/myrepo.git
+git push -u origin main
+
+dgit-repo config myrepo --public # or --private, -d, -s, -o
+dgit-repo show myrepo # description, owner, section, private
+dgit-repo gc myrepo
+dgit-repo delete myrepo # asks you to type the name; --yes skips
+dgit-repo list # the public index
+```
+
+`create` refuses a name that already exists, so it cannot make a public
+repository private by accident. `config` refuses a name that does not
+exist, so a typo cannot create a repository.
+
+The host comes from `$DGIT_HOST`, or from `git config --global
+dgit.host <host>` if that variable is not set. Credentials come from
+`git credential fill` for `https://<host>`, so the tool uses whatever
+credential helper git uses
+to push. It passes the token to curl on stdin, so the token never shows
+up in the process list. It needs `bash`, `curl`, `jq`, and `git`.
+Symlink it onto your `PATH` to use it from anywhere:
+
+```sh
+ln -s "$PWD/scripts/dgit-repo" ~/.local/bin/dgit-repo
+```
+
## Contributions
Pull requests are disabled. Send a `git format-patch` attachment to [me@littledivy.com](mailto:me@littledivy.com).