create-qauri
v0.2.2
Published
Create a new Qauri project with interactive prompts
Maintainers
Readme
create-qauri
Project scaffolding tool for Qauri.
Usage
# npm
npm create qauri@latest
# pnpm
pnpm create qauri
# yarn
yarn create qauriOptionally specify a project name:
npm create qauri@latest my-appWhat It Generates
The generator walks through an interactive wizard and produces a project that is already aligned with the current C++ runtime contract:
- explicit runtime boot for Python entry points
- numeric backend enums
- numeric boot mode protocol
- nested config structure under
app.windows,app.security, andwebview.newWindow.policy
Wizard choices include:
- project name
- native language: C++ or Python
- Python environment preferences for Python projects
- Qt version and path
- backend: WebView2, CEF, or Both
- frontend framework
- feature toggles such as DevTools and reload
- new-window behavior
- dependency installation
Generated Configuration
Generated src-qauri/qauri.config.json uses the current shape and numeric enums:
{
"productName": "My App",
"version": "0.1.0",
"identifier": "com.example.myapp",
"build": {
"beforeDevCommand": "npm run dev",
"beforeBuildCommand": "npm run build",
"devUrl": "http://localhost:5173",
"frontendDist": "../dist",
"backend": 1
},
"app": {
"windows": [
{
"label": "main",
"title": "My App",
"width": 1200,
"height": 800
}
],
"security": {
"allowedOrigins": [
"https://example.com"
]
}
},
"webview": {
"backendType": 1,
"newWindow": {
"policy": 1
}
}
}Numeric enum mapping:
backendType:0=auto,1=webview2,2=cefnewWindow.policy:0=smart,1=block,2=allow,3=browser,4=current
Python Projects
Generated Python entry files use explicit runtime boot:
from pyqauri import BootMode, QauriRuntime
QauriRuntime.boot(BootMode.DEV)There is no implicit boot path in generated templates.
build.python is omitted by default. Add it only if you need a non-default entry file or interpreter:
{
"build": {
"python": {
"entryFile": "main.py",
"executable": "D:/Python311/python.exe"
}
}
}Virtual environments should live at the project root:
cd my-qauri-app
python -m venv .venvGenerated Project Structure
my-qauri-app/
index.html
package.json
src/
src-qauri/
qauri.config.json
main.cpp / main.py
CMakeLists.txt
.gitignore
README.mdSupported Templates
Frontend frameworks:
- Vanilla
- Vanilla + TypeScript
- React
- React + TypeScript
- Vue
- Vue + TypeScript
- Svelte
- Svelte + TypeScript
Native languages:
- C++
- Python
Development
For repository development:
npm install
npm run build
npm testFor generated application development, use qauri-cli:
qauri dev
qauri build
qauri info