Documentation

Welcome to Code Baseline! This documentation will help you get started with monitoring your codebase health across all your repositories.

New to Code Baseline? Start with the Quickstart guide to set up your first project in under 5 minutes.

Quickstart

Get up and running with Code Baseline in just a few steps:

1. Install the CLI

Install our command-line tool using npm:

npm install -g @codebaseline/cli

2. Authenticate

Log in to your Code Baseline account:

baseline auth login

3. Initialize Your Project

Navigate to your repository and run:

baseline init

This creates a baseline.config.json file with your project settings.

Installation

Code Baseline can be installed via npm, yarn, or as a standalone binary.

npm

npm install -g @codebaseline/cli

yarn

yarn global add @codebaseline/cli

SDK Installation

For programmatic access, install the SDK:

npm install @codebaseline/sdk

Understanding Baselines

A baseline is a snapshot of your codebase health at a specific point in time. Baselines help you:

Metrics

Code Baseline tracks a comprehensive set of code health metrics:

Alerts & Notifications

Configure alerts to be notified when metrics breach thresholds:

// baseline.config.json { "alerts": { "health_score": { "threshold": 80, "direction": "below" }, "test_coverage": { "threshold": 70, "direction": "below" } }, "notifications": ["slack", "email"] }

Note: Slack and Microsoft Teams integrations require additional setup. See the Integrations section for details.

GitHub Integration

Connect your GitHub organization to automatically track all repositories:

  1. Go to Settings → Integrations in the dashboard
  2. Click Connect GitHub
  3. Authorize Code Baseline to access your organization
  4. Select repositories to monitor