Skip to content

Getting started

Use Sentinel to run non-code checks against your pull requests. These steps walk through installing dependencies, configuring a plugin, and executing a check locally.

  • Bun for running the workspace scripts
  • A POSIX shell environment

From the repository root, install all workspaces:

Terminal window
bun install

The workspace scripts in the root package.json target the CLI package for you. For example, bun run build:prod builds the compiled binary into dist/sentinel.

Sentinel looks for sentinel.config.ts or sentinel.config.js in the current working directory. The config selects a provider and registers plugins. This example mirrors the sample config in the repository:

import type { SentinelConfig } from "./src/core/config";
import type { SentinelPlugin } from "./src/core/types";
const hello: SentinelPlugin = {
name: "hello",
run: (ctx) => ctx.report.info("Hello from my first plugin"),
};
const config: SentinelConfig = {
provider: "local",
plugins: [hello],
};
export default config;

Build the binary and run the check command from the repo root:

Terminal window
bun run build:prod
./dist/sentinel check

During execution Sentinel will:

  1. Load your config and resolve the provider.
  2. Execute any plugin setup hooks.
  3. Run each plugin with the pull request diff and metadata supplied by the provider.
  4. Post a single Markdown summary through the provider (the local provider logs to stdout).

You can iterate quickly by editing your config or plugins and re-running ./dist/sentinel check.