Setup @relative-ci/agent CLI

Step 1. Install

npm install --save-dev @relative-ci/agent
yarn add --dev @relative-ci/agent
pnpm add -D @relative-ci/agent

Step 2. Output webpack stats JSON file

Follow the steps on Output webpack stats JSON file guide.

Step 3. Configure @relative-ci/agent

module.exports = {
// Get current commit message (`git log -1 --pretty=%B`) and send it to RelativeCI as part of the build informatin
includeCommitMessage: true,
// Save agent payload to disk for debugging
// @example './relative-ci-payload.json',
payloadFilepath: undefined,
webpack: {
// Path to Webpack stats JSON file
stats: './webpack-stats.json'

Step 4. Configure Continuous integration(CI) service

Add environment variables


(Required) Navigate to, go to the project Settings -> API Keys page and copy the project API key.


(Required for unsupported CI services) Set your GitHub project slug (eg: relative-ci/app) if your CI service is not supported (


(Required for Enterprise Cloud customers)

Run agent CLI on CI

Add a CI job to run @relative-ci/agent after the build job.

View config examples for:

Need help?Contact us via email, Twitter, or GitHub!

Start analyzing and monitoring yourbundle stats