Create App

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-app

Interactive Setup

The CLI will guide you through an interactive setup process:

1

Rust Check

Verifies Rust is installed (required for Tauri). Offers to continue if not found.

2

Project Name

Enter your project name (default: "my-deskforge-app")

3

Project Scaffolding

Creates Vite + React + Tauri project structure automatically

4

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 rules

Configuration 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 dev

Start Vite dev server (web only)

npm run build

Build web assets

npm run desktop:dev

Start Tauri development environment with HMR

npm run desktop:build

Build desktop app for current platform

npm run lint

Run ESLint

npm run preview

Preview 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-app

2. Start development server

npm run desktop:dev

Opens a Tauri window with hot reload on port 1420

3. Build for production

npm run desktop:build

Creates 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_abc123

Tip: If you don't provide a directory name, you'll be prompted to enter one interactively.

Prerequisites

Required

Optional

  • • Cargo (comes with Rust) - for building Tauri apps
  • • Git - for version control

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 build

See 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 | sh

Then restart your terminal and try again.

Build errors on macOS

If you encounter code signing issues:

# Install Xcode Command Line Tools xcode-select --install

Build 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