Skip to content

feat: simplify create command - #13

Merged
louiss0 merged 7 commits into
mainfrom
feat/dev-command-and-simplified-create
Apr 16, 2026
Merged

louiss0 merged 7 commits into
mainfrom
feat/dev-command-and-simplified-create

Conversation

@louiss0

@louiss0 louiss0 commented Apr 16, 2026 •

Copy link
Copy Markdown
Owner

Changes

Simplified: create command

The create command now delegates directly to each package manager's native create command, replacing the complex create-<name> runner logic:

  • npm: npm create <args>
  • pnpm: pnpm create <args>
  • yarn: yarn create <args>
  • bun: bun create <args>
  • deno: deno init <args>

Removed: BuildCreateCommand, CreateAppSelector, CreateAppSearcher interfaces, --search/-s/--size flags, yarn version detection for create, and NewCreateAppSearcher/NewCreateAppSelector from Dependencies.


Conversation: https://app.warp.dev/conversation/8bf3eee3-7c18-4e08-837d-495385de9bae
Run: https://oz.warp.dev/runs/019d9435-59ff-70b2-80ae-864c0010785e

This PR was generated with Oz.

louiss0 and others added 2 commits April 16, 2026 03:07
- Add new 'dev' command (jpd dev) that runs the dev script with
  automatic dependency checks (auto-install via autoInstallDependenciesIfNeeded)
  - npm/pnpm: runs 'npm run dev [-- args]'
  - yarn/bun: runs 'yarn run dev [args]'
  - deno: runs 'deno task dev [args]'
  - Supports --no-volta flag to disable Volta integration

- Simplify 'create' command to delegate directly to each PM's own
  native create command, removing the complex create-runner logic:
  - npm:  runs 'npm create <args>'
  - pnpm: runs 'pnpm create <args>'
  - yarn: runs 'yarn create <args>'
  - bun:  runs 'bun create <args>'
  - deno: runs 'deno init <args>'
  - Removes BuildCreateCommand, CreateAppSelector, CreateAppSearcher,
    search flag (--search/-s/--size), and yarn version detection

- Update root.go: register NewDevCmd(), simplify NewCreateCmd() call,
  remove NewCreateAppSearcher/NewCreateAppSelector from Dependencies
- Update testutil/pkg.go: remove search-related mock deps
- Update tests: rewrite create tests for new behavior, add dev tests

Co-Authored-By: Oz <oz-agent@warp.dev>
Research confirms ALL package managers support a 'create' command:
- npm:    'npm create <args>'  (alias for npm init, runs create-* packages)
- pnpm:   'pnpm create <args>'
- yarn v1: 'yarn create <args>' (yarn invented create in 2017, npm copied it)
- yarn v2+: 'yarn create <args>'
- bun:    'bun create <args>'
- deno:   'deno create <args>' (added Feb 2026, aligns with other PMs)

Previously used 'deno init' which only scaffolds a blank project —
'deno create' is the correct equivalent for running create-* packages.

Test additions:
- create: add yarn v2+ test (was only testing v1)
- create: update deno test to use 'deno create'
- dev: add explicit yarn v1 test alongside existing yarn v2 test

Note: dev command tests already existed in the DevCommand Describe block
covering npm, pnpm, yarn v2, bun, and deno.

Co-Authored-By: Oz <oz-agent@warp.dev>
@louiss0
louiss0 marked this pull request as ready for review April 16, 2026 03:22
louiss0 and others added 2 commits April 16, 2026 03:24
Co-Authored-By: Oz <oz-agent@warp.dev>
- internal/alias.go: replace WriteString(fmt.Sprintf(...)) with
  fmt.Fprintf(&result, ...) on lines 52, 54, 76 (QF1012)
- testutil/pkg.go: replace dot import of ginkgo/v2 with named
  import; qualify DeferCleanup as ginkgo.DeferCleanup (ST1001)

Co-Authored-By: Oz <oz-agent@warp.dev>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4293875b94

ℹ️ 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".

Comment thread cmd/create.go
},
DisableFlagParsing: true,
Args: cobra.ArbitraryArgs,
Args: cobra.MinimumNArgs(1),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Re-enable passthrough parsing for create subcommand flags

NewCreateCmd now uses Cobra’s default flag parsing, so scaffold options like --template or --typescript are parsed as JPD flags and fail before delegation. That means common calls such as the command’s own example (jpd create next-app myapp --typescript) will return an unknown-flag error instead of reaching npm|pnpm|yarn|bun create, which is a functional regression from the previous passthrough behavior unless users add an extra -- separator.

Useful? React with 👍 / 👎.

louiss0 and others added 2 commits April 16, 2026 03:32
…o (QF1012)

Converted all remaining occurrences across GenerateZsh, GenerateFish,
GenerateNushell, and GeneratePowerShell to fmt.Fprintf(&result, ...).

Co-Authored-By: Oz <oz-agent@warp.dev>
Replace WriteString(fmt.Sprintf(...)) with fmt.Fprintf(&installReason, ...)
on lines 223 and 289 of autoInstallDependenciesIfNeeded.

Co-Authored-By: Oz <oz-agent@warp.dev>
@louiss0 louiss0 changed the title feat: add dev command and simplify create command feat: simplify create command Apr 16, 2026
Delete cmd/dev.go, unregister NewDevCmd from root.go, remove the
DevCommand Describe block from cmd_test.go, and restore the command
count to 11.

Co-Authored-By: Oz <oz-agent@warp.dev>
@louiss0
louiss0 merged commit ad03f05 into main Apr 16, 2026
11 checks passed
@louiss0
louiss0 deleted the feat/dev-command-and-simplified-create branch April 16, 2026 03:47
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.

1 participant