CLI & Integrations · Contents
CLI & Integrations

Developer CLI and Slack integration

Scan from the terminal with the Breaklytix CLI, and route alerts into a Slack channel.

The CLI is for the moment before code is pushed. It runs a local provider detection pass without sending a repository to the server, and it can trigger a server-side scan when you want the full pipeline. It is distributed from source; there is no published npm package yet.

Install

You need Node.js 18 or newer and git. Clone the repository and install the CLI globally:

git clone https://github.com/Hashirattari11/breaklytix.git
cd breaklytix/cli && npm install -g .

The binary is called breaklytix. It works on Linux, macOS and Windows. The configuration is stored in .autofixrc in your home directory and is created with owner-only permissions because it holds a live API key.

Authenticate

  • Create a key in Settings → API Keys. The key is shown once and cannot be retrieved later.
  • Run breaklytix login and paste the key. Input is hidden and the key is validated against the API before it is saved.
  • The CLI keeps the key in .autofixrc; it does not put it in a URL, a log line or a repository file.
  • Point the CLI at a different environment with AUTOFIX_API_URL and AUTOFIX_WEB_URL if you are testing against a local backend.

Commands

  • breaklytix scan — scan the current git repository. The CLI identifies the repository from its git remote and asks the API to run a server-side scan.
  • breaklytix scan --dir ./path — scan a local directory without uploading it. The detection runs on your machine and prints the findings in the terminal.
  • breaklytix watch — re-scan the current directory every 30 seconds. Useful while you are migrating a large surface.
  • breaklytix status — list alerts and fixes returned by the API for your account.
  • breaklytix login — replace or validate the stored API key.

Local scan limits

The local scan walks the directory, skips dependency and build folders such as node_modules, .git, dist, build and .next, and reads supported source and configuration files. It is bounded to 5,000 files of up to 512 KB each and a directory depth of 25. Secret-shaped strings in a matched line are redacted before they are printed.

The local scan is intentionally narrower than the server scanner: it recognises a small set of provider patterns and does not build the full repository usage map. Use it for a quick answer in the terminal; use the dashboard scan when you want findings matched against changelog events, impact analysis and alerts.

Slack integration

Settings → Integrations connects the Breaklytix Slack app to a channel through Slack's OAuth flow. Once connected, breaking-change alerts that match detected usage are mirrored to that channel with the severity, provider, repository, change type and a link to the official source. Slack is notification-only: fixes are approved in the dashboard.

  • Connect from Settings → Integrations and choose the channel in Slack's own authorization screen.
  • The connection belongs to the workspace installation. Removing the bot from the channel or revoking the app stops delivery.
  • Slack delivery is best-effort. If Slack is unavailable, the dashboard alert still exists and the breaking-change email is unaffected.
  • Reconnect if the channel is renamed or the installation is replaced; the stored channel id will no longer resolve.
TipDo not commit .autofixrc. If a key leaks, revoke it in Settings → API Keys and run breaklytix login with a new one. Revocation is immediate.

Is there an npm package for the CLI?

Not yet. The CLI is installed from the project source with npm install -g . after cloning the repository. It requires Node.js 18 or newer.

Does breaklytix scan --dir upload my code?

No. The local scan reads files on your machine and prints the findings. The plain breaklytix scan command asks the API to scan a connected repository server-side.

Where is the API key stored?

In .autofixrc in your home directory, created with owner-only permissions. The CLI sends it as a bearer token to the API and never writes it to a URL or log.

Why did Slack stop receiving alerts?

The bot was likely removed from the channel or the Slack installation was revoked. Reconnect from Settings → Integrations; the dashboard and email alerts are unaffected.

Related articles