@incajs/cli
v0.0.35
Published
Commands to develop, bundle, and package Incarnative.js apps.
Maintainers
Readme
@incajs/cli
The inca command for building and running Incarnative.js
apps.
Install
npm i -D @incajs/cliApp entry
No entry point is required. Drop a src/App.vue and that's a whole
app. Commit a src/main.mts, src/main.ts or src/main.js instead for full control over
bootstrapping; it wins outright when both exist.
Commands
inca dev: watches your app and opens a window that applies each edit without a reload.dev.hmr: falsereloads the whole app. See the HMR guide.inca build: bundles your app for production, once, with no window opened.inca package: builds your app, then packages it with the prebuilt host into a distributable application: a.appon macOS, a plain directory on Linux (other platforms aren't supported yet).inca config: prints the settings the host applies to your app, such as its window size, as JSON.
When running inca, it will automatically try to resolve a config file
named inca.config.ts inside your app's root (other JS/JSON extensions
are also supported), for app metadata and build settings:
import { defineConfig } from "@incajs/cli/config";
export default defineConfig({
// the app's display name
productName: "Click Counter",
// macOS's CFBundleIdentifier or equivalent
identifier: "com.example.click-counter",
// the app's icon file
icon: "assets/icon.icns",
});An identifier should be world-unique, so inca package prints a note
when it falls back to the generated one rather than using it silently.
On macOS, inca dev launches the app under its productName, icon and
identifier, so the Dock and the menu bar show the same app they will
once it is packaged.
Requirements
A prebuilt binary is pulled in automatically as a platform-specific optional dependency. Neither Cargo nor Rust are needed. See Host binary for per-platform support.
Set INCA_HOST_BIN to use a specific binary instead, e.g. on a
platform with no published one yet, or a custom build.
How it works
inca dev/build/package bundle your app with Vite, then (for dev
and package) launch and supervise the host, the native runtime that
renders it, as a child process.
