Skip to content

Quickstart

  • Node.js >= 20
  • pnpm >= 9
Terminal window
npm install baselineos @baselineos/govern @baselineos/protocol-core
import { Baseline } from 'baselineos';
const baseline = new Baseline({
projectRoot: process.cwd(),
knowledge: ['./docs', './specs'],
});
await baseline.init();
const task = await baseline.run({
title: 'Generate compliance report',
description: 'Produce a compliance report for Q2 exports',
priority: 'high',
requiredCapabilities: ['compliance'],
acceptanceCriteria: [
{ description: 'Report covers all origin criteria', type: 'automated' },
{ description: 'Evidence bundle exported', type: 'automated' },
],
});
const result = await task.wait();
console.log('Status:', result.status);
console.log('Artifacts:', result.artifacts.length);
import { BaselineGovernSystem } from '@baselineos/govern';
const govern = new BaselineGovernSystem();
const check = await govern.compliance.check('AFCFTA-ROO', {
originCountry: 'GH',
destinationCountry: 'NG',
localValuePercentage: 55,
hasCertificateOfOrigin: true,
});
console.log('Compliant:', check.compliance?.compliant);
const bundle = govern.getEvidenceBundle(check.compliance!.id);
// Bundle contains: policy, evaluation, approvals, audit trail
Terminal window
baseline verify --evidence ./evidence.json --audit-trail ./audit.json
Terminal window
baseline serve --api --port 3141

The server exposes REST endpoints at http://localhost:3141/api/* and a WebSocket stream at /api/stream.