3.7 KiB
Installation
Sherlock installs from a clone of this repo with a single Go command.
Quick start
git clone https://gitea.alexandru.macocian.me/amacocian/sherlock.git
cd sherlock
go run ./setup
(./install.sh is kept as a thin convenience wrapper that just runs
go run ./setup with the same flags.)
The installer:
- Syncs the source. Clones (or updates) the sherlock repo under
${XDG_CACHE_HOME:-~/.cache}/sherlock/srcand checks out the latest release tag, so the install is reproducible and shares one checkout withsherlock update. (Use--localto build from the checkout you ran it from instead — handy for development.) - Seeds the config. Copies
config.example.tomlto your config path (~/.config/sherlock/config.tomlby default) — but only if you don't already have one, so re-runs never clobber filled-in values. - Opens it in your editor (
$VISUAL/$EDITOR, falling back tonano/vi) so you can fill in the Authentik issuer/client IDs and each service's base URL. See configuration.md for the schema. - Builds and installs
sherlockand every MCP binary (gitea-mcp,grafana-mcp,gssh-mcp) withgo install ./cmd/..., baking in the release version. - Installs shell completions where it can — currently a
fishcompletion into~/.config/fish/completions/sherlock.fish, but only if you already have a fish config directory (it won't create one for non-fish users).
The exact same code runs on sherlock update — there is one installer,
in internal/installer, with two entry points (go run ./setup for the
bootstrap and sherlock update for self-update).
Then:
sherlock copilot
Requirements
- The Go toolchain on
PATH(the installer builds from source). - git on
PATH(to clone the source; not needed with--local). - An OS keyring / Secret Service provider (the wallet lives there; see storage.md).
- The install dir (
go env GOBIN, else$(go env GOPATH)/bin) on yourPATH— this is standard Go setup. The installer notes the dir if it isn't already onPATH, but adding it is the usual one-time Go step (e.g.fish_add_path -U ~/go/binon fish, or anexport PATHline in~/.bashrc/~/.zshrc).
Flags
Pass to go run ./setup (or ./install.sh):
| Flag | Effect |
|---|---|
-y, --yes |
Skip the editor step (config is already filled in). |
--config-only |
Seed/edit the config but don't build or install. |
--local |
Build from the current checkout instead of cloning to the cache (development). |
-h, --help |
Show usage. |
Env overrides
| Variable | Effect |
|---|---|
SHERLOCK_CONFIG |
Exact config path to write (else $XDG_CONFIG_HOME / ~/.config). |
SHERLOCK_UPDATE_REPO_URL |
Clone URL to build from (else the public sherlock repo). |
VISUAL / EDITOR |
Editor to open. |
Updating
Sherlock updates itself in place (running the same installer):
sherlock update # if a newer release exists
sherlock update --force # reinstall the latest regardless
Release builds also print a one-line hint when a newer version is available. See versioning.md.
Re-running
go run ./setup (or ./install.sh) is safe to re-run: it edits your
existing config in place (never overwriting it) and re-installs the
binaries. Use -y to skip the editor when you only want to rebuild, or
--config-only to tweak the config without reinstalling.
To point sherlock at a different deployment, edit the values in your
config.toml — there are no compiled-in defaults, so nothing is baked
into the binaries. See configuration.md.