---
source: https://iinventedlight.com/library/notes/vite-cli.md
title: "The Vite CLI starts the dev server and aliases vite dev and vite serve"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (vitejs/vite docs and source); prose restates cited source lines in own words"
license_family: vite-mit
attribution: "Summary by iinventedlight (AI-assisted). Sources: Vite docs and Vite source (vitejs/vite), MIT. Notices: Vite documentation and source (vitejs/vite): Copyright (c) 2019-present, VoidZero Inc. and Vite contributors; MIT (https://raw.githubusercontent.com/vitejs/vite/main/LICENSE)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-11
status: published
approved_by: "Cole Withington, 2026-11-11 09:59 PT, Librarian chat widget t34s5: \"Yes, publish all 25 Angular and Vite drafts\""
checked_on: 2026-11-11
as_of: 2026-11-11
confidence: medium
untested: "No project was run for this note; only the fetched documentation and source files were read."
category: coding-references
topic_area: "code-web: Vite CLI"
tags: [vite, cli, dev-server, build]
client: Librarian
sources:
  - id: S1
    title: "Command Line Interface"
    publisher: Vite docs
    url: https://vite.dev/guide/cli
    accessed: 2026-11-11
    license: "MIT"
  - id: S2
    title: "CLI"
    publisher: Vite source
    url: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/cli.ts
    accessed: 2026-11-11
    license: "MIT"
---
# vite, vite dev, and vite serve all start the development server

**Answer:** The vite command starts a dev server in the current directory. The names vite dev and vite serve are aliases of that same command. The CLI also exposes options such as `--host`, `--port`, `--open`, `--cors`, `--strictPort`, and `--force`. `--force` makes the optimizer ignore its cache and re-bundle.

The same CLI surface is used for production (`vite build`) and for locally previewing a production build (`vite preview`).

## In source

The CLI is created with cac('vite'). The default command is described as "start dev server". The command is called serve in Vite's API. Another alias is dev, to align with the script name.

## See also

- [vite-dev-server-and-build](https://iinventedlight.com/library/notes/vite-dev-server-and-build/)
- [vite-production-build](https://iinventedlight.com/library/notes/vite-production-build/)

## Claims

- id: C1
  claim: vite starts the dev server; vite dev and vite serve are aliases.
  source: S1
  evidence: "`vite dev` and `vite serve` are aliases for `vite`."

- id: C2
  claim: --force makes the optimizer ignore the cache and re-bundle.
  source: S1
  evidence: "Force the optimizer to ignore the cache and re-bundle"

- id: C3
  claim: The CLI is created with cac('vite').
  source: S2
  evidence: "const cli = cac('vite')"

- id: C4
  claim: The default command starts the dev server and is aliased as dev.
  source: S2
  evidence: ".command('[root]', 'start dev server')"

## Sources

- [S1] Command Line Interface. Vite docs. https://vite.dev/guide/cli . License: MIT. Accessed 2026-11-11.

- [S2] CLI. Vite source. https://github.com/vitejs/vite/blob/main/packages/vite/src/node/cli.ts . License: MIT. Accessed 2026-11-11.


License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources and notices: Vite documentation and source (vitejs/vite): Copyright (c) 2019-present, VoidZero Inc. and Vite contributors; MIT (https://raw.githubusercontent.com/vitejs/vite/main/LICENSE). Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
