Skip to content

All Formats Reference

effect-analyzer supports over 25 output formats. Use --format <name> on the CLI, or let auto mode select the best combination for your program.

FormatCLI FlagDescriptionBest For
Standard flowchart--format mermaidFull control-flow graph with all pathsComplex programs with branching
Railway--format mermaid-railwayLinear happy path with error branchesSequential generators
Execution paths--format mermaid-pathsEach execution path as a separate flowUnderstanding all possible routes
Enhanced--format mermaid-enhancedRich annotations (types, services, errors) per nodeDocumentation and review
Service map--format mermaid-servicesService dependency graphUnderstanding DI topology
Error flow--format mermaid-errorsError producers, handlers, propagationDebugging error handling
Decision tree--format mermaid-decisionsConditional branching visualizationPrograms with many if/match
Cause hierarchy--format mermaid-causesCause and Exit wrapping structureCause/Exit pattern analysis
Concurrency--format mermaid-concurrencyParallel and race fork/join structurePrograms with Effect.all/Effect.race
Timeline--format mermaid-timelineStep sequence as a timelineTemporal ordering of steps
Layer graph--format mermaid-layersLayer composition and dependenciesLayer architecture review
Retry strategy--format mermaid-retryRetry and timeout policy visualizationPrograms with retry/timeout
Testability--format mermaid-testabilityWhat needs mocking and what to testTest planning
Data flow--format mermaid-dataflowData dependencies between pipe stepsUnderstanding value flow
Composition(library API)Cross-program call graphMulti-program projects
FormatCLI FlagDescriptionBest For
JSON--format jsonFull IR serialized as JSONTooling integration
Stats--format statsComplexity metrics and analysis statisticsQuick complexity check
Explain--format explainPlain-English narrative of program behaviorDocumentation, onboarding
Summary--format summaryOne-line description per programDirectory overviews
Matrix--format matrixProgram-by-service dependency tableCross-cutting dependency view
Showcase--format showcaseDetailed step-by-step breakdownComprehensive documentation
Migration--format migrationPatterns that could migrate to EffectAdoption planning
FormatCLI FlagDescriptionBest For
API docs--format api-docsHttpApi structure as markdownAPI documentation
OpenAPI paths--format openapi-pathsMinimal OpenAPI paths for spec mergingOpenAPI integration
OpenAPI runtime--format openapi-runtimeFull OpenAPI spec via OpenApi.fromApiComplete spec generation
FormatHow to UseDescriptionBest For
Interactive HTMLrenderInteractiveHTML(ir) (library API)Self-contained HTML with search, filtering, path explorer, themesExploration, sharing

When no --format is specified, the analyzer runs in auto mode:

  1. Selects a baseline diagram - railway for simple programs, flowchart for complex ones
  2. Scores the program’s characteristics (error density, service count, concurrency, etc.)
  3. Adds up to 2 specialized views based on the highest-scoring characteristics
Terminal window
# Auto mode (default)
npx effect-analyze ./src/program.ts
# Equivalent to explicitly requesting auto
npx effect-analyze ./src/program.ts --format auto

All formats support the following output options:

Terminal window
# Save to file
npx effect-analyze ./src/program.ts --format mermaid-railway -o diagram.md
# Compact JSON (no indentation)
npx effect-analyze ./src/program.ts --format json --compact
# Control flow direction
npx effect-analyze ./src/program.ts --format mermaid --direction LR
# Include trivial programs (schemas, thin wrappers)
npx effect-analyze ./src/program.ts --include-trivial