Vue CLI Installation
Install and use the Vue CLI to create new projects.
Vue CLI Installation is a free Vue Academy lesson on CoddyKit. This is lesson 1 of 3. Any 3 lessons of this learning path are free to read in full — after that, CoddyKit PRO unlocks every lesson, plus hands-on practice with a built-in code editor and a 24/7 AI tutor. It is part of the Vue Academy learning path, and your progress syncs across the web and the CoddyKit app. The Vue Academy course includes 3 lessons in total.
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.8Creating 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 promptChoosing 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 / FormatterRunning 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:8080Enter 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, PrettierRunning 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:5173Which 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.
Learn HTML with an AI tutor — free
Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.
- Courses
- 42
- Lessons
- 156
Frequently Asked Questions
Is the “Vue CLI Installation” lesson free?
Yes — any 3 lessons of the Vue Academy learning path, including “Vue CLI Installation”, are free to read in full here on the web. After that, CoddyKit PRO unlocks every lesson, plus interactive practice with a built-in code editor and a 24/7 AI tutor. The Vue Academy course includes 3 lessons in total.
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, so you can start here or from the beginning and move at your own pace. This is lesson 1 of 3.
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
- Vue CLI Installation
- Generated Project Structure
- CLI Configuration and Plugins