Skip to content
broom

Start

Broom documentation

What Broom is, what it does, and where to start.

Broom is a fast, lightweight, cross-platform CLI for auditing, maintaining and inspecting JavaScript and TypeScript projects. It is a single broom command with seven subcommands, each answering one question about your project.

commands
broom env environment variables vs. .env files
broom clean potentially unused files and assets
broom ports processes on common dev ports
broom recap Markdown summaries of local git history
broom doctor project health checks
broom deps declared vs. used dependencies
broom stats size and language overview

Broom analyzes source with a real parser (Babel), never sends anything over the network, never deletes or kills anything without asking, and never prints the values in your .env files.

Start here

Supported platforms

macOS, Linux and Windows. Paths are normalized internally, so Windows separators do not affect results. broom ports uses platform-specific process discovery.

Limitations

These are deliberate, documented boundaries of version 0.1.0:

  • Static analysis only. clean and deps cannot see code paths built at runtime, which is why findings carry confidence levels or are labeled potential.
  • clean reports direct orphans. A file used only by another unused file is considered used; run clean again after removing files.
  • Template languages are not parsed. .vue, .svelte, .astro, .html and .md(x) are scanned for quoted paths and url(); env references inside them are not detected.
  • Aliases come from tsconfig/jsconfig paths/baseUrl plus the @/ and ~/ conventions. Bundler-only aliases and package-based extends are not resolved.
  • Env files across a monorepo are evaluated as one pool. Deno.env and Bun.env are not detected.
  • Lockfiles are read with lightweight format-specific readers; Bun lockfiles are not parsed.
  • Ports covers TCP listeners only. The Windows adapter is covered by parser unit tests but has not yet been exercised on a real Windows machine in this release.
  • Source files over 1 MB are not parsed (they are usually generated) and are listed as skipped.

Found a problem in these docs? Open an issue on GitHub.