Setup @relative-ci/agent CLI

Step 1. Install

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

Step 2. Output webpack stats

@relative-ci/agent uses the JSON output of Webpack stats as a source of data. The following webpack.stats options are needed:

// webpack.config.js
  stats: {
    assets: true,
    entrypoints: true,
    chunks: true,
    modules: true

Select the method to output the webpack stats JSON file:

Step 3. Configure @relative-ci/agent

// relativeci.config.js
module.exports = {
  // Allow the agent to pick up the current commit message
  includeCommitMessage: true,
  // Save agent payload to disk for debugging
  // @example './artifacts/relative-ci-payload.json',
  payloadFilepath: undefined,
  webpack: {
    // Path to Webpack stats JSON file
    stats: './dist/webpack-stats.json'

Step 4. Configure Continuous integration(CI) service

Add environment variables


(Required) Navigate to and copy the project specific key from Project -> Settings -> Keys.


(Required for unsupported CI services) Set your Github project slug (eg: webpack/ if your CI service is not supported (

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!