> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deploybaseline.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting started

> Run stateful emulators of 28 third-party APIs on your machine, and point your app and its official SDKs at them.

Baseline runs local, stateful copies of the third-party APIs your app depends on: Stripe, GitHub, Slack, Google, HubSpot, Salesforce, and [22 more](/providers.md). Each emulator keeps real state, runs the vendor's OAuth flows, signs its webhooks, and is tested with the vendor's official SDK. It is built for CI and no-network sandboxes. Not mocks.

## Quick start

Requires Node 24 or later.

```bash theme={null}
npx @deploybaseline/cli
```

With no config file, the eleven default providers start on fixed ports. They keep these ports in every release:

| Port | Provider | Port | Provider |
| - | - | - | - |
| `4001` | [GitHub](/github.md) | `4008` | [Resend](/resend.md) |
| `4002` | [Google](/google.md) | `4009` | [Stripe](/stripe.md) |
| `4003` | [Slack](/slack.md) | `4010` | [Clerk](/clerk.md) |
| `4004` | [Apple](/apple.md) | `4011` | [Linear](/linear.md) |
| `4005` | [Microsoft](/microsoft.md) | `4012` | [Twilio](/twilio.md) |
| `4006` | [Okta](/okta.md) | `3999` | [API reference](/api-reference.md) and control API |

Start any of the other seventeen by name, alone or next to the defaults. A service started alone listens on `4000`:

```bash theme={null}
npx @deploybaseline/cli start --service hubspot
npx @deploybaseline/cli start --service stripe,paypal,square
```

Every listener binds to IPv4 loopback (`127.0.0.1`). Start prints each service URL, the API reference at `http://localhost:3999/docs`, a control token, and an inspector link. The [Providers](/providers.md) page lists all 28 by category, and each provider's page shows how to point its SDK at the emulator.

## CLI

```bash theme={null}
# Start the eleven default services (no config needed)
npx @deploybaseline/cli

# Start specific services, including ones outside the default set
npx @deploybaseline/cli --service github,jira,salesforce

# Custom port
npx @deploybaseline/cli --port 3000

# Use a seed config file
npx @deploybaseline/cli --seed config.json

# Generate omitted service secrets into a private file
npx @deploybaseline/cli start --seed config.json --generated-secrets-file .baseline-secrets.json

# Keep data, tokens, and webhooks across restarts
npx @deploybaseline/cli --state .baseline/state.json

# Generate a starter config
npx @deploybaseline/cli init

# Generate config for a specific service
npx @deploybaseline/cli init --service github

# Check a config: each problem with its line, the setting, and the fix
npx @deploybaseline/cli validate

# List available services
npx @deploybaseline/cli list
```

## Options

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `-p, --port`
      </td>

      <td>
        `4000`
      </td>

      <td>Base port (auto-increments per service)</td>
    </tr>

    <tr>
      <td>
        `--host`
      </td>

      <td>
        `127.0.0.1`
      </td>

      <td>
        Listening address; use `0.0.0.0` to allow network access
      </td>
    </tr>

    <tr>
      <td>
        `--single-port`
      </td>

      <td>off</td>

      <td>
        Not supported: each service listens on its own port. See&#x20;
        [Configuration](/configuration.md#single-port)
      </td>
    </tr>

    <tr>
      <td>
        `--console-port`
      </td>

      <td>base port − 1</td>

      <td>
        Port for the [API reference](/api-reference.md) at `/docs` and the control API
      </td>
    </tr>

    <tr>
      <td>
        `--no-console`
      </td>

      <td>off</td>
      <td>Do not open the console port</td>
    </tr>

    <tr>
      <td>
        `-s, --service`
      </td>

      <td>the 11 defaults</td>
      <td>Comma-separated services to enable</td>
    </tr>

    <tr>
      <td>
        `--seed`
      </td>

      <td>auto-detect</td>
      <td>Path to seed config (JSON or YAML)</td>
    </tr>

    <tr>
      <td>
        `--base-url`
      </td>

      <td>none</td>

      <td>
        Override the advertised base URL (supports `{service}` template)
      </td>
    </tr>

    <tr>
      <td>
        `--generated-secrets-file`
      </td>

      <td>none</td>
      <td>Generate omitted service secrets and write them to a new owner-only JSON file</td>
    </tr>

    <tr>
      <td>
        `--state`
      </td>

      <td>none (in memory)</td>

      <td>
        Save state to a JSON file, `sqlite:<path>`, or `libsql://` database and restore it
        on the next start. See [Saved state](/state.md)
      </td>
    </tr>

    <tr>
      <td>
        `--reset-state`
      </td>

      <td>off</td>
      <td>Ignore saved state, reseed from config, and overwrite it</td>
    </tr>

    <tr>
      <td>
        `--watch`
      </td>

      <td>off</td>
      <td>Reload on changes to imports and fixtures</td>
    </tr>
  </tbody>
</table>

The generated-secrets destination must not exist. Baseline removes inherited ACLs, verifies effective owner-only access, and publishes the complete file before startup. Handled startup failures remove the invocation-owned artifact. A hard termination can leave a complete artifact that requires manual recovery. Linux requires `setfacl` and `getfacl` from the `acl` package. The flag fails closed when access controls cannot be verified and is not supported on Windows.

The port can also be set via `BASELINE_PORT` or `PORT` environment variables.

For access from a container or another machine, use `npx @deploybaseline/cli start --host 0.0.0.0`. Set `--base-url` to a URL reachable by those clients when using OAuth redirects or other advertised URLs.

## Local HTTPS

Baseline serves plain HTTP. For HTTPS URLs, put any reverse proxy in front of it and pass the public URL with `--base-url` (or `BASELINE_BASE_URL`). The `{service}` placeholder is replaced with each service name, so OAuth redirects and webhook URLs use the proxy address.

With [Caddy](https://caddyserver.com) and locally trusted certificates:

```text theme={null}
{
  local_certs
}

github.localhost {
  reverse_proxy 127.0.0.1:4001
}

google.localhost {
  reverse_proxy 127.0.0.1:4002
}
```

```bash theme={null}
caddy trust     # install Caddy's local CA once
caddy run       # in the directory with the Caddyfile
npx @deploybaseline/cli start --base-url "https://{service}.localhost"
```

Add one site block per service you use. `*.localhost` resolves to the loopback address, so no hosts file entry is needed. [mkcert](https://github.com/FiloSottile/mkcert) with any other reverse proxy works the same way.

For any other proxy or domain:

```bash theme={null}
npx @deploybaseline/cli start --base-url "https://{service}.myproxy.test"
```

Per-service overrides are also supported in the seed config. They take priority over every other base URL source:

```json theme={null}
{
  "github": {
    "baseUrl": "https://github.localhost"
  }
}
```

## Programmatic API

You can also use Baseline as a library in your tests. See the [Programmatic API](/programmatic-api.md) page for `createEmulator`, Vitest/Jest setup, and instance methods.

## Where to go next

> **[Providers](/providers.md)**
>
> All 28 emulators by category, with behavior, seed config, and limits.

> **[API reference](/api-reference.md)**
>
> Every route each emulator serves, at `/docs` on your machine while it runs.

> **[Configuration](/configuration.md)**
>
> Seed data, tokens, ports, and per-service options in `baseline.config.json`, and `validate` to check it.

> **[Contributing](/contributing/overview.md)**
>
> Run Baseline from source, add a provider, and how the checks work.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.