Skip to main content
The squasher CLI calls the same operations as the REST API from a terminal. Scripts and coding agents use it for repeatable, auditable work. Run squasher <command> --help for every flag.

Get the CLI

The CLI has no public install package yet. There is no npm, Homebrew, or crates.io package and no download. squasher update cannot download a new binary; it prints the command that rebuilds the CLI from source. The installer at squasher.ai/install.sh installs agent skills and the MCP server, not the CLI. Today, use the MCP server or the REST API for the same tasks.
The rest of this page is for teams that already have the squasher binary.

Sign in

squasher login opens your browser and waits on a local callback. squasher login --device-code prints a URL and a code to approve on any device. See CLI sign-in and integrations for storage and profiles.

Set the project

Most project commands need a project ID. The CLI takes it from the first of these that is set:
  1. The --project <id> flag.
  2. The SQUASHER_PROJECT_ID environment variable.
  3. The active project of the profile, set with squasher projects use <id>.
projects setup shows whether the project has an ingest key and an event from the last 24 hours. It never prints a key or an event payload.

Global options

Run common tasks

Add --json to any of these for output that a script can parse.

Commands

Run squasher <command> --help to see the subcommands and flags of each command.

Sign-in and setup

Observe

Respond

Manage

Upload and test source maps

squasher sourcemaps upload sends the source maps of a release. Give it .map files, bundle files, or a build directory.
  • A .map file uploads under its file name.
  • A .js, .mjs, or .cjs file uploads the map that its //# sourceMappingURL= comment names. The map uploads as <bundle file name>.map, so that Squasher can find it from a stack frame. The command prints the map that it used for each bundle.
  • A directory uploads the map of each bundle in it, and each other .map file in it.
squasher sourcemaps symbolicate resolves minified stack frames with the uploaded maps. Use it to make sure that the maps work before an error occurs.
Each frame is url:line:col. With --stack-file, the command reads the frames from a stack trace (at fn (url:line:col) lines). The output shows one line for each frame: the original function and location, or unchanged and the reason. Use --debug-id when the bundle has a debug ID, and --context-lines to get lines of original source with --json.

Set grouping rules

Grouping rules decide which issue a new error event joins. Squasher applies the first enabled rule that matches. Issues that already exist keep their events.
The conditions are --exception-type, --message-regex, --service, --frame-path, and --tag key=value. An event must match all the conditions that a rule sets. Use --position to set the order. Before you save a rule, try it on recent events. preview writes nothing:
The rules file is a JSON array of rules in the API shape. Without --rules-file, the preview uses the saved rules. The output shows how many events would join a different issue and the largest groups. See Issues and error grouping.

Set ingest rules

Ingest rules drop or sample logs, spans, and metric points before Squasher stores them. Dropped data is not billed. Squasher applies the first enabled rule that matches. A change applies within about 60 seconds.
The conditions are --service, --severity (logs, repeatable), --span-name (traces), --metric-name (metrics, a prefix when it ends with *), --attr key=value, and --attr-regex key~pattern. Error spans and error logs are kept unless you add --include-errors true. preview writes nothing: it shows the matched volume over 7 days and the monthly saving. See Ingest rules.

Send feedback to Squasher

squasher feedback sends a bug report, an idea, or a docs problem to the Squasher team. It does not go to your project.
With no message, the command reads the message from standard input. It prints Receipt: <id>, or the full response with --json. When you are signed in, the command uses POST /v1/feedback, which records your organization and project. When you are not signed in, or with --anonymous, it uses the anonymous Feedback.now endpoints. If your key can only send telemetry (events:ingest), the command sends the report anonymously and prints a note. The protocol commands are under squasher feedback now: discovery, policy, observe, submit, attach, and receipt. See Feedback API.

Next steps

CLI sign-in and integrations

Store credentials and switch between profiles.

Connect the MCP server

Run the same operations from an AI assistant.