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.
What to do
-
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.
-
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. -
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.
-
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.
-
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 -
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 forcursor. 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 -
Tell it where the server is, in
settings.jsonor through the settings screen."gitCodeReview.server": "https://your-server/api/v1", "gitCodeReview.reviewOn": "save", "gitCodeReview.changedLinesOnly": true -
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.
-
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.
-
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 -
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 -
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> -
Eclipse runs the same server through LSP4E from the Eclipse Marketplace: Preferences, Language Servers, the same command and the same two variables.
-
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.
-
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
Install the editor plugin on Windows
VS Code, Cursor, IntelliJ and Eclipse, from your own server rather than a marketplace.
ReadExclude one credential everywhere it appears
The same test key committed to nine repositories, set aside once.
ReadStop a rule that is drowning everything else
One rule producing a fifth of your findings is not telling you anything.
Read