Installation
Install the Sentrasec CLI on macOS, Linux or Windows and run your first scan from a terminal or a pipeline.
The Sentrasec CLI is a single prebuilt binary with no runtime to install alongside it. The same binary is also the Sentrasec MCP server for coding agents. Install it, set two environment variables, and run security scans from your shell or your CI pipeline. There is no login step.
| Platform | Supported |
|---|---|
| macOS | Apple Silicon (arm64) and Intel (x64) |
| Linux | x64 and arm64. Static binary, runs on any distribution. |
| Windows | x64 and arm64. Windows 10 or later, PowerShell 5.1 or later. |
Install on macOS
Open Terminal and run:
$ curl -fsSL https://cli.sentrasec.ai/install.sh | bashThe installer picks the Apple Silicon or Intel build, checks its SHA-256 checksum, and puts sentrasec in ~/.local/bin. If that directory is not on your PATH yet, add it (zsh is the macOS default shell):
$ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrcInstall on Linux
Run the same command in your shell. It needs curl and bash, and works on Ubuntu, Debian, Fedora, Alpine, Amazon Linux and any other distribution, on x64 or arm64:
$ curl -fsSL https://cli.sentrasec.ai/install.sh | bashThe binary goes in ~/.local/bin. If your shell cannot find it afterwards, add that directory to your PATH (bash shown; use ~/.zshrc for zsh):
$ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrcInstall on Windows
Open PowerShell (not Command Prompt) and run:
$ irm https://cli.sentrasec.ai/install.ps1 | iexThe installer picks the x64 or arm64 build, checks its checksum, installs sentrasec.exe to %LOCALAPPDATA%\Sentrasec\bin and adds that directory to your user PATH. Open a new terminal before running sentrasec, so the new PATH is picked up. No administrator rights are needed.
Verify
On any platform, confirm the binary is available:
$ sentrasec --versionThis prints sentrasec 0.5.1. If the command is not found, the install directory is not on your PATH yet: follow the PATH step for your platform above, or open a new terminal.
Use it as an MCP server
Nothing extra to install: MCP clients start the server with sentrasec mcp serve. Print a ready-to-paste configuration for your client with:
$ sentrasec mcp config --client claude-codeOther clients: --client cursor, --client vscode, --client claude-desktop. Step-by-step setup for each editor is on mcp.sentrasec.ai.
Update or pin a version
Run the install command again to update to the latest release. To install a specific version, set SENTRASEC_VERSION first:
$ curl -fsSL https://cli.sentrasec.ai/install.sh | SENTRASEC_VERSION=0.5.1 bash$ $env:SENTRASEC_VERSION = '0.5.1'; irm https://cli.sentrasec.ai/install.ps1 | iexUninstall
Delete the binary:
$ rm ~/.local/bin/sentrasec$ Remove-Item "$env:LOCALAPPDATA\Sentrasec" -RecurseEnvironment variables
| Variable | Purpose |
|---|---|
SENTRASEC_APP_ID | The app being scanned. Required for scans. |
SENTRASEC_APP_KEY | The key it is scanned with. Required for scans. |
SENTRASEC_API_URL | Override the endpoint for self-hosted deployments. |
The installers also read:
| Variable | Purpose |
|---|---|
SENTRASEC_VERSION | Install a specific version instead of the latest. |
SENTRASEC_INSTALL_DIR | Install directory. Defaults to ~/.local/bin on macOS and Linux, %LOCALAPPDATA%\Sentrasec\bin on Windows. |
On Windows, set them with $env:SENTRASEC_APP_ID = 'app_...' for the current session, or setx SENTRASEC_APP_ID app_... to keep them.
Next steps
Set your app id and app key, then create an app and scan it.
