consensus / d2-cli
Provides the latest d2 binary from Terrastruct.
v0.7.0
2026-02-02 17:37 UTC
README
Provides the latest d2 binary via Packagist.
This makes it easier to require d2 via Composer in PHP-based projects, such
as the D2 module for Drupal.
Usage
Require the package via Composer:
composer require consensus/d2-cli
The d2 binary will be available at vendor/consensus/d2-cli/d2.
Release Process
Note that upstream releases
include an intermediate directory that includes the version string. As such,
the location of the binary changes with each release. In this package, we put
the d2 binary at the root, and generate a VERSION file that includes the
release version.
When a new upstream version is released, update the d2_RELEASE variable in
the Makefile, then run:
make d2-release