docs(readme): document the remote CLI
- commit
- 2435de32c4cb4fda7e47d3d5eaa815300531a75c
- author
- brice · · 2026-10-10 08:50 UTC
- committer
- brice · · 2026-10-10 09:42 UTC
- parent
- cd1e37d
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +16 -1
M README.md +16 -1
| @@ -25,7 +25,22 @@ ermite serve | |||
| 25 | 25 | | `ERMITE_LOG_LEVEL` | `info` | `trace`, `debug`, `info`, `warn`, `error` | | |
| 26 | 26 | | `ERMITE_LOG_FORMAT` | `json` | `json` or `console` | | |
| 27 | 27 | ||
| 28 | - | `ermite version` prints the version. | |
| 28 | + | `ermite version` prints the version (and the server's when `ERMITE_URL` is set). | |
| 29 | + | ||
| 30 | + | ## Remote CLI | |
| 31 | + | ||
| 32 | + | The same binary drives a running server over its API. It reads `ERMITE_URL` (the server address, `http://` or `https://`) and `ERMITE_TOKEN` (a bearer token; optional for public reads). A token sent over plain `http://` to a host that is not loopback triggers a warning on every call. | |
| 33 | + | ||
| 34 | + | ```sh | |
| 35 | + | export ERMITE_URL=https://git.example.com ERMITE_TOKEN=ermite_... | |
| 36 | + | ermite repo list | show <name> | create <name> [--description …] [--visibility public] | edit <name> [--description …] [--visibility …] [--default-branch …] | delete <name> [--yes] | |
| 37 | + | ermite token create <label> [--preset cli|agent|ci] [--scope repo:read …] [--repo name …] [--expires 30d] # prints the secret once | |
| 38 | + | ermite token list | revoke <id> | |
| 39 | + | ermite version # client and server, warns about missing server features | |
| 40 | + | ermite watch [repo] [--json] # follows events, reconnects and resumes | |
| 41 | + | ``` | |
| 42 | + | ||
| 43 | + | `--json` on `repo list|show|create|edit`, `token create|list` and `version` prints stable field names, listed in each command's `--help`; `watch --json` prints one object per line. Errors are one line on standard error (`ermite: …`) and exit status 1. `ermite completion bash|zsh|fish` prints a shell completion script that completes repository names from the server. | |
| 29 | 44 | ||
| 30 | 45 | ## Git over HTTP | |
| 31 | 46 | ||
| @@ -25,7 +25,22 @@ ermite serve | |||||
| 25 | | `ERMITE_LOG_LEVEL` | `info` | `trace`, `debug`, `info`, `warn`, `error` | | 25 | | `ERMITE_LOG_LEVEL` | `info` | `trace`, `debug`, `info`, `warn`, `error` | | ||
| 26 | | `ERMITE_LOG_FORMAT` | `json` | `json` or `console` | | 26 | | `ERMITE_LOG_FORMAT` | `json` | `json` or `console` | | ||
| 27 | 27 | ||||
| 28 | - | `ermite version` prints the version. | 28 | + | `ermite version` prints the version (and the server's when `ERMITE_URL` is set). |
| 29 | + | ||||
| 30 | + | ## Remote CLI | |||
| 31 | + | ||||
| 32 | + | The same binary drives a running server over its API. It reads `ERMITE_URL` (the server address, `http://` or `https://`) and `ERMITE_TOKEN` (a bearer token; optional for public reads). A token sent over plain `http://` to a host that is not loopback triggers a warning on every call. | |||
| 33 | + | ||||
| 34 | + | ```sh | |||
| 35 | + | export ERMITE_URL=https://git.example.com ERMITE_TOKEN=ermite_... | |||
| 36 | + | ermite repo list | show <name> | create <name> [--description …] [--visibility public] | edit <name> [--description …] [--visibility …] [--default-branch …] | delete <name> [--yes] | |||
| 37 | + | ermite token create <label> [--preset cli|agent|ci] [--scope repo:read …] [--repo name …] [--expires 30d] # prints the secret once | |||
| 38 | + | ermite token list | revoke <id> | |||
| 39 | + | ermite version # client and server, warns about missing server features | |||
| 40 | + | ermite watch [repo] [--json] # follows events, reconnects and resumes | |||
| 41 | + | ``` | |||
| 42 | + | ||||
| 43 | + | `--json` on `repo list|show|create|edit`, `token create|list` and `version` prints stable field names, listed in each command's `--help`; `watch --json` prints one object per line. Errors are one line on standard error (`ermite: …`) and exit status 1. `ermite completion bash|zsh|fish` prints a shell completion script that completes repository names from the server. | |||
| 29 | 44 | ||||
| 30 | ## Git over HTTP | 45 | ## Git over HTTP | ||
| 31 | 46 | ||||