Repository navigation
Description
Description
As a developer using Vite+, I want a dedicated vp init command so that I can initialize a project in the current directory with a familiar, intuitive interface — similar to cargo init, npm init, or go mod init.
Currently, initializing a project in the current directory requires vp create [template] --directory ., which is functional but less discoverable. A dedicated vp init subcommand would improve the developer experience by matching established CLI conventions.
This is a follow-up to #1077 (vp create --directory . support) and #1097 (the PR that implemented it). Now that --directory . works correctly, the next step is to expose this as a first-class vp init command.
Suggested solution
- Add
vp init [template]as a new subcommand that internally delegates tovp create [template] --directory . - No code duplication — reuse the existing create logic with
--directory .injected - Without a template argument, show the interactive template selection prompt (same as
vp create) - Block
vite:monorepotemplate and guide users to usevp createinstead, sinceinitis intended for single-project initialization in the current directory - All existing
vp createflags (e.g.,--no-interactive,--package-manager,--agent,--editor) should be forwarded as-is
Alternative
Keep only vp create --directory . without introducing a new command. This works but is less discoverable and doesn't match the conventions of other popular CLI tools.
Additional context
vp create --directory .support was added in feat(create): support creating project in current directory #1097, which auto-derives the package name from the current directory name- This proposal only adds the
vp initentry point; it does not change any existingvp createbehavior
Validations
- Read the Contributing Guidelines.
- Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- Check that there isn't already an issue requesting the same feature.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Start date
Target date
Effort
Activity
fengmk2 commentedon Mar 29, 2026
Haven't figured out the purpose of the
vp initcommand yetjong-kyung commentedon Mar 29, 2026
Understood, thanks for the feedback!
cpojer commentedon Mar 30, 2026
I think for the most part, people will want to use
vp createto create a new project, orvp migrateto migrate an existing one. Then they can dovp createwithin a monorepo to add more apps/libraries. For the narrow use case of using an empty folder to init a project, the use case in the title works for now.