create-deskforge-app
v0.1.6
Published
Create a new DeskForge app
Readme
create-deskforge-app
Creates a Tauri application with @deskforge/cli and @deskforge/runtime pre-installed.
Overview
Scaffold a new DeskForge desktop application with React, Vite, Tauri, and DeskForge runtime utilities.
Installation
Install globally via npm:
npm install -g create-deskforge-appOr use with npx without installing:
npx create-deskforge-appQuick Start
1. Create a new project
npx create-deskforge-app my-app
cd my-appOr run interactively:
npx create-deskforge-app2. Install dependencies
npm install3. Start development
npm run desktop:devThis will:
- Start the Vite dev server
- Launch the Tauri development window
- Enable hot module replacement (HMR)
- Auto-reload on file changes
4. Build for production
npm run desktop:buildThis creates optimized desktop app binaries for your platform.
Project Structure
my-app/
├── src/
│ ├── main.tsx # React entry point
│ ├── App.tsx # Main App component
│ ├── App.css # App styles
│ └── index.css # Global styles
├── src-tauri/ # Tauri configuration
│ ├── tauri.conf.json # Tauri app config
│ ├── src/
│ │ └── main.rs # Tauri main process
│ └── icons/ # App icons
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Project dependencies
└── index.html # HTML entry pointAvailable Scripts
npm run dev- Start Vite dev server (web only)npm run build- Build web assetsnpm run desktop:dev- Start Tauri development environmentnpm run desktop:build- Build desktop app for current platformnpm run lint- Run ESLintnpm run preview- Preview production build
Prerequisites
Required
Optional
- Cargo (comes with Rust) - for building Tauri apps
- Git - for version control
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.
Using DeskForge CLI
To build and publish your app to multiple platforms, use the @deskforge/cli:
npm install -g @deskforge/cli
deskforge init
deskforge buildSee @deskforge/cli documentation for more details.
Technology Stack
- React 18 - UI framework
- Vite 5 - Build tool
- TypeScript - Type safety
- Tauri 1 - Desktop framework
- Rust - Native backend
Resources
License
MIT
Support
For issues or questions:
