scrutiny

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: MIT

README

Scrutiny

A local tool for reviewing GitHub pull requests: split and unified diffs, tree-sitter highlighting, go-to-definition and find usages through Language Servers, and the full GitHub review workflow, served as a webpage from your own machine. Me and claude threw this together as fast as possible as I was sick of fighting with GitHub.

Install

Requires Go, git, a C compiler (tree-sitter uses cgo) and an authenticated gh CLI.

go install github.com/Coombszy/scrutiny/cmd/scrutiny@latest

This puts scrutiny in $(go env GOPATH)/bin (or $GOBIN), which needs to be on your $PATH. Use @v0.1.0 in place of @latest to install a specific release.

To update to a new release, run the same command again: @latest resolves to the newest tagged release and replaces the installed binary. The version you're running is shown faintly in the top bar.

To build from a checkout instead (needs just):

just build   # builds ./bin/scrutiny

Use

just run         # build and serve in one step
scrutiny serve   # or run an installed binary (-port N to change the port)

Then open http://localhost:7878 and paste a PR URL on the Dashboard.

To jump from GitHub to Scrutiny, install userscript/scrutiny.user.js in Tampermonkey (or Violentmonkey). While Scrutiny is running, every pull request page on github.com gets a Goto Scrutiny button that opens the PR in Scrutiny in a new tab. If you serve on a port other than 7878, set it from the script's Set Scrutiny port menu command.

Code navigation needs a Language Server: install one from Language Servers on the Settings page (the cog in the top bar), or have it on $PATH (e.g. gopls).

Settings live in $XDG_CONFIG_HOME/scrutiny/config.toml and changes made in the UI are written back to it. Themes, hotkeys and the diff collapse threshold can all be changed from Settings.

Develop

just test      # run the tests (Language Server tests need gopls on $PATH or $SCRUTINY_GOPLS)
just run-live  # live reload on :7878
just run-fake  # the UI over in-memory fakes with a demo PR, no GitHub needed

Any just command enables the pre-commit hook in .githooks, which blocks a commit if TruffleHog finds a secret in the staged changes or the git history (so it needs trufflehog installed).

AGENTS.md covers the architecture and GLOSSARY.md the vocabulary.

Licence

MIT

Directories

