Docs › Getting started

Getting started

You can go from nothing to a reviewed merge request in about five minutes. You need a GitLab token, credentials for one LLM, and a Linux or macOS machine.

What mrsentry does

mrsentry is a command-line tool that you usually run in GitLab CI. It does two jobs:

Five-minute setup

  1. Install

    On Debian, Ubuntu, Amazon Linux, RHEL or macOS:

    curl -fsSL https://raw.githubusercontent.com/devops-monk/mrsentry/main/install.sh | sh

    The installer brings its own Python 3.12, so the system Python doesn't matter. Other options, including Docker images, are in Installation.

  2. Create a GitLab token

    Use a project or group access token, or a bot user's personal access token, with scopes api and write_repository and the Developer role or higher. The built-in CI_JOB_TOKEN can't post comments or push, so it won't work.

    export GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx

    If your company already keeps the token under a different variable name, point mrsentry at it with gitlab.token_env. See GitLab token.

  3. Give it an LLM

    The default profile is Anthropic's Claude. Any LiteLLM model string works:

    export ANTHROPIC_API_KEY=sk-ant-xxxx
    # or: --model azure/my-deployment, bedrock/…, openai/gpt-4.1, litellm_proxy/…

    Recipes for every provider are in LLM providers.

  4. Check everything
    mrsentry doctor

    This checks tools, GitLab reachability, token identity, scopes and project access, sends a one-word prompt to your LLM, and, if AWS credentials are present, checks your AWS identity and ECR scanning configuration.

  5. Review a merge request
    mrsentry review --mr-url https://gitlab.example.com/group/app/-/merge_requests/42 --dry-run

    --dry-run writes the overview to mrsentry-out/ without touching GitLab. Remove it to post the comments.

Then automate it. Add one include: to your .gitlab-ci.yml and every merge request gets reviewed. Fixes and scheduled fix MRs are optional. See GitLab pipelines.

Where to go next