Skip to main content

Debugg CLI

The Debugg CLI runs AI-guided E2E tests against your app locally or in CI.

Installation

  • Global: pnpm add -g @debugg-ai/cli (or npm i -g @debugg-ai/cli)
  • One-off: npx @debugg-ai/cli@latest --help

Core command

  • debugg-ai test --api-key $DEBUGGAI_API_KEY --repo-path . --max-test-time 1800000 --server-timeout 120000 --pr <number>
  • Required: --api-key (from Debugg AI), recommended: --repo-path ., --max-test-time (ms), --server-timeout (ms), --pr for PR context.

Environment

  • DEBUGGAI_API_KEY: Project API key (store as CI secret).

GitHub Actions templates Copy one template and adjust the build/start commands for your framework. All templates:

  • install deps with pnpm, install CLI, build app, start server (or use provided URL), wait for readiness, then run debugg-ai test.

Next.js (standard pnpm build && pnpm start)

name: Test Debugg AI Workflow
on: { pull_request: { types: [opened, synchronize, reopened] }, workflow_dispatch: }
jobs:
test-debugg-ai-runner:
runs-on: ubuntu-latest
env:
DEBUGGAI_API_KEY: ${{ secrets.DEBUGGAI_API_KEY }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2; with: { version: 9 }
- uses: actions/setup-node@v4; with: { node-version: 18, cache: pnpm }
- run: pnpm install --frozen-lockfile
- run: pnpm add -g @debugg-ai/cli@latest && debugg-ai --version
- run: pnpm build
- run: pnpm start & echo SERVER_PID=$! >> $GITHUB_ENV && echo TEST_URL=http://localhost:3000 >> $GITHUB_ENV
- run: for i in {1..60}; do curl -f ${{ env.TEST_URL }} && break || sleep 2; done
- run: debugg-ai test --api-key $DEBUGGAI_API_KEY --repo-path . --max-test-time 1800000 --server-timeout 120000 --pr ${{ github.event.pull_request.number }} | tee test-output.txt

React (Vite)

      - run: pnpm build && pnpm preview --host --port 4173 & echo SERVER_PID=$! >> $GITHUB_ENV && echo TEST_URL=http://localhost:4173 >> $GITHUB_ENV

Node/Express

      - run: pnpm build || true
- run: NODE_ENV=production node server.js & echo SERVER_PID=$! >> $GITHUB_ENV && echo TEST_URL=http://localhost:3000 >> $GITHUB_ENV

Django

      - uses: actions/setup-python@v5; with: { python-version: '3.11' }
- run: pip install -r requirements.txt
- run: python manage.py migrate --noinput
- run: python manage.py collectstatic --noinput
- run: python manage.py runserver 0.0.0.0:8000 & echo SERVER_PID=$! >> $GITHUB_ENV && echo TEST_URL=http://localhost:8000 >> $GITHUB_ENV

Tips

  • To test a deployed URL, skip the start step and set TEST_URL input/var.
  • Persist artifacts: use actions/upload-artifact on test-output.txt and any tests/debugg-ai/** assets.
  • Always kill background servers in a cleanup step to avoid hangs.