Create DeskForge App
Scaffold a new DeskForge project with create-deskforge-app.
Quick Start
The fastest way to create a new DeskForge project with a pre-configured setup.
# Using npx (recommended)
npx create-deskforge-app
# Or install globally
npm install -g create-deskforge-app
create-deskforge-appInteractive Setup
The CLI will guide you through an interactive setup process:
Rust Check
Verifies Rust is installed (required for Tauri). Offers to continue if not found.
Project Name
Enter your project name (default: "my-deskforge-app")
Project Scaffolding
Creates Vite + React + Tauri project structure automatically
Install Dependencies
Prompts to install npm dependencies with your package manager
Generated Project Structure
my-app/
├── src/
│ ├── main.tsx # React entry point
│ ├── App.tsx # Main App component
│ └── index.css # Global styles
├── src-tauri/ # Tauri configuration
│ ├── src/
│ │ ├── main.rs # Tauri main process
│ │ └── deskforge.rs # DeskForge runtime
│ ├── icons/
│ │ ├── icon.png # App icon
│ │ └── icon.ico # Windows icon
│ ├── Cargo.toml # Rust dependencies
│ ├── tauri.conf.json # Tauri app config
│ └── build.rs # Build script
├── public/
│ └── icon.png # Public icon
├── .github/
│ └── dependabot.yml # Dependency updates
├── deskforge.config.json # DeskForge configuration
├── package.json # Node dependencies
├── tsconfig.json # TypeScript config
├── tsconfig.node.json # Node TypeScript config
├── vite.config.ts # Vite config
├── index.html # HTML entry point
└── .gitignore # Git ignore rulesConfiguration File
The generated deskforge.config.json file:
{
"name": "my-app",
"author": "DeskForge User",
"version": "1.0.0",
"url": "http://localhost:1420",
"appId": "com.example.myapp",
"icon": "src-tauri/icons/icon.png",
"platforms": ["mac", "windows", "linux"],
"window": {
"width": 1200,
"height": 800,
"resizable": true,
"frame": true,
"transparent": false
},
"features": {
"autoUpdate": true,
"tray": false,
"menuBar": true,
"notifications": true,
"deepLinks": false
}
}Available Scripts
The generated project includes these npm scripts:
npm run devStart Vite dev server (web only)
npm run buildBuild web assets
npm run desktop:devStart Tauri development environment with HMR
npm run desktop:buildBuild desktop app for current platform
npm run lintRun ESLint
npm run previewPreview production build
Technology Stack
Frontend
- • React 18 - UI framework
- • TypeScript - Type safety
- • Vite 5 - Build tool
Desktop
- • Tauri 1 - Desktop framework
- • Rust - Native backend
- • @deskforge/cli - Build tool
- • @deskforge/runtime - Runtime utilities
Development Workflow
After creating your project, follow these steps:
1. Navigate to project
cd my-app2. Start development server
npm run desktop:devOpens a Tauri window with hot reload on port 1420
3. Build for production
npm run desktop:buildCreates production builds using Tauri
CLI Options
You can skip the interactive prompts by providing options:
You can provide the project directory and optional project ID as arguments:
# With project directory
npm create deskforge-app@latest my-app
# With project directory and DeskForge project ID
npm create deskforge-app@latest my-app proj_abc123Tip: If you don't provide a directory name, you'll be prompted to enter one interactively.
Prerequisites
Using DeskForge CLI
To build and publish your app to multiple platforms, use the @deskforge/cli:
# Install globally
npm install -g @deskforge/cli
# Initialize DeskForge configuration
deskforge init
# Build for multiple platforms
deskforge buildSee the CLI documentation for more details.
Troubleshooting
Rust not installed
If you see a warning about Rust not being detected, install it:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shThen restart your terminal and try again.
Build errors on macOS
If you encounter code signing issues:
# Install Xcode Command Line Tools
xcode-select --installBuild errors on Windows
Ensure you have:
- Visual Studio Build Tools
- Windows SDK
See Tauri prerequisites for detailed setup.
Latest version: 0.1.6
View on npm: create-deskforge-app