trellis_cli 0.11.0
trellis_cli: ^0.11.0 copied to clipboard
CLI tool for the Trellis template engine — project scaffolding, static site build, and local development server.
Changelog #
0.11.0 #
Added #
trellis theme add <url-or-path> --theme <name>installs a single theme out of a source that carries several, copying only itsthemes/<name>/directory into the site. The built-in themes are distributed this way – they live underthemes/in thetolo/trellisrepository, not in one repository each – sotrellis theme add https://github.com/tolo/trellis --theme lattice --ref v0.11.0installs just that theme from the release tag.--refalso accepts a branch, and the temporary clone is removed on every path, failures included. Whole-repository git installs additionally validate the directory name derived from the URL before cloning; all install paths now warn when the installed manifest requires a newer Trellis version. A theme installed this way carries no git metadata, sotrellis theme updatedoes not apply to it – remove and re-add instead.validateThemeName, exported frompackage:trellis_cli/trellis_cli.dart, is the rule a--themevalue is checked against:^[a-z0-9][a-z0-9_-]*$. A name outside that charset is rejected before anything is cloned, so--themecannot traverse out of the site'sthemes/. A source whose ownthemes/<name>is a symlink resolving outside the source tree is rejected as well, and nothing is copied.
Changed #
trellis theme addwarns when site layouts shadow the theme it just installed, naming each shadowing file. Layouts resolve site-first, so a scaffold that ships its ownlayouts/silently wins over the theme. Installing still succeeds and still exits 0.trellis theme addvalidatestrellis_site.yamlbefore installing anything. Invalid field types exit 1 without creatingthemes/or rewriting the configuration.trellis buildwarns when an active theme is inert – its stylesheets and scripts were published to the output and no emitted page links any of them, which is the case that renders an unstyled site. Only.cssand.jscount; a page carrying the theme's favicon or a font it never applies is still unstyled. The build still exits 0. An override that keeps a link to the theme's stylesheet is not reported – abase.htmlcopied from the theme, or a layout rendering inside the theme's shell. Replacingbase.htmlwith a shell of your own is reported, because nothing links the theme after that.- The blog scaffold's sample post now explains that a date-only
date:is anchored at UTC midnight, and shows the zone-explicit form (date: 2026-03-15T09:30:00Z) for pinning an exact instant. Matches the front-matter date resolutiontrellis_site0.11.0 ships.
Documentation #
- The README's built-in Lattice examples now install from
https://github.com/tolo/trelliswith--theme lattice --ref v0.11.0. They previously pointed at a per-theme repository (tolo/trellis-theme-verdant) that does not exist.--refis documented as becominggit clone --branch, so it takes a tag or branch that already exists on the remote. trellis theme add --helpdescribed--refas taking a tag, branch or commit. It becomesgit clone --branch, which does not accept a commit SHA, so the help text now says tag or branch. The README already said this.
0.10.2 #
Changed #
- Lockstep version bump to keep all Trellis SDK packages on a single shared version. No functional changes in this package.
0.10.1 #
Changed #
- Scaffolded projects now load HTMX 2.0.10 (was 2.0.8). The version, its Subresource Integrity hash, and the
<script>tag itself come from a single constant (src/templates/htmx_asset.dart) instead of being copy-pasted into each layout, so future bumps are one edit. HTMX 4 adoption is deferred — see ADR-011 for the version policy and its revisit trigger.
Fixed #
- The Relic scaffold's HTMX
<script>tag now carriesintegrityandcrossoriginattributes, matching the Shelf and Dart Frog scaffolds. Generated Relic projects previously loaded HTMX from the CDN without Subresource Integrity. Therelic_appandtodo_appexamples, which had the same gap, are SRI-pinned too, and a test asserts every example carries the current hash.
0.10.0 #
Changed #
trellis buildno longer prints Dart Sass's@importdeprecation warning. The generated theme bridge and theme partials deliberately use@import(the@usemigration is tracked as TD-006); the build now silences that one deprecation so build output stays clean. Other Sass warnings are unaffected.
Fixed #
trellis theme add/updatenow exit 1 with an actionable error message when git cannot be spawned (missing git, or any other spawn failure such asEACCES), instead of surfacing an uncaughtProcessExceptionstack trace.trellis theme add <local-path>now skips symlinks — printing aSkipped symlink:notice — instead of recursing into self-referential example scaffolding links (e.g.example/themes/<name> → ../..), which could otherwise recurse unboundedly.- Scaffolded themes (
trellis create --template theme) no longer include the retiredsyntax_highlightingparam (ADR-010); the generatedtheme.yamlnow declares the 18-param contract and highlighting is controlled viatrellis_site.yaml'shighlight:block.
0.9.1 #
Changed #
- Lockstep version bump to keep all Trellis SDK packages on a single shared version. No functional changes in this package.
0.9.0 #
Added #
trellis build --path-prefix <value>overrides the site'spathPrefix(sub-path) from the command line, for building a path-prefixed variant without editingtrellis_site.yaml.
Fixed #
trellis buildnow carriespathPrefixfromtrellis_site.yamlinto the build (it was dropped when the CLI reconstructed the config, so path-prefix builds silently produced root-absolute URLs).trellis buildnow compiles theme SASS for a theme referenced by a relativetheme:path that escapes the site directory (e.g.../../themes/arbor); the theme directory is normalized before the SASS scan, so such sites no longer build silently unstyled.theme_params: { skin: light | dark }now forces the corresponding palette. The SASS bridge imports the theme's_skins/_light.scss/_skins/_dark.scssbefore_theme_params.scss, so the skin's!defaultcolors win over the theme's light defaults.skin: auto(and unset) is unchanged — no skin import, byte-for-byte identical output. Previously the skin file was never imported, solight/darkwere dead config and onlyauto'sprefers-color-schemeblock had any effect.
0.8.2 #
Fixed #
trellis_cli --versionnow reports the correct version — the internal version constant had drifted from the package version (stuck at 0.8.0).
0.8.1 #
Changed #
- Lockstep version bump to keep all Trellis SDK packages on a single shared version. No functional changes in this package.
0.8.0 #
Changed #
- Version aligned to the unified Trellis SDK lockstep versioning scheme — all SDK packages now share a single version number and are released together. No functional changes since 0.3.0.
0.3.0 #
Added #
trellis themecommand group with five subcommands:add,update,list,info,remove.trellis theme add <url|path>installs themes from git URLs (shallow clone) or local paths, with optional--refpinning.trellis theme update [<name>]updates installed themes via git pull or pinned ref checkout, withmin_trellis_versioncompatibility warning.trellis theme listshows installed themes with active marker and versions.trellis theme info <name>displays manifest metadata and all params with current/default values.trellis theme remove <name>deletes theme directory, clearstheme:from config, warns about orphanedtheme_params:.trellis create --template themescaffolds a new theme project withtheme.yaml, layouts, SASS architecture, skins, and example preview site.- SASS bridge wiring:
trellis buildgenerates a bridge wrapper that imports_theme_params.scssbefore the theme's SCSS, ensuring merged params override!defaultdeclarations. - Theme SASS compilation from the theme's
sass/directory duringtrellis build.
Fixed #
trellis buildnow preservesthemeConfig,feeds, andsearchConfigwhen applying CLI overrides (previously dropped, breaking themed builds, feed generation, and search indexing).
0.2.0 #
Added #
trellis buildfor running the fulltrellis_sitestatic-site pipeline fromtrellis_site.yaml.trellis servefor previewing built output with clean URL handling.trellis create --template blogfor generating a Trellis blog starter with content, layouts, taxonomies, and styles.trellis create --template dart_frogfor generating a Dart Frog + Trellis + HTMX starter with file-based routing, security headers, CSRF protection, and hot reload.trellis create --template relicfor generating a Relic + Trellis + HTMX starter with explicit-engine wiring and counter fragment handling.
Changed #
- Expanded the starter lineup from the original Shelf scaffold to four documented templates:
htmx,blog,dart_frog, andrelic.
0.1.0 #
Added #
trellis create <project-name>for scaffolding a Shelf + Trellis + HTMX application.- Project-name validation for Dart naming rules and reserved words.
- Starter templates demonstrating template inheritance, HTMX fragments, security middleware, CSRF protection, and optional dev-mode live reload.
--helpand--versionCLI support.