Back to directory

dmx

A Dart code generator that regenerates class members such as copyWith, equality, hashCode and typed JSON inside the same file on every save, using team-owned Mustache templates instead of build_runner part files.

dmx

dmx runs when a Dart file is saved and inserts generated members, such as copyWith, equality, hashCode, toString and typed JSON encoding and decoding, directly below a divider in the same file, rather than in a separate part file or a .g.dart file. Annotating a class with an attribute such as dmx('model') selects one of eleven built-in macros, including union types, wire-safe enums, diffing, interpolation, accumulating validation, SQL schema generation, typed deep links, an argv parser, deterministic fixtures and REST client implementations.

Each macro pairs a Rust context builder with a Mustache template that a team can edit to change the generated output; a WebAssembly build of the same generator runs in a browser playground for trying edits without installing anything.

It installs as a VS Code extension that bundles the dmx binary, or as a standalone CLI for other editors, with the runtime added to a project through Dart's package manager.

More in CLI tools

See all 181
  • grev

    github.com

    A set of Unix coreutils-style filters — grep, sort, cut and more — that answer a plain-language question about each record instead of matching a pattern, using a small decision model.

  • A Node.js script that exports a Google Doc to HTML and CSS with high fidelity, preserving headings, spacing, alignment, bullet lists, images and right-to-left text.

  • gpusched

    github.com

    A VRAM-aware GPU job scheduler for a single machine: declare how much memory each shell command needs, and it places jobs the moment a GPU has room and reports when a guess was wrong.