Skip to content

effect-analyzer

Understand your Effect programs at a glance. Extract structure, calculate complexity, and generate Mermaid diagrams - all without running your code.

Railway diagram showing a transfer program with service dependencies and error branches

Plain-English explanation of a real-world Effect upload service with retry and concurrency

Static Analysis

Analyze Effect programs without execution. Extracts generators, pipes, services, layers, error handlers, and control flow.

Mermaid Diagrams

Auto-generate flowcharts, railway diagrams, service maps, error flows, concurrency views, and more.

Complexity Metrics

Calculate cyclomatic complexity, cognitive complexity, path counts, nesting depth, and parallel breadth.

Semantic Diff

Compare two versions of an Effect program to see what changed - steps added, removed, or modified.

Terminal window
# Install
npm install effect-analyzer
# Analyze a file
npx effect-analyze ./src/my-program.ts
# Generate a railway diagram
npx effect-analyze ./src/my-program.ts --format mermaid-railway
# Compare versions
npx effect-analyze HEAD:program.ts program.ts --diff