finds.dev← search

// the find

felangel/mason

★ 1,135 · Dart · updated Sep 2026

Tools which allow developers to create and consume reusable templates called bricks.

Mason is a Dart monorepo with a template engine (the `mason` package), a CLI, a client for the BrickHub registry, and a logger. A brick is a directory with a `brick.yaml` and a `__brick__` folder of Mustache templates, aimed at Dart and Flutter developers who want to scaffold files or whole project layouts from shared templates.

- The engine is a library as well as a CLI dependency. `packages/mason/example/main.dart` and the `programmatic_usage` fixture show that programmatic use is intended, not an afterthought.

- Template paths are Mustache too, so one brick can make files conditionally (`{{#android}}build.gradle{{/android}}`) or loop over a list to create one file per item (`main_{{#values}}{{{.}}}{{/values}}.txt`). That covers a lot of real scaffolding without custom code.

- `bundler.dart` and the `mason_bundle` format let a CLI embed its templates as Dart source. It can then scaffold offline without a registry round-trip.

- Each package has its own pubspec and CI workflow, and most files in `lib/src` have a matching test file. The engine, CLI, registry client and logger can be reasoned about separately.

- Hooks are Dart programs that run with the user's permissions. Installing a third-party brick means executing its hook code, and the README says little about that trust model.

- Hooks carry their own pubspec and run `pub get` at generation time. A brick that looks like plain templating therefore needs the Dart SDK and network access on first run. The repo has fixtures for dependency install failures, so this is a known failure mode.

- Mustache is logic-less, so anything beyond sections and loops ends up in hooks. That pushes brick authors toward the heavier Dart toolchain even for small jobs.

- Tags in filenames such as `main_{{#flavors}}{{{.}}}{{/flavors}}.dart` make the brick tree hard to browse, search and diff in editors. The README also sends readers to docs.brickhub.dev for the actual format reference, so the repo alone does not document the format.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →