Skip to content

feat: codegen cli#102

Open
olliethedev wants to merge 19 commits intomainfrom
feat/codegen-init
Open

feat: codegen cli#102
olliethedev wants to merge 19 commits intomainfrom
feat/codegen-init

Conversation

@olliethedev
Copy link
Collaborator

@olliethedev olliethedev commented Mar 24, 2026

Summary

Type of change

  • Bug fix
  • New plugin
  • Feature / enhancement to an existing plugin
  • Documentation
  • Chore / refactor / tooling

Checklist

  • pnpm build passes
  • pnpm typecheck passes
  • pnpm lint passes
  • Tests added or updated (unit and/or E2E)
  • Docs updated (docs/content/docs/) if consumer-facing types or behavior changed
  • All three example apps updated if a plugin was added or changed
  • New plugin: submission checklist in CONTRIBUTING.md completed

Note

Medium Risk
Medium risk: introduces a new published CLI that generates/patches user project files and updates release automation, so regressions could affect scaffolding correctness and package publishing.

Overview
Introduces a new published scaffolding CLI: adds @btst/codegen (bin btst) with an interactive/non-interactive init command that generates framework-specific BTST files/routes for Next.js, React Router, and TanStack Start, patches global CSS imports, optionally patches layouts with QueryClientProvider, and installs required dependencies.

Adds delegated command surface: @btst/codegen generate/migrate now forward arguments to the existing @btst/cli via npx, including adapter-specific “run generate now” hints.

Hardens delivery + docs: updates release workflow to build/typecheck and publish @btst/codegen (and copy README into it), adds a PR-only GitHub Actions smoke test running an end-to-end init harness, updates docs to explain the split between @btst/codegen and @btst/cli, and bumps @btst/stack version to 2.10.0.

Written by Cursor Bugbot for commit be68327. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
better-stack-docs Ready Ready Preview, Comment Mar 24, 2026 10:05pm

Request Review

@github-actions
Copy link
Contributor

Shadcn registry validated — no registry changes detected.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

hash.update("\0");
}
process.stdout.write(hash.digest("hex"));
EOF
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated hash computation blocks in test script

Low Severity

The idempotency check contains two identical 37-line Node.js heredoc blocks that compute a SHA-256 hash of all project files. This duplicated inline script increases maintenance burden — a bug fix to the hashing logic would need to be applied in both places. Extracting the hash computation into a shared helper script or shell function would eliminate the duplication.

Additional Locations (1)
Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

btst init: @btst/codegen CLI tool

1 participant