# Mason

> Create and reuse code templates (bricks) in Dart and Flutter projects

Source: https://talira.ai/catalog/mason-h2mqynwg
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool, Library
- Categories: [developer tools / scaffolding](https://talira.ai/categories/developer-tools/scaffolding), [languages / dart](https://talira.ai/categories/languages/dart)
- Licence: MIT[^2][^3][^4]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Felix Angelov](https://talira.ai/orgs/felangel.md)

Mason is a set of Dart packages and a command-line tool for creating and consuming reusable templates called bricks. A brick is a directory of mustache templates with a brick.yaml describing its variables (strings, numbers, booleans, enums, arrays and lists, with prompts and defaults); mason make generates files from it, resolving file conflicts by prompting, overwriting, skipping or appending, and bricks can run custom pre- and post-generation hook scripts. You add bricks from the BrickHub registry, a path or a git URL, search and publish them from the CLI, and use the mason package, the core generator behind the CLI, to build your own code generation tools. Its packages include mason_cli, mason, mason_api and mason_logger, the CLI's reusable logger with log levels, styles and prompts.

## Links

- GitHub: https://github.com/felangel/mason
- Docs: https://docs.brickhub.dev/

## Problems it solves

- generate the same boilerplate files for every new Flutter feature
- share project templates across my team's Dart repositories
- scaffold code from templates with variables in a Dart project

## Features

- bricks: mustache templates with typed variables and prompts in brick.yaml
- pre- and post-generation hook scripts
- file conflict resolution: prompt, overwrite, skip or append
- add bricks from BrickHub, a local path or a git URL
- search and publish bricks from the CLI
- mason_logger: a reusable CLI logger with levels, styles and prompts

## Limitations

- A brick published to BrickHub can never be unpublished[^1]
- Hooks can only be written in Dart[^1]

## Trust

Overall: 0.50 out of 1.
Signals: maintenance 0.67, adoption 0.61, momentum 0.37, community 0.60, backing 0.30, extensibility 0.00.

- last commit 12 days ago
- 10 commits in the last 90 days
- latest release mason_cli-v0.1.4 2 months ago
- 1.1k GitHub stars
- 30 contributors
- accepts sponsorship (Github)
- backed by Felix Angelov

## Sources

[^1]: https://github.com/felangel/mason/blob/master/packages/mason_cli/README.md (checked 28 Nov 2026)
[^2]: https://github.com/felangel/mason/blob/master/packages/mason/LICENSE (checked 28 Nov 2026)
[^3]: https://github.com/felangel/mason/blob/master/packages/mason_cli/LICENSE (checked 28 Nov 2026)
[^4]: https://github.com/felangel/mason/blob/master/packages/mason_logger/LICENSE (checked 28 Nov 2026)
