0Pricing
Vue Academy · Lesson

Vue CLI Installation

Install and use the Vue CLI to create new projects.

Vue CLI Installation is a free Vue Academy lesson on CoddyKit — lesson 1 of 3. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Vue Academy learning path, one of 3 lessons in the course, and your progress syncs across the web and the CoddyKit app.

What Is the Vue CLI?

The Vue CLI is the classic command-line tool for scaffolding and managing Vue projects.

  • Creates projects with sensible defaults
  • Manages build configuration through plugins
  • Built on top of webpack

It was the standard for years, though modern Vue now favors Vite.

Installing the Vue CLI Globally

Install the CLI globally so the vue command is available everywhere.

# Install globally with npm
npm install -g @vue/cli

# Verify the installation
vue --version
# @vue/cli 5.0.8

Creating a Project

Use vue create to scaffold a new project. You give it a project name.

# Create a new project
vue create my-project

# The CLI launches an interactive prompt

Choosing Presets

The CLI asks you to pick a preset:

  • Default gives Babel and ESLint, the quick path
  • Manually select features lets you add Router, Vuex, TypeScript, testing, and more

Presets can be saved and reused for future projects.

Manual Feature Selection

When you choose manual selection, you toggle the features you want.

# Example feature checklist
? Check the features needed for your project:
  (*) Babel
  ( ) TypeScript
  (*) Router
  (*) Vuex
  (*) CSS Pre-processors
  (*) Linter / Formatter

Running the Project

After creation, the CLI prints the commands to start your app.

# Move into the project
cd my-project

# Start the dev server
npm run serve

# App runs at http://localhost:8080

Enter Vite

Vite is the modern build tool created by the Vue team.

  • Uses native ES modules for instant startup
  • Lightning-fast Hot Module Replacement
  • Much faster than the webpack-based Vue CLI

Vite is now the recommended tool for new Vue projects.

Vite vs Vue CLI

How the two tools compare:

  • Vue CLI uses webpack, slower cold start, mature and configurable
  • Vite uses esbuild and native ESM, near-instant startup, the default going forward

Vue CLI is now in maintenance mode. Prefer Vite unless you maintain a legacy project.

npm create vue@latest

The official way to start a new Vite-powered Vue project is the create-vue tool.

# Scaffold a Vite + Vue project
npm create vue@latest

# Prompts for name and features:
#   TypeScript, JSX, Vue Router, Pinia,
#   Vitest, ESLint, Prettier

Running a create-vue Project

create-vue uses the standard Vite scripts.

# After scaffolding
cd my-vue-app
npm install
npm run dev

# Dev server: http://localhost:5173

Which Should You Use?

Guidance for choosing:

  • Starting fresh in 2024 or later? Use npm create vue@latest (Vite)
  • Maintaining an old project built with Vue CLI? Keep using it
  • Want the fastest dev experience? Vite wins

Quick Check

Test your understanding of Vue tooling choices.

Recap: Vue CLI Installation

You learned about Vue scaffolding tools:

  • Vue CLI installed with npm install -g @vue/cli
  • vue create scaffolds with presets
  • Vite is the modern, fast alternative
  • npm create vue@latest is the recommended modern start

Next: exploring the generated project structure.

Frequently asked questions

Is the “Vue CLI Installation” lesson free?

Yes — the full text of “Vue CLI Installation” is free to read here on the web, and the Vue Academy course includes 3 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Vue Academy course, upgrade to CoddyKit PRO.

What will I learn in “Vue CLI Installation”?

Install and use the Vue CLI to create new projects. You practise Vue Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Vue Academy?

No prior experience is required. Vue Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 3, so you can start here or from the beginning and move at your own pace.

How long does the “Vue CLI Installation” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Vue Academy lesson?

Yes. Every Vue Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Vue CLI Installation
  2. Generated Project Structure
  3. CLI Configuration and Plugins
← Back to Vue Academy