Features
Local Development
Run Spect in local mode for development and debugging.
Local only mode
Skip sending traces to collector (useful for local dev):
const wrappedModel = wrap(openai('gpt-4o'), {
organizationId: 'your-org-id',
// apiKey is optional in local only mode
local: true,
onTrace: (payload) => console.log('Trace:', payload),
});Traces are persisted to .spect/data.json in your project root and cleaned up on process exit. You can serve .spect directory as a static site to view traces.
bun serve .spect --port 52321
npx serve .spect --port 52321You can see the latest trace by visiting the public viewer at https://spect.tools/viewer.