Product

Product Features SDLC How to Compare Docs Screenshots

Start here

Getting started Download Questions

More

Security Roadmap About

In your editor

Install the editor plugin on macOS or Linux

Identical to the Windows guide apart from where things land and how Node is installed. Visual Studio Code and Cursor take the same package; the JetBrains IDEs and Eclipse run the language server underneath it. Nothing here needs a marketplace account, and nothing is fetched from the internet except the two generic language server clients that JetBrains and Eclipse need.

The whole install on macOS, which is the same on Linux. Download it as MP4 (0.6 MB)

What to do

  1. Make a token first. On your Git Code Review server open IDE tokens and make one with review and rules both ticked. Copy it when it is shown; only its hash is kept.

  2. On the same server open Editor plugins and download the .vsix. It carries that server's version, so use your own rather than a copy.

  3. Open the editor and press Cmd+Shift+P on a Mac, or Ctrl+Shift+P on Linux. A search box drops down from the top of the window. Anything the editor can do can be found by typing its name in there, and every step below starts by opening it. Its name is the command palette, and this guide calls it the search box from here on.

  4. In that box, type Install from VSIX. Choose Extensions: Install from VSIX from the list underneath, then pick the file you downloaded. This always works and needs nothing set up first. Cursor is the same editor underneath and takes the same file.

  5. Only if you would rather use a terminal: the same thing as one command.

    code --install-extension ~/Downloads/git-code-review-1.0.1.vsix
    cursor --install-extension ~/Downloads/git-code-review-1.0.1.vsix
  6. If that says command not found: code, nothing is wrong. On macOS the editor does not put that command on your PATH until you ask it to: open the search box and run Shell Command: Install 'code' command in PATH, then open a new terminal. Cursor has the same entry for cursor. On Linux the packaged builds add it and an AppImage does not. Or skip the terminal entirely, because the step above does the same job, or call the binary where it actually lives.

    # macOS
    "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" \
      --install-extension ~/Downloads/git-code-review-1.0.1.vsix
    
    # Linux, packaged builds
    /usr/share/code/bin/code --install-extension ~/Downloads/git-code-review-1.0.1.vsix
    /snap/bin/code    --install-extension ~/Downloads/git-code-review-1.0.1.vsix
  7. Tell it where the server is, in settings.json or through the settings screen.

    "gitCodeReview.server": "https://your-server/api/v1",
    "gitCodeReview.reviewOn": "save",
    "gitCodeReview.changedLinesOnly": true
  8. Open the search box again and run Git Code Review: Set the token, then paste the token in. It goes into the editor's own secret storage rather than into a settings file, which is the file that ends up in backups and sometimes in a repository.

  9. Search box again, then Git Code Review: Check the connection. It answers in a message at the bottom right, and names what is wrong when something is.

  10. For the JetBrains IDEs or Eclipse, install Node first. Any recent version does.

    brew install node          # macOS
    sudo apt install nodejs    # Debian and Ubuntu
    sudo dnf install nodejs    # Fedora and RHEL
  11. Download the language server from the Editor plugins page and unpack it somewhere permanent.

    mkdir -p ~/.local/share && \
      unzip ~/Downloads/git-code-review-lsp-1.0.1.zip -d ~/.local/share
  12. In a JetBrains IDE install LSP4IJ from the marketplace, then Settings, Languages & Frameworks, Language Servers, and add a user defined server.

    Name:     Git Code Review
    Command:  node ~/.local/share/git-code-review-lsp/server/main.js
    Env:      GCR_SERVER=https://your-server/api/v1
              GCR_TOKEN=<your token>
  13. Eclipse runs the same server through LSP4E from the Eclipse Marketplace: Preferences, Language Servers, the same command and the same two variables.

  14. Anything else that speaks the protocol, Neovim and Helix and Sublime Text included, runs that same command. The README inside the package lists every variable it reads.

  15. Open a file and save it. Findings arrive on the lines you changed, with the triage's own reason on each one.

A tip

Nothing in either package has a dependency to install. That is deliberate: a security product whose editor plugin pulls three hundred packages off a registry is arguing against its own report.

Other guides