Skip to content

Add vp init command as alias for vp create -directory . #1192

Closed

Description

@jong-kyung

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 to vp 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:monorepo template and guide users to use vp create instead, since init is intended for single-project initialization in the current directory
  • All existing vp create flags (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

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.

Activity

  1. fengmk2 commented on Mar 29, 2026

    @fengmk2
    Member

    Haven't figured out the purpose of the vp init command yet

  2. jong-kyung commented on Mar 29, 2026

    @jong-kyung
    CollaboratorAuthor

    Understood, thanks for the feedback!

  3. cpojer commented on Mar 30, 2026

    @cpojer
    Member

    I think for the most part, people will want to use vp create to create a new project, or vp migrate to migrate an existing one. Then they can do vp create within 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.

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

Metadata

Metadata

Assignees

Fields

Priority

None yet

Start date

None yet

Target date

None yet

Effort

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions