Why donate
API Explorer
Quasar CLI

Quasar CLI is the pride of Quasar Framework. You can seamlessly build:

  • a SPA (Single Page Application/Website),
  • a SSR (Server-side Rendered App/Website),
  • a PWA (Progressive Web App),
  • a BEX (Browser Extensions),
  • a Mobile App (through Cordova or Capacitor),
  • an Electron App

…within the same project folder, ensuring you are following the best Quasar practices while everything will simply work out of the box.

Trying Quasar CLI Online

You can try Quasar CLI online directly in the browser, without installing anything! You will also be able to use the command line, so it will be almost identical to creating a project locally.

Open in Stackblitz

TL;DR

Requirements:

  • Node.js v22+
  • PNPM v11+ (recommended), Yarn v1 classic, NPM or Bun

pnpm add -g @quasar/cli
pnpm create quasar@latest

Pick App with Quasar CLI.

View Components

Installation / Project Scaffolding

Requirements:

  • Node.js v22+ for Quasar CLI.
  • PNPM v11+ (recommended), Yarn v1 classic, NPM or Bun.
  1. Let’s create a Quasar app:


    pnpm create quasar@latest

    TIP

    You may be presented with a confirmation to install the create-quasar package, press the enter key to confirm.

  2. Pick the App with Quasar CLI option.

  3. Answer the rest of the questions and you’re almost done.

  4. Now, do you want to be able to run Quasar CLI commands directly (eg. quasar dev/build) or through your package manager (pnpm quasar dev/build or npx quasar dev/build, etc)?

    We strongly recommend to pick the first choice and be able to run commands directly. Actually, you’ll be able to do even more than just this (eg. “quasar upgrade” or “quasar serve” commands). For this, you’ll need to globally install the @quasar/cli package:


    pnpm add -g @quasar/cli

    TIP

    If you are using Yarn, make sure that the Yarn global install location is in your PATH:

    # in ~/.bashrc or equivalent
    export PATH="$(yarn global bin):$PATH"
    
    # for fish-shell:
    set -U fish_user_paths (yarn global bin) $fish_user_paths

    Under Windows, modify user's PATH environment variable. If you are using yarn then add `%LOCALAPPDATA%\yarn\bin`, otherwise if you're using npm then add `%APPDATA%\npm`.
    Or to do this easily, enter the following code in the terminal:
    # If you're using Yarn:
    setx path "%path%;%LocalAppData%\yarn\bin"
    
    # Or if you're using NPM:
    setx path "%path%;%AppData%\npm"

    WSL2

    Microsoft’s recommended Node.js development environment setup in WSL2.

    When using WSL2 (Windows Subsystem for Linux) Microsoft recommends keeping files in the linux file system to maximize performance. Projects will build around 3X slower and HMR (Hot Module Reload) will not work without a hack if the project files are on the Windows mount instead of the local linux file system. This is also true in Docker for Windows based development environments.

How Quasar CLI works

Quasar CLI (@quasar/cli) works in tandem with @quasar/app-vite. The first one is optional (but strongly recommended) and allows you to run Quasar CLI commands directly and some other useful commands like quasar upgrade (upgrade Quasar packages seamlessly) or quasar serve (serve your distributable with an ad-hoc webserver). The second package is the heart of it (runs the important commands - dev, build, inspect, info, describe etc) and it gets installed locally into every Quasar project folder.

Running without the global @quasar/cli

However, should you want independence of the globally installed @quasar/cli package, you have the possibility to directly run the Quasar CLI commands. It is @quasar/app-vite (which is specific to each project folder) that will run all the CLI commands.

Here are the options:

  1. You can write package.json scripts to run Quasar commands.

    Example of adding a few package.json scripts:

    /package.json

    "scripts": {
      "dev": "quasar dev",
      "build": "quasar build",
      "build:pwa": "quasar build -m pwa"
    }

    The above will allow you to run the scripts without the need of a globally installed @quasar/cli, should you wish to do so:

    Running scripts

    pnpm run dev
    pnpm run build
    # ..etc

  2. Alternatively, you can directly run the Quasar CLI commands through your package manager:


    pnpm quasar dev
    pnpm quasar inspect
    # ..etc

What next?

View Components