`install.sh` asked the release API for the latest tag. That API allows 60 requests an hour per IP without a token, which one office behind a NAT or a CI runner exhausts — and a throttled response has no `tag_name`, so the installer reported "could not resolve latest release tag" and gave no hint that rate limiting was the cause. It now follows the `/releases/latest` redirect, which carries no such limit and which Gitea implements identically, and keeps the API as the fallback for the wget path that cannot read the effective URL. Verified against the real release: resolves v26.8.0-beta.0, verifies the checksum, and the installed binary runs. Releases with a hyphen in the tag are now flagged as prereleases. Nothing set the flag, so every beta answered `/releases/latest` — the very thing the installer resolves by default. That is harmless while every release is a beta and wrong the moment a stable one exists, because the next beta published after it would silently displace it for everyone installing without MATCHA_VERSION. `test_install.sh` has existed since the installer landed and no workflow ever ran it — the same shape as the starter gap: a check that exists, passes, and guards nothing. CI runs it now on Linux and macOS with shellcheck alongside, and it covers a third case, since the branch this commit changes fails by producing a message: an unresolvable `latest` must name MATCHA_VERSION and must leave no binary behind. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
9.8 KiB
Changelog
All notable changes to matcha-cli are documented here.
The format follows Keep a Changelog.
matcha uses calendar versioning: YY.M.PATCH — the month is not zero-padded, matching
green-tea's convention. The CLI ships on its own version line: matcha 26.8 does not
mean @green-tea/core 26.8, and the two release independently. The core version a scaffold
is pinned to is CORE_VERSION in src/template.rs, and each entry below says when it moved.
Unreleased
Added
-
matcha graphandmatcha explain <pattern>. green-tea derives execution order from what each node declares itneedsandprovides, which makes the graph a real artifact rather than a diagram someone drew — and the CLI could not draw any of it, thoughtoMermaid,toDOT,graphandexplainhad been exported all along.graphprints Mermaid, Graphviz DOT or the rawGraphView(--format,--out);explainprints one route's chain in execution order with each node's needs and provides.Both import the app and call
app.ready(), which resolves the graph and is documented as deliberately not running provider factories — asking for a diagram must not open your database connections.explaintakes the route pattern as declared (/users/:id, not/users/42), and a miss lists the patterns that are registered. -
matcha doctor— the misconfigurations that fail confusingly rather than loudly:experimentalDecoratorsmissing, which turns every@Routeinto a syntax error that blames the decorator; a core pin that cannot resolve, or that does not match what is installed; an entry that does not exportapp; and@Wsor multipart routes whose lazy-loaded peer dependency is absent, which compile and then fail at the first request. Every check is a file read — no runtime spawned, nothing fetched — so it works before the project installs. Exits non-zero on a failure. -
matcha new --runtime edge— a Cloudflare Worker:wrangler.tomlwithnodejs_compat,edgeHandler(app)as the default export, and wrangler's[assets]serving./public, so/is the same page as on the other three runtimes and/zenthe same stream from the worker.matcha runiswrangler dev, which boots real workerd, so edge stops being a deploy-only target. Detection putswrangler.tomlahead ofpackage.json, since an edge project has both.Core is installed from JSR on this runtime alone. The npm ESM build carries tsup's
createRequire(import.meta.url)banner at module scope andimport.meta.urlis undefined on workerd, so@green-tea/core/edgefrom npm throws before any of its own code runs (green-tea#93). The scaffolded.npmrcsays so; it and the alias can both go once that is fixed. -
matcha add wsandmatcha add upload, and--controller <path>.addused to refuse outright when a project had more than one controller; it still declines to guess, but it lists the candidates and the flag picks. Both new capabilities name the optional peer dependency they need on success — core lazy-requireswsandbusboy, so a missing one is an error at the first request rather than at boot, and the moment to mention it is when the handler is written. -
scripts/starter-smoke.sh— scaffolds, installs, type-checks, boots, curls/and the/zenstream, introspects, and adds every capability, per runtime. CI runs it on a matrix of all four, and a weekly job fails when the scaffold's core pin falls behind thebetadist-tag.
Changed
-
The scaffold composes its graph in
src/app.ts.src/main.tsnow holds only the runtime's serve call and imports the app from it. The split is what letsgraph,explainanddoctorread an application without binding a port.create modulefollows, preferringsrc/app.tsand falling back tosrc/main.tsso projects scaffolded before the split keep working. -
add ssegenerates a resumable stream. The stub predates green-tea 26.9: it yielded bare values, so anEventSourcereconnect restarted the iterable from its beginning and lost the gap in silence. It now tags each event withsse(data, { id })and reads@header('last-event-id')to resume from it. -
add bufferdemonstrates@Transformer. It used to returnBuffer.from('hello'), which is not what the capability's name means — "buffer" is the transport, the whole response at once — and never worked:TransformerFnreturnsbody: stringand the defaultJsonTransformerisJSON.stringify, so the route answered{"type":"Buffer","data":[104,...]}. It now shapes atext/csvresponse through the extension point that actually governs one. -
Types in a decorated signature are imported with
import type.wire's import handling became type-aware in both directions: merging a value symbol into animport typeline would erase the decorator at runtime, and merging a type into a value line is TS1272 underisolatedModuleswithemitDecoratorMetadata— which node's and bun'stscaccept and Deno rejects, so the same generated handler compiled on two runtimes and failed on the third.
Fixed
-
The scaffold no longer pins
@green-tea/coretwo releases behind. Every runtime overlay carried^26.7.0-beta.0. Core is prerelease-only, and npm's semver excludes a prerelease from any range whose comparators carry a differentmajor.minor.patch— so that caret was not a loose pin but a pin to the oldest matching prerelease that nothing could move off. Every projectmatcha newproduced since July installed 26.7.0-beta.0 and could not upgrade to it: no logger, no request budget, no resumable@Sseid, and none of the crashes 26.9 fixed. The pin is exact now, lives in oneCORE_VERSIONconstant, and the scaffold is on 26.9.0-beta.1. -
The Deno scaffold resolves core through JSR rather than
npm:. JSR is core's native path for Deno and the one green-tea 26.9 repaired; the npm build'screateRequirebanner never existed there, which is what used to break@Htmland multipart at boot. -
The bun scaffold type-checks. Its
tsconfig.jsondeclared no Bun types, soBun.servewasTS2868: Cannot find name 'Bun'— meaningtsc --noEmit, and thereforematcha create --check, failed on every bun project the CLI has ever scaffolded. -
install.shresolveslatestwithout the release API. The API is rate-limited to 60 requests an hour per IP unauthenticated — an office behind one NAT or a CI runner burns through it — and a throttled response carries notag_name, so the installer failed with "could not resolve latest release tag" and no hint of the cause. It now follows the/releases/latestredirect, which has no such limit and which Gitea implements the same way, keeping the API as the fallback for the wget path. The error that remains names the rate limit and points atMATCHA_VERSION. -
A beta release is flagged as a prerelease. Nothing set the flag, so every beta answered
/releases/latest— which is whatinstall.shresolves when noMATCHA_VERSIONis given. Harmless while every release is a beta, and wrong the moment a stable one exists: the next beta published after it would displace it for everyone installing with the default. -
CI runs
test_install.sh. It has existed since the installer landed and no workflow ever ran it. It now runs on Linux and macOS, withshellcheckalongside, and covers a third case: an unresolvablelatestmust explain itself and install nothing. -
MITis a file, not just a manifest field.Cargo.tomldeclaredlicense = "MIT"and the published crate carried no license text. Added along with theDCOthe README has been requiring sign-off against, and aCONTRIBUTING.mdsaying how.
26.8.0-beta.0 - 2026-08-07
Added
- Publishing to crates.io via OIDC Trusted Publishing — no token in CI.
Changed
- The crate is
matcha-clion crates.io (the namematchawas taken); the installed binary staysmatcha, socargo install matcha-clistill gives youmatcha. Two-forge CI/CD: Gitea is origin, GitHub is the public mirror that release tags are promoted to.
Fixed
- The README's install paths point at hosts that actually resolve.
26.7.0 - 2026-07-13
First tagged release. A single native binary, no JS runtime needed to install it.
Added
matcha new— scaffolds from an embedded starter that is alive on first boot: it serves anindex.htmland streams a rotating zen message over@Sse('/zen').--runtimepicks node (the default), deno or bun through a shared template plus a per-runtime overlay;--template-urlscaffolds from any git template, with agh:owner/reposhorthand.matcha run— detects the runtime and spawns it in watch mode. Precedence, first match wins:matcha.toml, thendeno.json, then a bun lockfile, thenpackage.json.matcha create <controller|step|provider|module>— generates the piece and wires it in with tree-sitter: imports merge into an existing brace rather than adding a second binding for the same module, and an edit that would break the file's syntax reverts itself instead of being written.--checktype-checks afterwards with the project's own runtime.matcha add <sse|stream|buffer>— appends a capability handler to the controller, idempotent per capability.- A
curl | shinstaller with sha256 verification, and cross-platform binaries attached to each release.