npm package: @qauri/cli
Description: Complete CLI toolchain for Qauri projects - create, develop, and build
Author: Qauri Team
Latest version: 0.2.0

# qauri-cli

Complete CLI toolchain for [Qauri](https://github.com/popo-studio/qauri) projects. Create, develop, and build desktop applications with Qt and modern web technologies.

## Quick Start

### Create a new project

```bash
# npm (recommended)
npm create qauri@latest

# pnpm
pnpm create qauri

# yarn
yarn create qauri
```

This will launch an interactive wizard to configure your project.

### Use the full CLI

Install globally for project development:

```bash
npm install -g qauri-cli
```

Or use in your project:

```bash
npm install -D qauri-cli
```

## Commands

### `create` - Create a new project

```bash
# Interactive mode
npm create qauri@latest

# Or use the full CLI
qauri create [project-name]
```

### `dev` - Start development server

```bash
qauri dev

# Options
qauri dev --no-app    # Only start dev server without native app
```

Starts the Vite dev server and launches your native application.

### `build` - Build for production

```bash
qauri build

# Options
qauri build --release    # Build in release mode
```

Builds the frontend and compiles the native application.

### `info` - Display project information

```bash
qauri info
```

Shows project configuration and detected environment versions (Python, Qt, etc.).

## What it does

The CLI walks you through an interactive wizard to configure your project:

1. **Project name** — validates naming conventions
2. **Native language** — C++ or Python
3. **Python package manager** — pip or uv (if Python selected)
4. **Python version** — 3.9, 3.10, 3.11, 3.12 (auto-detected)
5. **Qt version** — 6.5.3, 6.9.2 (auto-detected)
6. **Backend** — WebView2 (Windows), CEF (cross-platform), or Both
7. **Frontend framework** — Vanilla, React, Vue, or Svelte (with TypeScript variants)
8. **Features** — DevTools (F12), Reload (F5), Command Whitelist, Examples
9. **New window behavior** — Block, Browser, or New Window
10. **Install dependencies** — Automatically run npm install

Then generates a complete project structure:

```
my-qauri-app/
├── index.html
├── package.json
├── vite.config.js
├── src/                    # Frontend source
│   └── ...
├── src-qauri/              # Native code
│   ├── qauri.config.json
│   ├── main.cpp / main.py
│   └── CMakeLists.txt      # (C++ only)
├── .gitignore
└── README.md
```

## CLI Flags

Skip prompts by passing project name directly:

```bash
npm create qauri@latest my-app
qauri create my-app
```

All configuration is done through interactive prompts for better UX.

## Supported Templates

### Frontend Frameworks
- Vanilla / Vanilla + TypeScript
- React / React + TypeScript
- Vue / Vue + TypeScript
- Svelte / Svelte + TypeScript

All templates use Vite as the build tool and include `@qauri/api` for JS↔Native communication.

### Native Languages
- **C++** — CMake project linking Qt6 and qauri
- **Python** — PySide6 + pyqauri, with uv or pip environment setup

## Development

```bash
# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Type check
npm run type-check
```