An Effect-TS port of Streamdown - a streaming markdown renderer for modern terminals.
bun install
bun run build# Render a file
bun run dist/cli.js path/to/file.md
# Pipe from stdin
cat file.md | bun run dist/cli.js
# Simulate streaming (see output render incrementally)
cat file.md | while IFS= read -r line; do echo "$line"; sleep 0.1; done | bun run dist/cli.js
# Or use the bin alias after build
./dist/cli.js file.md-w, --width <n>- Terminal width (0 = auto-detect)-s, --scrape <dir>- Extract code blocks to directory-p, --prompt <regex>- Prompt detection regex
bun run dev # Watch mode
bun run build # Build dist
bun run typecheck # TypeScript check
bun run lint # Lint with Biome
bun run check # Full Biome check
bun run test # Unit tests (vitest)
bun run ci # Full CI (typecheck + check + test)bun run test # Run once
bun run test:watch # Watch modeVisual tests render markdown fixtures through the CLI for manual inspection.
# Run all fixtures through CLI
bun run test:visual
# Simulate chunked streaming (like LLM APIs)
bun run test:chunk -- fixtures/example.md
# Simulate line-by-line streaming
bun run test:line -- fixtures/example.md
# Adjust timing with TIMEOUT env var
TIMEOUT=0.2 bun run test:line -- fixtures/code.mdTest fixtures are in tests/fixtures/. Files containing 🫣 use this as a chunk delimiter for streaming tests.
| Script | Purpose |
|---|---|
tests/run-tests.sh |
Batch run all fixtures |
tests/chunk-buffer.sh |
Chunked streaming simulator |
tests/line-buffer.sh |
Line-by-line streaming |
tests/strip-chunks.sh |
Remove 🫣 markers from files |
src/cli.ts- CLI entry pointsrc/services/- Parser, Renderer servicessrc/layers/- Effect dependency layerssrc/domain/- Domain typessrc/renderer/- ANSI renderingsrc/parser/- Markdown parsing