Repository navigation
Polish the CLI and README from two QA rounds - #2
Conversation
Adopt rat-stack's lint fence ideas: a local oxlint plugin rejects manual Effect runners in test files, and no-restricted-imports keeps the cloudflare:workers env import in server/cloudflare.ts. The generated AGENTS.md gains a Tests section and a lifecycle rule; decision 0003 records what was adopted and deferred.
Take two rules from Ultracite's oxlint preset after measuring it on a generated stack. Fix what they found in the templates: FormEvent becomes SubmitEvent, and async React handlers are wrapped as () => void fn().
From a hands-on QA pass of create and add: - Prompts without a terminal (CI, pipes, npm eating flags) fail with the exact flag to pass instead of hanging. - Ctrl-C exits 130; stopping during setup says what is left to run. - pnpm is checked before any prompt; a failed install lists the steps that remain. Unsupported Node versions get a warning; missing git skips git. - The name prompt rejects an occupied directory and asks again. A directory holding only .git counts as empty, and `.` scaffolds in place. - Incompatible flags say why (auth needs a database, ...); unknown values say unknown. --json reports errors as JSON. Duplicate extras are dropped. - The install shows its latest output line and every step its duration; in CI or a pipe, steps print one line each without spinner frames. - create ends with next steps for the stack (docker, db:migrate, Alchemy). - add gets the same chrome: a change summary (+ new, ~ edited), warnings for removed files, replaced scripts and a dirty tree, the new env vars, and ids that are case-insensitive with a did-you-mean. - add explains which ids to add together (database + ORM + auth). - New `efforge list` shows every add-on and marks what a project has. - Help shows examples.
- README: the bare install command first, a VHS recording of create and add (tape committed next to the GIF), the differentiators as four bullets, the stack table, an "Add more later" section for add/list. Limits moved to docs/limits.md. - docs/cli.md: `.`, CI and scripting (no-TTY behaviour, exit codes, JSON errors), `efforge list`, and the new `add` output. - The generated README explains the database setup before `pnpm dev`. - add skips `pnpm install` when no dependencies changed; Alchemy next steps leave out D1 migrations, which still need wrangler.jsonc.
- Ctrl-C during a step now exits 130 with recovery steps. clack's spinner put stdin in raw mode and called process.exit(0) on Ctrl-C, skipping cleanup; steps use a small spinner of our own that leaves SIGINT alone. - The stop message says whether files were written and what remains. - add infra/alchemy compares wrangler.jsonc as data and comments, so edits by earlier adds no longer read as user edits (regression test added). - add prints docker/db:migrate when it adds a database, wraps env var descriptions instead of cutting them, lists replaced scripts one per line, checks for pnpm before writing, and reports unknown ids as UnknownAddon with prefix-first suggestions. Hints no longer suggest two ORMs or blame orm/none. - create: dry runs warn about a non-empty target and print `.` for in-place runs; reasons replace the redundant Options list; npm-reserved names are refused. - list: full descriptions when piped, errors on a missing --cwd. - EPIPE on stdout/stderr exits quietly.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
release.yml runs on v* tags: checks the tag against package.json, runs the unit checks, publishes with npm trusted publishing (OIDC, provenance, no token) and creates the GitHub release from the CHANGELOG section. CONTRIBUTING documents the release steps.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9f4edf373
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const io = input.json | ||
| ? { ...live, step: <A, E, R>(_: string, eff: Effect.Effect<A, E, R>) => eff } | ||
| : live |
There was a problem hiding this comment.
Silence tasks as well in JSON mode
When add --json installs a dependency-changing add-on, this override silences only step; the later io.task("Installing dependencies…") still uses the live implementation and writes progress to stdout before the JSON result. That makes successful output from cases such as adding auth or AI invalid JSON for callers to parse, so JSON mode needs to replace task with a silent passthrough too.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in fd29a1c. In this version --json actually returned before the install, so add --json skipped pnpm install and the route tree altogether. JSON mode now silences both step and task, runs them, then prints the JSON. Test added: add --json still installs, and stdout stays one JSON document.
--json returned before the install step, so it never ran pnpm install or regenerated the route tree. It now runs both with step and task silenced, then prints the result as the only output. Found in review.
Two rounds of hands-on QA of
createandadd(real terminal sessions, CI/pipe mode, every flag), plus README research across similar CLIs.CLI
process.exit(0)on Ctrl-C, so steps now use a small spinner that leaves SIGINT alone..scaffolds in place.pnpm db:migrate, Alchemy).add: a+/~change summary, warnings for removed files, replaced scripts and a dirty tree, the new env vars, install only when dependencies changed.efforge list;--jsonerrors as JSON; help examples; EPIPE handled.add infra/alchemyafter earlier adds no longer reports a false edit towrangler.jsonc(regression test).Docs
.github/assets/demo.tape); limits moved todocs/limits.md;docs/cli.mdcovers CI use, exit codes andlist.Also includes the two unreleased lint commits already on local
main.Verified:
pnpm check, 227 unit tests, real generated projects passpnpm checkafter create and afteradd.