From bc013fde9f06c2f3802a37a59980f9b76d27a011 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Sat, 11 Jul 2026 13:39:37 -0500 Subject: [PATCH] docs: matcha README with usage and runtime detection Signed-off-by: Diego Resendez --- .gitignore | 1 + README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 README.md diff --git a/.gitignore b/.gitignore index ea8c4bf..0f987d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +.superpowers/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..73f5dfc --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# matcha + +The [green-tea](https://git.svc.zoit.services/Green-Tea/core) CLI — scaffold, run, and generate green-tea apps from a single native binary. No JS runtime required to install or operate. + +## Install + +```bash +cargo install matcha # or: brew install matcha (once published) +``` + +## Usage + +```bash +matcha new my-api # scaffold from the official starter +matcha new my-api --template-url gh:owner/repo # scaffold from any git template +matcha run # detect node/deno/bun and run in watch +matcha create controller Users # generate + auto-wire into @Module +matcha add sse # add a capability (sse|stream|buffer) to your controller +``` + +### The starter + +`matcha new ` (no flags) scaffolds a live app: it serves an `index.html` +with the green-tea logo and streams a rotating zen message over `@Sse('/zen')`. +Open the browser and it's already alive — `matcha run` boots it. + +### `create` / `add` auto-wiring + +`create` and `add` edit your TypeScript with tree-sitter: they insert imports +and wire pieces into the right `@Module` array or controller. Edits are +idempotent and revert themselves if they would break the file's syntax. Pass +`--check` to `create` to type-check with your project's runtime afterward. + +## Runtime detection + +`matcha run` picks the runtime by precedence, first match wins: + +1. `matcha.toml` — `runtime = "node" | "deno" | "bun"` +2. `deno.json` / `deno.jsonc` → **deno** +3. `bun.lockb` / `bun.lock` → **bun** +4. `package.json` → **node** + +Edge is a deploy target, not a `matcha run` target. + +## License + +MIT — same as the green-tea framework. Contributions require a DCO sign-off (`git commit -s`).