Files
sherlock/docs/installation.md
T
amacocian 53b0d025f5
Release / release (push) Successful in 24s
Shared infra for installer
2026-06-13 14:25:40 +02:00

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:

  1. Syncs the source. Clones (or updates) the sherlock repo under ${XDG_CACHE_HOME:-~/.cache}/sherlock/src and checks out the latest release tag, so the install is reproducible and shares one checkout with sherlock update. (Use --local to build from the checkout you ran it from instead — handy for development.)
  2. Seeds the config. Copies config.example.toml to your config path (~/.config/sherlock/config.toml by default) — but only if you don't already have one, so re-runs never clobber filled-in values.
  3. Opens it in your editor ($VISUAL / $EDITOR, falling back to nano/vi) so you can fill in the Authentik issuer/client IDs and each service's base URL. See configuration.md for the schema.
  4. Builds and installs sherlock and every MCP binary (gitea-mcp, grafana-mcp, gssh-mcp) with go install ./cmd/..., baking in the release version.
  5. Installs shell completions where it can — currently a fish completion 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 your PATH — this is standard Go setup. The installer notes the dir if it isn't already on PATH, but adding it is the usual one-time Go step (e.g. fish_add_path -U ~/go/bin on fish, or an export PATH line 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.