# CLI The `ermite` binary also drives a running server over its API. Run `ermite --help` for the details of each command. ## Connect to a server | Setting | Environment | Config file key | |---|---|---| | server address | `ERMITE_URL` | `url` | | token (optional for public reads) | `ERMITE_TOKEN` | `token.cmd`, a command that prints it | The environment wins over the config file. ```sh ermite config set url https://git.example.com ermite config set token.cmd 'pass show ermite/token' ermite config show [--json] # path and values ermite config unset ``` The file holds no secret, only the command that fetches the token (`pass`, `gopass show -o`, `op read`, `secret-tool lookup`, …): ```ini # ~/.config/ermite/config url = https://git.example.com token.cmd = pass show ermite/token ``` Location: `$XDG_CONFIG_HOME/ermite/config`, `~/Library/Application Support/ermite/config` on macOS, `%AppData%\ermite\config` on Windows. `ERMITE_CONFIG` names another file. A token sent over plain `http://` to a non-loopback host prints a warning. ### How `token.cmd` runs - Through `sh -c` (`cmd /C` on Windows), at most once per run, only when a command needs the token. - It gets your terminal when stdin is one, so pinentry or biometric prompts work. - It must print the token alone on one line, under 4 KiB, within 60 seconds. On timeout or interrupt it is killed. - A failure is reported in one line, without the command's output. It does not run: - when `ERMITE_TOKEN` is set; - for `ermite version`, `ermite config` or shell completion; - when `ERMITE_URL` points to another server than the file's `url` (the call is anonymous; set `ERMITE_TOKEN`); - when the file or its directory is writable by other users, or owned by another user (not checked on Windows). ## Commands ```sh ermite repo list | show | create [--description …] [--visibility public] ermite repo edit [--description …] [--visibility …] [--default-branch …] [--merge-modes …] [--failing-checks-block=false] [--allow-auto-merge] [--issues off|owner|public] ermite repo delete [--yes] ermite token create