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

# Build and test

> Local development commands for Catalyst and the bundled analytics plugin.

## App commands

Run these from the repository root.

```bash theme={null}
npm install
npm run dev
```

| Command             | Purpose                                                |
| ------------------- | ------------------------------------------------------ |
| `npm run dev`       | Start Electron in development mode with renderer HMR.  |
| `npm run typecheck` | Type-check main and renderer TypeScript projects.      |
| `npm run test:unit` | Run Vitest unit tests.                                 |
| `npm run test`      | Run the full Vitest command configured by the project. |
| `npm run coverage`  | Run tests with coverage.                               |
| `npm run build`     | Type-check and build production bundles.               |
| `npm run start`     | Preview the built app with `electron-vite preview`.    |

## Platform builds

```bash theme={null}
npm run build:win
npm run build:mac
npm run build:linux
```

The Windows build is the primary packaged target. Other targets exist in the build configuration and may require platform-specific tooling.

## CatalystAnalytics plugin

From `catalyst-plugin/`:

```bash theme={null}
./gradlew jar
```

The built JAR is written to `catalyst-plugin/build/libs/CatalystAnalytics.jar`.

## Useful verification path

<Steps>
  <Step title="Type-check">
    Run `npm run typecheck` after TypeScript changes.
  </Step>

  <Step title="Run unit tests">
    Run `npm run test:unit` for main-process and utility behavior.
  </Step>

  <Step title="Run the app">
    Use `npm run dev` to verify renderer flows and IPC behavior.
  </Step>

  <Step title="Package when needed">
    Use the platform build scripts before release testing.
  </Step>
</Steps>

<Warning>
  Do not run hidden background windows or hidden servers during local verification. Start app and server processes plainly so failures are visible.
</Warning>
