Installation

Install DeepSource CLI to interact with DeepSource from your terminal.

DeepSource CLI helps you access and interact with DeepSource from your terminal. This guide walks you through installation, verification, and authentication.

Supported platforms

Operating SystemArchitectures
Linuxamd64, arm64
macOS (Darwin)amd64, arm64
Windowsamd64

Install the CLI

To install CLI as a binary, run:

curl -fsSL https://cli.deepsource.com/install | sh

This script detects the operating system and architecture and installs the deepsource binary. By default, the binary is placed in ~/.local/bin for non-root users or /usr/local/bin for root. You can override the install location using the BINDIR environment variable.

For example, to install the CLI to ./bin in the current directory:

curl -fsSL https://cli.deepsource.com/install | BINDIR=./bin sh

If you've used https://deepsource.io/cli before, it still works, but we recommend updating your scripts to use the new URL.

Run this in PowerShell to download and install the latest CLI binary:

$manifest = Invoke-RestMethod "https://cli.deepsource.com/manifest.json"
$archive = $manifest.platforms.windows_amd64.archive
$url = "https://cli.deepsource.com/build/$archive"
$tmp = Join-Path $env:TEMP "deepsource.zip"
Invoke-WebRequest -Uri $url -OutFile $tmp
Expand-Archive -Path $tmp -DestinationPath "$env:LOCALAPPDATA\deepsource" -Force
Remove-Item $tmp

After installing, add %LOCALAPPDATA%\deepsource to your system PATH. Without this, the deepsource command won't be available in new terminal sessions.

Verify the installation

Confirm the CLI is installed and accessible:

deepsource --version

You should see the version number.

Authenticate

The quickest way to authenticate is with browser-based login:

deepsource auth login

This opens a browser window where you authenticate with your DeepSource account. Once complete, the CLI stores your credentials locally.

For reporting code coverage in CI environments, you don't need to authenticate interactively. Instead, use the DEEPSOURCE_DSN environment variable or OIDC-based authentication (GitHub Actions only). See the report command for details.

Shell completions

Enable tab completions for the deepsource command in your shell:

deepsource completion

The install script automatically sets up shell completions. You only need to run this manually if you installed the binary without the install script or if completions weren't set up automatically.

Next steps

On this page