Path Synopsis
cmd
fakeserve command
Command fakeserve serves the Scrutiny UI over in-memory fakes, with a demo pull request, for trying the UI in a browser without touching GitHub.
Command fakeserve serves the Scrutiny UI over in-memory fakes, with a demo pull request, for trying the UI in a browser without touching GitHub.
scrutiny command
Command scrutiny serves a local GitHub pull request review UI.
Command scrutiny serves a local GitHub pull request review UI.
internal
cache
Package cache is the Cache port: a disposable local store for upstream responses and derived data.
Package cache is the Cache port: a disposable local store for upstream responses and derived data.
cache/sqlite
Package sqlite is the Cache adapter backed by a sqlite file, normally $XDG_STATE_HOME/scrutiny/cache.db.
Package sqlite is the Cache adapter backed by a sqlite file, normally $XDG_STATE_HOME/scrutiny/cache.db.
codehost
Package codehost is the CodeHost port: Pull Requests and review state on the code host, which is the source of truth for review state.
Package codehost is the CodeHost port: Pull Requests and review state on the code host, which is the source of truth for review state.
codehost/github
Package github is the CodeHost adapter for github.com: REST reads with ETag conditional requests cached in the Cache port, and GraphQL for review state and writes.
Package github is the CodeHost adapter for github.com: REST reads with ETag conditional requests cached in the Cache port, and GraphQL for review state and writes.
domain
Package domain holds the core types shared by every layer.
Package domain holds the core types shared by every layer.
highlight
Package highlight is the Highlighter port: source code to highlighted tokens.
Package highlight is the Highlighter port: source code to highlighted tokens.
highlight/treesitter
Package treesitter is the Highlighter adapter backed by tree-sitter grammars and their highlights.scm queries.
Package treesitter is the Highlighter adapter backed by tree-sitter grammars and their highlights.scm queries.
highlight/treesitter/markdown
Package markdown is a cgo binding for the tree-sitter Markdown block grammar (tree-sitter-grammars/tree-sitter-markdown v0.5.3, MIT licensed; see LICENSE), vendored because the upstream module ships no Go binding.
Package markdown is a cgo binding for the tree-sitter Markdown block grammar (tree-sitter-grammars/tree-sitter-markdown v0.5.3, MIT licensed; see LICENSE), vendored because the upstream module ships no Go binding.
installer
Package installer is the ServerInstaller port: listing, installing and removing Language Servers, and detecting the runtimes they need.
Package installer is the ServerInstaller port: listing, installing and removing Language Servers, and detecting the runtimes they need.
installer/mason
Package mason is the ServerInstaller adapter for the Mason registry (mason-org/mason-registry).
Package mason is the ServerInstaller adapter for the Mason registry (mason-org/mason-registry).
live
Package live pushes PR changes to connected browsers.
Package live pushes PR changes to connected browsers.
metrics
Package metrics counts what Scrutiny does, such as GitHub requests and their failures, per minute, keeping a week of history in a Store.
Package metrics counts what Scrutiny does, such as GitHub requests and their failures, per minute, keeping a week of history in a Store.
navigator
Package navigator is the CodeNavigator port: definitions, usages and symbols for code in a worktree, and whether that is still being indexed.
Package navigator is the CodeNavigator port: definitions, usages and symbols for code in a worktree, and whether that is still being indexed.
navigator/lsp
Package lsp is the CodeNavigator adapter backed by Language Servers speaking LSP over stdio: one server per Workspace, started on first use and stopped once idle.
Package lsp is the CodeNavigator adapter backed by Language Servers speaking LSP over stdio: one server per Workspace, started on first use and stopped once idle.
release
Package release is the port for finding Scrutiny's latest release tag, and the Checker that looks for a New Version in the background.
Package release is the port for finding Scrutiny's latest release tag, and the Checker that looks for a New Version in the background.
release/goproxy
Package goproxy finds a module's latest release from a Go module proxy (https://go.dev/ref/mod#goproxy-protocol), as `go install …@latest` would.
Package goproxy finds a module's latest release from a Go module proxy (https://go.dev/ref/mod#goproxy-protocol), as `go install …@latest` would.
repostore
Package repostore is the RepoStore port: local git data for repositories.
Package repostore is the RepoStore port: local git data for repositories.
repostore/gitcli
Package gitcli is the RepoStore adapter that shells out to the git binary, keeping one bare clone per repository.
Package gitcli is the RepoStore adapter that shells out to the git binary, keeping one bare clone per repository.
review
Package review holds the application services for reviewing a Pull Request, composed from the ports.
Package review holds the application services for reviewing a Pull Request, composed from the ports.
servers
Package servers manages Language Servers for code navigation: which one launches for a language, and installing or removing them in the background.
Package servers manages Language Servers for code navigation: which one launches for a language, and installing or removing them in the background.
settings
Package settings is the Settings port: user settings whose source of truth is the config file.
Package settings is the Settings port: user settings whose source of truth is the config file.
settings/tomlfile
Package tomlfile is the Settings adapter backed by a TOML file, normally $XDG_CONFIG_HOME/scrutiny/config.toml.
Package tomlfile is the Settings adapter backed by a TOML file, normally $XDG_CONFIG_HOME/scrutiny/config.toml.
theme
Package theme loads Themes: named colours for the interface and for syntax highlighting.
Package theme loads Themes: named colours for the interface and for syntax highlighting.
web
Package web is the driving HTTP adapter: it serves the Templ + htmx UI.
Package web is the driving HTTP adapter: it serves the Templ + htmx UI.
web/views
Package views holds the Templ components for the UI.
Package views holds the Templ components for the UI.
xdg
Package xdg resolves Scrutiny's XDG base directories.
Package xdg resolves Scrutiny's XDG base directories.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL