CLI reference
Command Overview:
trellis↴trellis list↴trellis graph↴trellis info↴trellis run↴trellis exec↴trellis changelog↴trellis changelog new↴trellis changelog check↴trellis version↴trellis version plan↴trellis version apply↴trellis init↴trellis new↴trellis release↴trellis release pr↴trellis release bootstrap↴trellis tag↴trellis tag plan↴trellis tag create↴trellis publish↴trellis lockfile↴trellis lockfile refresh↴trellis doctor↴trellis ci↴trellis ci matrix↴trellis ci outputs↴trellis ci tag-package↴trellis completions↴
trellis
Section titled “trellis”A workspace CLI for Gleam monorepos: task fan-out, introspection, and release orchestration derived entirely from gleam.toml
Usage: trellis [OPTIONS] <COMMAND>
Subcommands:
Section titled “Subcommands:”list— List packages in topological order (dependencies first)graph— Render the dependency graphinfo— Show details for one packagerun— Run a task across packages, graph-parallel by defaultexec— Run an arbitrary command in each package directorychangelog— Changelog fragment management (see [tools.trellis.changelog])version— Plan and apply version bumps from unreleased changelog fragmentsinit— Bootstrap a workspace: write a [tools.trellis] table at the repo rootnew— Scaffold a new package in the workspacerelease— Release orchestrationtag— Compare package versions against git tags; create what’s missingpublish— Publish packages to Hex, in dependency order, with path deps rewrittenlockfile— Lockfile maintenancedoctor— Validate workspace invariants; non-zero exit on any errorci— Structured output for CIcompletions— Print the shell snippet that enables tab-completion
Options:
Section titled “Options:”-
-C,--directory <DIR>— Run as if started in this directory -
--color <WHEN>— When to color output.autofollows the terminal,NO_COLOR, andCLICOLOR=0; the other two override that detectionDefault value:
autoPossible values:
auto,always,never -
-q,--quiet— Suppress normal-path output; JSON/report payloads and errors still print -
-v,--verbose— Trace every command trellis shells out to, on stderr -
--no-update-check— Don’t check whether a newer trellis release is availableThe check is also skipped in CI, when not attached to a terminal, and when
TRELLIS_NO_UPDATE_CHECKorDO_NOT_TRACKis set.
trellis list
Section titled “trellis list”List packages in topological order (dependencies first)
Usage: trellis list [OPTIONS]
Options:
Section titled “Options:”--json— Emit JSON instead of name/lifecycle columns--since <REF>— Only packages owning files changed since this git ref--with-dependents— Add the reverse-dependency closure of the selection--releasable— Only packages whose release lifecycle isgit_onlyorhex
trellis graph
Section titled “trellis graph”Render the dependency graph
Usage: trellis graph [OPTIONS]
Options:
Section titled “Options:”-
--format <FORMAT>Default value:
textPossible values:
text,dot,mermaid,json
trellis info
Section titled “trellis info”Show details for one package
Usage: trellis info [OPTIONS] <PACKAGE>
Arguments:
Section titled “Arguments:”<PACKAGE>
Options:
Section titled “Options:”--json— Emit JSON instead of the text summary
trellis run
Section titled “trellis run”Run a task across packages, graph-parallel by default
Usage: trellis run [OPTIONS] <TASK> [PACKAGES]...
Arguments:
Section titled “Arguments:”<TASK>— Built-in (build, test, check, format, docs, deps, clean) or a [tools.trellis.tasks] entry<PACKAGES>— Packages to run in; all workspace packages when omitted
Options:
Section titled “Options:”-
--since <REF>— Only packages owning files changed since this git ref -
--with-dependents— Add the reverse-dependency closure of the selection -
--target <TARGET>— Gleam compile target;allruns the task once per targetPossible values:
erlang,javascript,all -
--strict— Treat warnings as errors (build) -
--check— Check instead of write (format) -
--serial— Run one package at a time, in dependency order -
--keep-going— Keep scheduling packages after a failure -
-j,--jobs <N>— Maximum concurrent packages (default: CPU count) -
--json— Emit thetrellis.run/1payload instead of the summary table; package output moves to stderr
trellis exec
Section titled “trellis exec”Run an arbitrary command in each package directory
Usage: trellis exec [OPTIONS] [PACKAGES]... -- <COMMAND>...
Arguments:
Section titled “Arguments:”<PACKAGES>— Packages to run in; all workspace packages when omitted<COMMAND>— The command to run (after--)
Options:
Section titled “Options:”--since <REF>— Only packages owning files changed since this git ref--serial— Run one package at a time, in dependency order--keep-going— Keep scheduling packages after a failure-j,--jobs <N>— Maximum concurrent packages (default: CPU count)--json— Emit thetrellis.exec/1payload instead of the summary table; package output moves to stderr
trellis changelog
Section titled “trellis changelog”Changelog fragment management (see [tools.trellis.changelog])
Usage: trellis changelog <COMMAND>
Subcommands:
Section titled “Subcommands:”new— Add an unreleased changelog fragmentcheck— Verify changed packages have changelog fragments; non-zero exit if not
trellis changelog new
Section titled “trellis changelog new”Add an unreleased changelog fragment
Usage: trellis changelog new [OPTIONS] --kind <KIND> --body <BODY>
Options:
Section titled “Options:”--package <PACKAGE>— The package the change belongs to (optional when the workspace has exactly one releasable package)--kind <KIND>— Change kind (see [tools.trellis.changelog] kinds; defaults include Added, Fixed, Breaking, …)--category <CATEGORY>— Change category, grouping entries above the kind headings (see [tools.trellis.changelog] categories; none are configured by default)--body <BODY>— The changelog entry text
trellis changelog check
Section titled “trellis changelog check”Verify changed packages have changelog fragments; non-zero exit if not
Usage: trellis changelog check [OPTIONS] --base <BASE>
Options:
Section titled “Options:”-
--base <BASE>— Base ref of the change range -
--head <HEAD>— Head ref of the change rangeDefault value:
HEAD -
--format <FORMAT>— How to report: prose, thetrellis.changelog_check/2JSON payload (including a Markdownpreviewfor a PR comment), orkey=valuelines for $GITHUB_OUTPUTDefault value:
textPossible values:
textjson: Thetrellis.changelog_check/2payloadgithub:key=valuelines for$GITHUB_OUTPUT, so a workflow can post, update, or delete a PR comment without ajqpipeline
-
--strictness <STRICTNESS>— Override the workspace’s changelog.strictness for this run: fail on a missing entry, report it advisorily, or don’t checkPossible values:
warn,error,off -
--json— Deprecated alias for--format json
trellis version
Section titled “trellis version”Plan and apply version bumps from unreleased changelog fragments
Usage: trellis version <COMMAND>
Subcommands:
Section titled “Subcommands:”plan— Dry-run: show whatversion applywould bumpapply— Bump versions, render changelogs, patch manifest.toml locked versions
trellis version plan
Section titled “trellis version plan”Dry-run: show what version apply would bump
Usage: trellis version plan [OPTIONS]
Options:
Section titled “Options:”--bump <LEVEL|PKG=LEVEL>— Override the derived bump level, workspace-wide (--bump major) or for one package (--bump lat_core=major). Repeatable--set <PKG=VERSION>— Pin a package’s next version exactly (--set lat_core=1.0.0). Repeatable--pre <LABEL>— Cut a prerelease:--pre rcgives 1.0.0-rc.1, and again 1.0.0-rc.2. Fragments stay unreleased until the final version.--pre nonepromotes the current prerelease to its final version and consumes them--json— Emit JSON instead of text
trellis version apply
Section titled “trellis version apply”Bump versions, render changelogs, patch manifest.toml locked versions
Usage: trellis version apply [OPTIONS]
Options:
Section titled “Options:”--bump <LEVEL|PKG=LEVEL>— Override the derived bump level, workspace-wide (--bump major) or for one package (--bump lat_core=major). Repeatable--set <PKG=VERSION>— Pin a package’s next version exactly (--set lat_core=1.0.0). Repeatable--pre <LABEL>— Cut a prerelease:--pre rcgives 1.0.0-rc.1, and again 1.0.0-rc.2. Fragments stay unreleased until the final version.--pre nonepromotes the current prerelease to its final version and consumes them--json— Emit JSON listing every bump and patched lockfile
trellis init
Section titled “trellis init”Bootstrap a workspace: write a [tools.trellis] table at the repo root
Everything trellis can derive it derives, so the table this writes is nearly empty by design — its presence is what marks the workspace root. Members stay auto-discovered from git; the comments it leaves point at what can be configured. Refuses if the repository is already a trellis workspace, and finishes by running doctor.
Usage: trellis init
trellis new
Section titled “trellis new”Scaffold a new package in the workspace
Usage: trellis new [OPTIONS] <NAME>
Arguments:
Section titled “Arguments:”<NAME>— Package name (lowercase letters, digits, and _)
Options:
Section titled “Options:”-
--template <TEMPLATE>— Template to scaffold fromDefault value:
lib -
--path <PATH>— Parent directory relative to the workspace root (derived from existing members when omitted)
trellis release
Section titled “trellis release”Release orchestration
Usage: trellis release <COMMAND>
Subcommands:
Section titled “Subcommands:”pr— Create or update the release PR: version apply on a branch, push, open or refresh the PR via the GitHub APIbootstrap— Reconcile tags against current manifest versions — no version bump, no unreleased changelog fragments required
trellis release pr
Section titled “trellis release pr”Create or update the release PR: version apply on a branch, push, open or refresh the PR via the GitHub API
Usage: trellis release pr [OPTIONS]
Options:
Section titled “Options:”-
--base <BASE>— Base branch the PR targetsDefault value:
main -
--branch <BRANCH>— Branch the release commit is force-pushed toDefault value:
release/pending
trellis release bootstrap
Section titled “trellis release bootstrap”Reconcile tags against current manifest versions — no version bump, no unreleased changelog fragments required
An alias for tag create, for adopting trellis on a repository that already has the package versions and changelogs it wants, but no tags yet.
Usage: trellis release bootstrap [OPTIONS]
Options:
Section titled “Options:”--push— Push each created tag to origin--github-release— Also create a GitHub Release per exact tag, with the matching CHANGELOG section as the body (implies –push; needs a GitHub token from GITHUB_TOKEN, GH_TOKEN, or a logged-in gh CLI)--dry-run— Report every tag/push/release action without doing anything (a conflicting tag still fails the command)
trellis tag
Section titled “trellis tag”Compare package versions against git tags; create what’s missing
Usage: trellis tag <COMMAND>
Subcommands:
Section titled “Subcommands:”plan— List releasable packages whose current version has no tag yetcreate— Create missing tags in topological order
trellis tag plan
Section titled “trellis tag plan”List releasable packages whose current version has no tag yet
Usage: trellis tag plan [OPTIONS]
Options:
Section titled “Options:”--json— Emit JSON instead of text
trellis tag create
Section titled “trellis tag create”Create missing tags in topological order
Usage: trellis tag create [OPTIONS]
Options:
Section titled “Options:”--push— Push each created tag to origin--github-release— Also create a GitHub Release per exact tag, with the matching CHANGELOG section as the body (implies –push; needs a GitHub token from GITHUB_TOKEN, GH_TOKEN, or a logged-in gh CLI)--dry-run— Report every tag/push/release action without doing anything (a conflicting tag still fails the command)
trellis publish
Section titled “trellis publish”Publish packages to Hex, in dependency order, with path deps rewritten
Usage: trellis publish [OPTIONS] [PACKAGE]
Arguments:
Section titled “Arguments:”<PACKAGE>— A single package to publish
Options:
Section titled “Options:”--tag <TAG>— Resolve a pushed tag (e.g. lat_core-v1.2.0) to its package--all-untagged— Everyhex-lifecycle package whose version isn’t on Hex yet--dry-run— Show what would be published (and rewritten) without doing it
trellis lockfile
Section titled “trellis lockfile”Lockfile maintenance
Usage: trellis lockfile <COMMAND>
Subcommands:
Section titled “Subcommands:”refresh— Rungleam deps download, scoped to one package (with retry/backoff)
trellis lockfile refresh
Section titled “trellis lockfile refresh”Run gleam deps download, scoped to one package (with retry/backoff)
Usage: trellis lockfile refresh [OPTIONS]
Options:
Section titled “Options:”--package <PACKAGE>— Refresh only this package instead of the whole workspace
trellis doctor
Section titled “trellis doctor”Validate workspace invariants; non-zero exit on any error
Usage: trellis doctor [OPTIONS]
Options:
Section titled “Options:”-
--fix— Apply the mechanically-fixable findings (seed changelog stubs, patch stale locked versions), then re-report what remains -
--dry-run— List the fixes--fixwould apply without writing anything -
--format <FORMAT>— How to report findings: prose, thetrellis.doctor/1JSON payload, or GitHub Actions annotations that land on the file in a PRDefault value:
textPossible values:
textjson: Thetrellis.doctor/1payloadgithub: GitHub Actions workflow commands, so findings land on the file in the PR’s Files tab instead of in a log nobody expands
trellis ci
Section titled “trellis ci”Structured output for CI
Usage: trellis ci <COMMAND>
Subcommands:
Section titled “Subcommands:”matrix— Emit a GitHub Actions strategy matrix: {“include”:[{name,path,version},…]}outputs— Emit workspace facts as key=value lines for $GITHUB_OUTPUTtag-package— Resolve a pushed tag (e.g. $GITHUB_REF_NAME) to its package name
trellis ci matrix
Section titled “trellis ci matrix”Emit a GitHub Actions strategy matrix: {“include”:[{name,path,version},…]}
Usage: trellis ci matrix [OPTIONS]
Options:
Section titled “Options:”--since <REF>— Only packages affected by changes since this git ref (dependents included)--releasable— Only packages that participate in releases
trellis ci outputs
Section titled “trellis ci outputs”Emit workspace facts as key=value lines for $GITHUB_OUTPUT
Usage: trellis ci outputs
trellis ci tag-package
Section titled “trellis ci tag-package”Resolve a pushed tag (e.g. $GITHUB_REF_NAME) to its package name
Usage: trellis ci tag-package [OPTIONS] <TAG>
Arguments:
Section titled “Arguments:”<TAG>
Options:
Section titled “Options:”--json— Emit JSON with the resolved package, version, and tag kind
trellis completions
Section titled “trellis completions”Print the shell snippet that enables tab-completion
The snippet asks trellis for candidates on each tab-press, so completions offer real package and task names from the surrounding workspace and can never drift from the flags you have. Evaluate it on shell startup rather than saving it to a completions directory — it talks to trellis over an interface that changes between releases, so an eval stays in sync where a saved copy goes stale. For zsh, in ~/.zshrc after compinit:
eval “$(trellis completions zsh)”
Usage: trellis completions <SHELL>
Arguments:
Section titled “Arguments:”-
<SHELL>— Shell to emit a registration snippet forPossible values:
bash,elvish,fish,powershell,zsh