Skip to content

Overview

Gleam builds, tests, and publishes one package directory at a time. Trellis runs those commands across the repository in dependency order. It also manages changelogs and versions using the package information in gleam.toml.

For example, the example workspace selects packages from two directories:

Workspace gleam.toml (excerpt)
[tools.trellis]
members = ["packages/*", "examples/*"]

Their path dependencies form this graph:

trellis graph
lat_core (1.2.0)
lat_mid (0.5.0)
└─ lat_core
lat_cli (0.3.1)
├─ lat_core
└─ lat_mid
package_a (0.0.0)
└─ lat_cli

Throughout these docs, a package is one Gleam package, a directory with its own gleam.toml. A member is a package that belongs to the workspace; that word appears where membership itself is the point, as in the members key and the @members exclusion.

Trellis reads package names, versions, and path dependencies from your manifests. trellis doctor checks these against locked versions, changelogs, tags, and toolchain pins. Errors fail the command; warnings do not.

trellis doctor --fix can repair findings such as a releasable package missing its CHANGELOG.md, or a manifest.toml locked version that drifted from its package’s gleam.toml. It applies those fixes and reports any remaining problems. --dry-run lists the same fixes without touching a file.

Trellis records each change as a TOML fragment in .changes/unreleased/, derives version bumps from fragment kinds, and tags each release per package. You choose when to tag and when to publish.

Start with task running and add release commands when you need them:

  • Just the task runner. run, exec, list, and graph need no configuration at all, because members are auto-discovered from git. Keep your existing changelog tool and CI untouched.
  • Add changelogs and versioning. Fragments, version plan, and version apply manage bumps and changelogs locally or in your existing CI.
  • Add publishing. tag records releases; publish uploads packages to Hex in dependency order. Use source bundling to include private workspace dependencies without publishing them as separate Hex packages.
  • The full pipeline. ci, changelog check, and release pr generate GitHub Actions matrices, check changelog coverage, and prepare release PRs.

Use structured output to integrate these commands with your scripts. JSON payloads have versioned schemas; trellis ci also emits GitHub Actions matrices and output records.

  1. Install trellis: a single prebuilt binary; shell installer, Homebrew, mise, or cargo.
  2. Configure the workspace if you need to. With no configuration, members are auto-discovered from git; one optional [tools.trellis] table in gleam.toml covers everything else.
  3. Run trellis doctor to verify the setup, then run tasks across the workspace.
Page Covers
Installation Install channels, pinning a version in CI, verifying the setup.
Configuration The [tools.trellis] table: members, task-scoped exclusions, custom tasks, changelog and publish settings.
Task running run and exec: built-in and custom tasks, graph-parallel scheduling, selecting packages with --since.
Changelog & versioning TOML change fragments, PR enforcement, planning and applying version bumps.
Publishing Release PRs, per-package tags, Hex dependency rewriting, and source bundling for private dependencies.
Dependency pinning trellis pin: git dependency refs rewritten to commit SHAs, updated as a reviewable diff, checked for force-moves.
CI recipes GitHub Actions workflows: affected-only matrices, PR gates, and the release pipeline.
JSON output What the --json payloads guarantee: the schema field, what stability guarantees, and where it stops.
Compatibility The exit-code contract, what semver covers, and the minimum supported Rust version.
CLI reference Every command, flag, and argument, generated from the CLI itself.