A terminal profiler for TypeScript type-checking. It reads trace.json from
tsc --generateTrace and shows expensive files and source lines.
With Nix:
nix profile install .With Cargo:
cargo install --path .You can also run it directly from this repository:
nix run . -- /tmp/traceFor a regular TypeScript project:
tsc -p tsconfig.json --generateTrace /tmp/traceFor a project-reference monorepo:
tsc -b --force --generateTrace /tmp/traceBuild mode follows project references. --force ensures incremental build
metadata does not skip projects.
git clone https://github.com/Effect-TS/effect.git
cd effect
pnpm install
pnpm exec tsc -b --force --generateTrace /tmp/effect-trace
yoruichi /tmp/effect-trace tuiyoruichi /tmp/trace # hottest files
yoruichi /tmp/trace top --min-ms 1 --limit 20
yoruichi /tmp/trace list src/db.ts # hot lines in one file
yoruichi /tmp/trace tui # interactive browser
yoruichi /tmp/trace folded # flamegraph inputOnly trace.json is required. To use a differently named file:
yoruichi --trace-file path/to/trace.jsonHot-line times are compiler time, not application runtime. Nested trace events are counted once, and attributed line time may be lower than total file time.
↑/↓,j/k: navigatePgUp/PgDn: move one pageEnter/→: expand or annotate←/Esc: go backa: annotate the selected fileo: open in$EDITORq: quit
