Create Your First Nimi App
Welcome to Nimi App development! With Nimi's developer tooling, you can quickly scaffold, build, and run modern desktop applications that combine host-managed access with local and cloud AI capabilities.
This tutorial walks you through scaffolding a project with App Tools, configuring SDK and Kit dependencies, and running your app inside Desktop's supervised development environment.
1. Scaffold the Project
Open your terminal, navigate to your workspace directory, and run the scaffold command:
# Using the published App Tools package (choose a published version matching your host):
pnpm dlx --package @nimiplatform/app-tools nimi-app create \
--dir my-nimi-app \
--profile standalone \
--features studio-create \
--app-id example.app \
--title "My Nimi App" \
--package-name my-nimi-app \
--author "Your Name"
# Or using local package archives (in source monorepo environments):
pnpm dlx --package=file:./nimi-packages/nimiplatform-app-tools-0.13.0.tgz nimi-app create \
--dir my-nimi-app \
--profile standalone \
--features studio-create \
--app-id example.app \
--title "My Nimi App" \
--package-name my-nimi-app \
--author "Your Name"Move into your new project directory:
cd my-nimi-appParameter Breakdown
--profile standalone: Generates a standalone single-app project structure.--features studio-create: Configures creative AI capabilities and declares the requiredruntime.consumepermission, allowing your app to request text and multimodal generation through the local Runtime.--app-id: A globally unique reverse-domain identifier (e.g.com.mycompany.myapporexample.app).
2. Check and Configure Dependencies
Inspect the generated package.json and keep the dependency combination matched by your selected App Tools version. The snippet below reflects the current source scaffold (if you scaffolded from npm, keep the versions generated by your published CLI rather than copying these source versions):
{
"dependencies": {
"@nimiplatform/sdk": "^0.21.0",
"@nimiplatform/kit": "^0.21.0"
}
}If you are developing against local build tarballs or offline delivery archives, add an overrides section to your root pnpm-workspace.yaml:
packages:
- .
overrides:
'@nimiplatform/app-tools': file:../nimi-packages/nimiplatform-app-tools-0.13.0.tgz
'@nimiplatform/sdk': file:../nimi-packages/nimiplatform-sdk-0.21.0.tgz
'@nimiplatform/kit': file:../nimi-packages/nimiplatform-kit-0.21.0.tgz
'@nimiplatform/kit-protected-local-darwin-arm64': file:../nimi-packages/nimiplatform-kit-protected-local-darwin-arm64-0.21.0.tgzPlatform Architecture
The native package override above targets macOS arm64 (Apple Silicon). On Windows x86_64, replace it with @nimiplatform/kit-protected-local-win32-x64 at the matching version. This package provides optional native extensions for Kit and does not need to be imported in your application code.
3. Install, Verify, and Run
From your project root, run:
pnpm install
pnpm run init
pnpm run check
pnpm run test
pnpm devLifecycle Command Overview
pnpm run init: Generates managed files and writes a fresh scaffold lock after dependencies are installed.pnpm run check: Validates the scaffold structure, dependency combination, and declared project inputs. Be sure to run your app's own typecheck and test scripts as well.pnpm run sync: Refreshes managed configuration files after upgrading dependencies, without touching your custom business logic.pnpm dev: Launches your app inside the Desktop-supervised Electron development shell. Make sure Developer Mode is enabled in Nimi Home before launching. The launcher creates or resumes a development registration—if more than one registration is available, follow the prompt to select one.
4. Build and Distribution Packaging
When your application is tested and ready to package for distribution:
# macOS
pnpm run app:build -- --target macos-aarch64
pnpm run pack --target macos-aarch64 --production
# Windows
pnpm run app:build -- --target windows-x86_64
pnpm run pack --target windows-x86_64 --productionRunning pack --production on the matching host verifies platform code signatures and system packaging prerequisites, outputting an archive ready for Local Import testing. Building a package only validates packaging prerequisites—you still need to import the archive to verify installation and end-to-end business flows. Publishing to the official Registry requires passing the platform's release preflight and audit process.
Next Steps
- First AI Call — Connect local and cloud models with just a few lines of code
- Enhance UI with Nimi Kit — Build immersive, consistent user interfaces
- Configure AI Capability Intents — Give users complete control over routing and keys