Installation
mrsentry is a Python 3.11+ command-line tool. The installer provisions its own Python, so it works the same on every distro your runners use.
Choose a method
| Method | Command | Best for |
|---|---|---|
| Installer | curl -fsSL https://raw.githubusercontent.com/devops-monk/mrsentry/main/install.sh | sh | Runners, VMs, laptops |
| uv | uv tool install git+https://github.com/devops-monk/mrsentry.git | Developers who already use uv |
| pipx | pipx install git+https://github.com/devops-monk/mrsentry.git | Developers who already use pipx |
Docker, slim | docker build -f docker/Dockerfile --target slim -t mrsentry:slim . | Review and scan jobs |
Docker, full | docker build -f docker/Dockerfile --target full -t mrsentry:full . | Fix jobs that need build toolchains |
The installer
The installer:
- Installs
git,curlandtarif they're missing (apt, dnf, yum or apk). - Installs uv, which provides an isolated, managed Python.
- Optionally verifies a checksum.
- Installs mrsentry as an isolated tool and links the
mrsentrycommand.
Run as root, it installs to /usr/local/bin. Otherwise it installs to ~/.local/bin.
| Variable | Default | Meaning |
|---|---|---|
MRSENTRY_VERSION | main | Git ref to install, such as a tag like v0.1.0. |
MRSENTRY_SOURCE | GitHub at $MRSENTRY_VERSION | Any pip requirement, wheel URL/path or source directory, e.g. mrsentry==0.1.0 from your internal index. |
MRSENTRY_INDEX_URL | — | Extra package index: Nexus, Artifactory or the GitLab PyPI registry. |
MRSENTRY_SHA256 | — | Expected checksum of a wheel source, verified before install. |
MRSENTRY_EXTRAS | — | Optional extras. treesitter enables precise, syntax-aware extraction of the code around each change. |
MRSENTRY_PYTHON | 3.12 | Python version uv provisions. |
MRSENTRY_INSTALL_DIR | /usr/local/bin or ~/.local/bin | Where the command is linked. |
# pin a version and install from an internal index
curl -fsSL https://raw.githubusercontent.com/devops-monk/mrsentry/main/install.sh \
| MRSENTRY_SOURCE="mrsentry==0.1.0" MRSENTRY_INDEX_URL=https://nexus.example.com/repository/pypi/simple sh
Distribution notes
| Distro | System Python | Notes |
|---|---|---|
| Debian 12 / Ubuntu 22.04, 24.04 | 3.11 / 3.10, 3.12 | Works out of the box. |
| Amazon Linux 2023 | 3.9 | Works out of the box. uv provides Python 3.12. |
| Amazon Linux 2 | 3.7 | glibc 2.26 is detected automatically, and the installer picks dependency versions that ship prebuilt binaries, so you don't need a Rust or C compiler. |
| RHEL / Rocky / Alma 8+ | 3.6–3.11 | Works out of the box. |
The project's own CI runs an install smoke test on debian:12, ubuntu:24.04, amazonlinux:2023 and amazonlinux:2 for every change.
Docker images
Build the images once, push them to your registry, and use them as the job image:
| Target | Contents | Use for |
|---|---|---|
slim | Python 3.12, mrsentry, git, ripgrep | Review, scan, ecr status |
full | slim plus JDK 17, Maven 3.9, Gradle 8, Node 20 with npm/pnpm/yarn, Poetry, uv and Trivy | Fix jobs: lockfile regeneration, dependency trees, builds, local scans |
docker build -f docker/Dockerfile --target full -t registry.example.com/platform/mrsentry:full .
docker push registry.example.com/platform/mrsentry:full
The project CI builds both images with Kaniko on every commit and tags releases, so you can mirror them instead of building locally.
Which tools does it need?
Reviews only need git. ripgrep makes the grep tool faster but is optional. Fixing needs the toolchain for each ecosystem you fix:
- Maven / Gradle:
mvnorgradle(or the wrappers), for dependency trees and verification. - npm / pnpm / yarn: the matching package manager, to regenerate lockfiles.
- Poetry / uv: to re-lock. pip requirements only need Python.
- Trivy or Grype: only for the local fallback scan when ECR data is stale.
mrsentry doctor lists which tools it found.
Verify the install
mrsentry version
mrsentry doctor --offline # local checks only
mrsentry doctor # + GitLab, LLM and AWS checks
Upgrade or uninstall
# upgrade: re-run the installer (optionally with MRSENTRY_VERSION=vX.Y.Z)
curl -fsSL https://raw.githubusercontent.com/devops-monk/mrsentry/main/install.sh | sh
# uninstall
uv tool uninstall mrsentry