build_laser 1.0.0 copy "build_laser: ^1.0.0" to clipboard
build_laser: ^1.0.0 copied to clipboard

A CLI tool to run build_runner with clean, actionable output.

Build Laser โšก๏ธ #

A beautiful, readable, and intelligent wrapper for Dart's build_runner.

Stop scrolling through thousands of lines of terminal noise. Build Laser parses your build output in real-time, hides the clutter, highlights the slow tasks, and gives you a precise progress bar based on historical performance.

๐Ÿ“ธ Screenshots #

Demo of Build Laser in action

Standard build_runner Build Laser โšก๏ธ
โŒ Walls of text
โŒ Hard to find errors
โŒ "Log overflowed"
โŒ No time estimate
โœ… Live Progress Bar
โœ… Smart Filtering (hides <1s tasks)
โœ… Warning Summary at the end
โœ… Time Estimation

โœจ Features #

  • โšก๏ธ Noise Reduction: Automatically hides tasks that take 0s, keeping your console clean.
  • ๐Ÿ“Š Live Progress Bar: Learns from your previous builds to show a "Time Remaining" estimate and a visual progress bar.
  • โš ๏ธ Warning Collector: Captures W lines (warnings) and re-prints them in a summary at the end. No more missing deprecation warnings in the scroll-back.
  • ๐Ÿงน Deep Clean: A built-in command to nuke all generated files (.g.dart, .freezed.dart, etc.) and reset the cache.
  • โฑ Performance Insights: Highlights slow builders in Red so you know what is slowing you down.

๐Ÿš€ Installation #

You can install it globally to use it in any project:

dart pub global activate build_laser

Or add it to your project as a dev dependency:

dart pub add --dev build_laser

๐Ÿ›  Usage #

Standard Build #

By default, running build_laser is equivalent to running dart run build_runner build --delete-conflicting-outputs.

build_laser

Watch Mode #

Pass any arguments you normally would. They are forwarded directly to build_runner.

build_laser watch

Deep Clean #

Delete all generated files (.g.dart, .freezed.dart, .hive.dart, etc.) and clear the build cache.

build_laser clean

๐Ÿง  How the Progress Bar Works #

  1. First Run: build_laser doesn't know how many tasks your project has, so it shows a Spinner (โ ‹) and a timer.
  2. Learning: Upon successful completion, it saves your project's metrics (Total Actions & Total Time) to .dart_tool/build_laser_cache.json.
  3. Subsequent Runs: It uses that cache to render a Determinate Progress Bar ([โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘] 60%) and estimates the remaining time.

โŒ Handling Errors #

If the build fails, build_laser will pass the exit code through (useful for CI/CD) and print the critical errors in Red so they stand out immediately.

๐Ÿค Contributing #

This package is intended to make the Flutter/Dart development experience smoother. PRs are welcome!

2
likes
160
points
31
downloads

Documentation

API reference

Publisher

verified publisherbasdevaan.nl

Weekly Downloads

A CLI tool to run build_runner with clean, actionable output.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

args

More

Packages that depend on build_laser