Skip to content

fix(@typegpu/cli): show install output and don't auto-start dev server#2546

Closed
zichen0116 wants to merge 2 commits into
software-mansion:mainfrom
zichen0116:fix/cli-ergonomic-tweaks
Closed

fix(@typegpu/cli): show install output and don't auto-start dev server#2546
zichen0116 wants to merge 2 commits into
software-mansion:mainfrom
zichen0116:fix/cli-ergonomic-tweaks

Conversation

@zichen0116
Copy link
Copy Markdown

What

Two ergonomic improvements to the tgpu create command:

  1. Show installation output: Replace the spinner-based pmInstall with interactive mode so users can see npm/pnpm install progress instead of staring at a spinner with no feedback.

  2. Don't auto-start dev server: Replace the combined "Install with X and start now?" prompt with just "Install dependencies with X?". After scaffolding (and optional install), always show the next steps so users know what to do without the CLI hijacking their terminal.

Why

  • When running tgpu to create a new project, the installation step shows a spinner but no actual output, leaving users wondering if anything is happening.
  • The current flow auto-starts the dev server (pnpm dev) which takes over the terminal. Users should be told what to do next instead.

Changes

packages/typegpu-cli/src/utils/pm.ts

  • pmInstall: Replaced spinner wrapper with p.log.step() + interactive runCommand call so install output is visible to the user

packages/typegpu-cli/src/create.ts

  • Changed prompt from "Install with X and start now?" to "Install dependencies with X?"
  • Removed auto-start of dev server (pmRun(pm, ['dev']))
  • Always show next-step instructions in the outro, adjusting based on whether install was run
  • Removed unused pmRun import

Fixes #2544

Copilot AI review requested due to automatic review settings May 24, 2026 23:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the @typegpu/cli project creation flow to improve UX by making dependency installation output visible and preventing the CLI from auto-starting the dev server after scaffolding.

Changes:

  • Switch pmInstall to an interactive runCommand invocation so install progress/output is shown.
  • Update the create flow prompt to only ask about installing dependencies (no auto-start).
  • Always display “next steps” instructions after scaffolding, tailored based on whether install was run.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/typegpu-cli/src/utils/pm.ts Makes pmInstall run interactively and logs install start/success instead of using a spinner.
packages/typegpu-cli/src/create.ts Adjusts prompts, removes dev-server auto-start, and prints next-step instructions after scaffolding.
Comments suppressed due to low confidence (1)

packages/typegpu-cli/src/create.ts:64

  • When the project directory is . (current directory), cdPath becomes an empty string, but this branch will still print cd ${cdPath}. That results in a broken instruction (cd with no target). Only include the cd ... line when cdPath is non-empty.
  if (!shouldInstall && installCmd) {
    msg += `   cd ${cdPath}\n`;
    msg += `   ${installCmd.command} ${installCmd.args.join(' ')}\n`;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/typegpu-cli/src/utils/pm.ts Outdated
Comment thread packages/typegpu-cli/src/create.ts Outdated
Two ergonomic improvements to the create command:

1. Show installation output: Replace the spinner-based pmInstall with
   interactive mode so users can see npm/pnpm install progress instead
   of staring at a spinner with no feedback.

2. Don't auto-start dev server: Replace the combined 'Install with X
   and start now?' prompt with just 'Install dependencies with X?'.
   After scaffolding (and optional install), always show the next steps
   so users know what to do without the CLI hijacking their terminal.

Fixes software-mansion#2544
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@iwoplaza iwoplaza force-pushed the fix/cli-ergonomic-tweaks branch from 6c504ab to d5d5206 Compare May 25, 2026 08:05
Copy link
Copy Markdown
Collaborator

@iwoplaza iwoplaza left a comment

Choose a reason for hiding this comment

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

Thanks! 🤖

@iwoplaza iwoplaza closed this May 25, 2026
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.

fix(@typegpu/cli): Ergonomic tweaks

3 participants