BugmoleDocs bugmole.com →

Continuous integration

Bugmole runs the same way in CI as it does on your laptop: the bugmole CLI, a project API key, and an exit code CI already knows how to read. There's no CI-specific integration to install — any system that can run a shell step and read an exit code works, including Jenkins and CircleCI.

Provision a key

Generate a machine key scoped to the project once, from a machine you trust:

bugmole api-key create

Store the resulting key as BUGMOLE_API_KEY in your CI system's secrets, not in the pipeline file itself.

Run it

bugmole --mode run --plan-id <plan> --browsers chromium,firefox,webkit,msedge

--plan-id is the plan Bugmole should execute; get it from Manage → Projects or bugmole plan. Add --devices "iPhone 15,Pixel 7" to include emulated devices, or --base-url <url> to run against a specific environment instead of the plan's own.

The process exits 1 if the run reported anything other than a clean pass — a normal build-step failure your pipeline already understands.

Jenkins

pipeline {
  agent any
  environment {
    BUGMOLE_API_KEY = credentials('bugmole-api-key')
  }
  stages {
    stage('Bugmole') {
      steps {
        sh 'npm install -g @theaiinc/bugmole'
        sh 'bugmole --mode run --plan-id "$BUGMOLE_PLAN_ID" --browsers chromium,firefox,webkit'
      }
    }
  }
}

CircleCI

jobs:
  bugmole:
    docker:
      - image: cimg/node:22.0
    steps:
      - checkout
      - run: npm install -g @theaiinc/bugmole
      - run: bugmole --mode run --plan-id "$BUGMOLE_PLAN_ID" --browsers chromium,firefox,webkit

Add BUGMOLE_API_KEY and BUGMOLE_PLAN_ID under Project Settings → Environment Variables.

Results

Every run's evidence — screenshots, traces, and the AI's diagnosis of anything that failed — is on the dashboard whether it ran from a laptop or a CI job. See Discover and debug.