Skip to content

Grab init command#225

Merged
aidenybai merged 9 commits intomainfrom
cursor/grab-init-command-91b0
Mar 8, 2026
Merged

Grab init command#225
aidenybai merged 9 commits intomainfrom
cursor/grab-init-command-91b0

Conversation

@aidenybai
Copy link
Copy Markdown
Owner

@aidenybai aidenybai commented Mar 8, 2026

Add an environment-aware postinstall script to react-grab to guide users on running the init command after installation.


Open in Web Open in Cursor 


Summary by cubic

Add a CJS postinstall script to react-grab that prints a npx -y grab@latest init hint only in CI/automated runs. Expand the website Prompt tab with a full manual setup guide (Next.js App/Pages, Vite, TanStack Start, monorepos), a collapsible prompt with smooth, auto‑measured height animation and a top-right copy button, plus a CLI fallback.

Written for commit 1fda3a2. Summary will update on new commits.

Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
@cursor
Copy link
Copy Markdown

cursor bot commented Mar 8, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 8, 2026

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

Project Deployment Actions Updated (UTC)
react-grab-website Ready Ready Preview, Comment Mar 8, 2026 10:40am

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 8, 2026

Open in StackBlitz

@react-grab/cli

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/cli@225

grab

npm i https://pkg.pr.new/aidenybai/react-grab/grab@225

@react-grab/ami

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/ami@225

@react-grab/amp

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/amp@225

@react-grab/claude-code

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/claude-code@225

@react-grab/codex

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/codex@225

@react-grab/copilot

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/copilot@225

@react-grab/cursor

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/cursor@225

@react-grab/droid

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/droid@225

@react-grab/gemini

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/gemini@225

@react-grab/opencode

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/opencode@225

react-grab

npm i https://pkg.pr.new/aidenybai/react-grab@225

@react-grab/relay

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/relay@225

@react-grab/utils

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/utils@225

commit: 2e3f96a

Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
@aidenybai aidenybai marked this pull request as ready for review March 8, 2026 09:48
@pullfrog
Copy link
Copy Markdown
Contributor

pullfrog bot commented Mar 8, 2026

This run croaked 😵

The workflow encountered an error before any progress could be reported. Please check the link below for details.

Pullfrog  | Rerun failed job ➔View workflow run | Triggered by Pullfrogpullfrog.com𝕏

"OPENCODE",
"AMP_HOME",
"AMI",
];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicated environment variable list across two packages

Low Severity

The AUTOMATION_ENVIRONMENT_VARIABLE_NAMES list in postinstall.cjs is an exact duplicate of AGENT_ENVIRONMENT_VARIABLES in packages/cli/src/utils/is-non-interactive.ts. Both enumerate the same seven environment variable names for detecting automated environments. When a new provider is added, both lists need independent manual updates, risking drift between them.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/website/components/install-tabs.tsx">

<violation number="1" location="packages/website/components/install-tabs.tsx:67">
P2: The CLI fallback command in the prompt loses the user's custom hotkey configuration.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

6. Keep all React Grab setup development-only.
7. Show me the edited files and the exact install command you ran.
8. If the setup does not work, suggest running the React Grab CLI:
\`npx -y grab@latest init\`.`;
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 8, 2026

Choose a reason for hiding this comment

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

P2: The CLI fallback command in the prompt loses the user's custom hotkey configuration.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/website/components/install-tabs.tsx, line 67:

<comment>The CLI fallback command in the prompt loses the user's custom hotkey configuration.</comment>

<file context>
@@ -39,6 +39,34 @@ const formatInitOptions = (hotkey: RecordedHotkey): string => {
+6. Keep all React Grab setup development-only.
+7. Show me the edited files and the exact install command you ran.
+8. If the setup does not work, suggest running the React Grab CLI:
+\`npx -y grab@latest init\`.`;
+};
+
</file context>
Fix with Cubic

Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
6. Keep all React Grab setup development-only.
7. Show me the edited files and the exact install command you ran.
8. If the setup does not work, suggest running the React Grab CLI:
\`npx -y grab@latest init\`.`;
Copy link
Copy Markdown
Contributor

@vercel vercel bot Mar 8, 2026

Choose a reason for hiding this comment

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

The fallback CLI command in step 8 of the prompt doesn't include the custom hotkey (--key parameter) when one is configured

Fix on Vercel

@@ -0,0 +1,21 @@
const AUTOMATION_ENVIRONMENT_VARIABLE_NAMES = [
Copy link
Copy Markdown
Contributor

@vercel vercel bot Mar 8, 2026

Choose a reason for hiding this comment

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

The AGENT_ENVIRONMENT_VARIABLES array is duplicated between packages/cli/src/utils/is-non-interactive.ts and packages/react-grab/scripts/postinstall.cjs, creating a maintenance burden

Fix on Vercel

Copy link
Copy Markdown

@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.

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

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/website/components/install-tabs.tsx">

<violation number="1" location="packages/website/components/install-tabs.tsx:418">
P2: The `transition-[max-height]` class will not animate because CSS cannot interpolate to/from an undefined (none) `max-height`.

When `isPromptExpanded` becomes true, the `maxHeight` inline style is removed and the container snaps to full height instantly. To animate smoothly, transition to a specific large value (like `9999px`) or just remove the transition class if snapping is acceptable.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
@aidenybai aidenybai merged commit 4d7da6a into main Mar 8, 2026
16 checks passed
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.

2 participants