@interfere/cli uploads your source maps and registers each deploy as a release, so production stack traces point back to your real code instead of minified output. You run it as a step in your build or CI.INTERFERE_API_KEY, the interfere_secret_<region>_… build credential) from Surfaces. It's a server-side secret, so keep it in CI and never in client code.1npm install -D @interfere/cli
.js.map files:1interfere sourcemaps upload ./dist
postbuild script, so it runs on every build:123456{ "scripts": { "build": "tsc", "postbuild": "interfere sourcemaps upload ./dist" } }
.js.map it finds in the directory, andINTERFERE_API_KEY.| Variable | Required | Description |
INTERFERE_API_KEY | Yes | Your Interfere API key (interfere_secret_<region>_…). Authenticates the upload. |
INTERFERE_API_URL | No | Override the collector URL for a regional or self-hosted instance. Defaults to https://in.interfere.com. |
INTERFERE_SOURCE_ID | No | Override the commit SHA used to identify the release. Auto-detected from CI or git otherwise. |
123456- run: npm run build - name: Upload source maps to Interfere run: npx interfere sourcemaps upload ./dist env: INTERFERE_API_KEY: ${{ secrets.INTERFERE_API_KEY }}
pull_request events GitHub sets GITHUB_SHA to a temporary merge commit that exists on no branch, so a release uploaded from a PR build won't match your real commit. Upload from your push or deploy workflow, or pass the head commit explicitly with --commit-sha.git rev-parse HEAD.| Flag | Description |
--source-maps <dir> | Directory to scan for .js.map files. Also accepted as the positional argument shown above. |
--api-key <key> | API key, instead of INTERFERE_API_KEY. |
--commit-sha <sha> | Set the commit when there's no git checkout, for example a Docker build. |
--build-id <id> | A build identifier distinct from the commit, if you reuse commits across builds. |
--environment <env> | Label the release, for example production or preview. |
--deployment-url <url> | The URL the build was deployed to. |
--dry-run | Print what would be sent without uploading. Useful for wiring up CI. |
--json | Machine-readable output for scripts. |
interfere --help for the full list.12ARG GIT_SHA ENV INTERFERE_SOURCE_ID=$GIT_SHA
1docker build --build-arg GIT_SHA=$(git rev-parse HEAD) .