Skip to content

Utilities Reference

Helper functions and utilities for configuring vibe-check.


The primary configuration function for setting up vibe-check defaults, reporters, and global options.

Basic usage:

import { defineVibeConfig } from '@dao/vibe-check';
export default defineVibeConfig({
reporters: ['cost', 'html'],
defaults: {
workspace: '/path/to/repo',
maxTurns: 10
}
});

What you can configure:

  • Reporters - Enable cost tracking and HTML report generation
  • Defaults - Global agent configuration (workspace, model, maxTurns)
  • HTML reports - Customize report output directory and styling
  • Bundle cleanup - Configure artifact retention policies

Configuration file location:

  • vitest.config.ts (recommended)
  • vibe.config.ts (alternative)

import { defineVibeConfig } from '@dao/vibe-check';
export default defineVibeConfig({
reporters: ['cost']
});
import { defineVibeConfig } from '@dao/vibe-check';
export default defineVibeConfig({
// Enable both reporters
reporters: ['cost', 'html'],
// Global agent defaults
defaults: {
workspace: '/Users/you/projects/my-app',
model: 'claude-sonnet-4',
maxTurns: 10
},
// HTML report configuration
htmlReport: {
outputDir: './vibe-reports',
title: 'My Project Agent Tests'
},
// Bundle cleanup policy
bundleCleanup: {
retentionDays: 7,
enabled: true
}
});
import { defineVibeConfig } from '@dao/vibe-check';
const isCI = process.env.CI === 'true';
export default defineVibeConfig({
reporters: isCI ? ['html'] : ['cost'],
defaults: {
workspace: isCI ? '/workspace/repo' : '/Users/you/repo',
maxTurns: isCI ? 5 : 10 // Stricter limits in CI
},
bundleCleanup: {
retentionDays: isCI ? 1 : 30,
enabled: true
}
});

reporters?: ('cost' | 'html')[]
  • 'cost' - Terminal cost summary reporter
  • 'html' - Rich HTML report with transcripts, diffs, timelines
defaults?: {
workspace?: string; // Default repo path
model?: string; // Default Claude model
maxTurns?: number; // Default turn limit
hooks?: HookConfig; // Hook configuration
mcpServers?: McpServerConfig[]; // MCP servers
}
htmlReport?: {
outputDir?: string; // Report output directory
title?: string; // Report title
theme?: 'light' | 'dark' | 'auto'; // Report theme
}
bundleCleanup?: {
retentionDays?: number; // Days to keep bundles
enabled?: boolean; // Enable cleanup
path?: string; // Bundle storage path
}

Full TypeScript support with autocomplete:

import { defineVibeConfig } from '@dao/vibe-check';
import type { VibeConfig } from '@dao/vibe-check';
const config: VibeConfig = defineVibeConfig({
// TypeScript will validate all options
reporters: ['cost', 'html'], // ✅ Valid
// reporters: ['invalid'], // ❌ Type error
});
export default config;