@synode/analyzer
v5.0.25
Published
Analyzer for Synode — reverse-engineer configs from event data
Maintainers
Readme
@synode/analyzer
Reverse-engineer Synode configs from existing event data. Analyzes CSV, JSONL, or JSON event logs and produces a complete Synode configuration with journeys, adventures, actions, datasets, and personas.
Install
npm install @synode/analyzerFor AI-powered enhancement (optional):
npm install ai @ai-sdk/anthropic # or @ai-sdk/googleUsage
CLI (recommended)
# Place event data in your project's input/ directory
synode analyze
# Re-compile from existing analysis
synode analyze --compile-onlyProgrammatic
import {
parseFile,
detectSchema,
normalizeEvents,
detectSessions,
discoverActions,
mineSequences,
assembleAdventures,
assembleJourneys,
extractDatasets,
extractPersona,
compileToTypeScript,
} from '@synode/analyzer';
const rows = await parseFile('events.csv');
const schema = detectSchema(rows);
const events = normalizeEvents(rows, schema.mapping);
const sessions = detectSessions(events, { mode: 'timeGap', gapMs: 30 * 60 * 1000 });
const actions = discoverActions(sessions);
const sequences = mineSequences(sessions, { minSupport: 0.1 });
const adventures = assembleAdventures(sequences, sessions, actions);
const journeys = assembleJourneys(adventures, sessions);
const datasets = extractDatasets(sessions);
const persona = extractPersona(sessions);Supported Formats
| Format | Auto-detected schemas | | ------ | ------------------------------- | | CSV | Generic (manual column mapping) | | JSONL | Segment, Mixpanel, GA4, generic | | JSON | Segment, Mixpanel, GA4, generic |
Pipeline
- Parse — read CSV/JSONL/JSON files
- Detect schema — auto-detect Segment, Mixpanel, GA4, or map manually
- Normalize — convert to unified event format
- Session detection — split by session ID or time gap
- Action discovery — find unique events with field distributions
- Sequence mining — discover frequent action subsequences
- Adventure assembly — group sequences into adventures
- Journey assembly — group adventures into journeys
- Dataset extraction — find entity tables from payloads
- Persona extraction — detect user-level attribute distributions
Documentation
License
Proprietary — see LICENSE for details.
Copyright © 2026 Digitl Cloud GmbH
