Skip to content

Configure an App

uzumaki.config.json describes how the CLI should build and package your app.

Most projects need three things:

  • App identity: name, version, and identifier.
  • Optional build command: how to turn TypeScript into JavaScript.
  • Bundle settings: resources, where the built JavaScript lives, and what executable to create.
{
"productName": "my-app",
"version": "0.1.0",
"identifier": "com.example.my_app",
"jsxImportSource": "uzumaki-react",
"beforeBuildCommand": "bun build src/index.tsx --target node --outdir dist --minify --external uzumaki",
"bundle": {
"resources": ["assets/**/*"],
"js": {
"rootDir": "./dist",
"entry": "index.js"
},
"outputDir": "./target",
"binName": "my-app"
}
}
FieldDescription
productNameHuman-readable app name.
versionApp version.
identifierReverse-DNS app id, such as com.example.my_app.

Use a stable identifier early. It is also exposed at runtime as Uz.path.identifier.

{
"beforeBuildCommand": "bun build src/index.tsx --target node --outdir dist --minify --external uzumaki"
}

beforeBuildCommand is optional. When present, it runs before packaging and should write JavaScript into bundle.js.rootDir.

Always mark uzumaki as external:

Terminal window
bun build src/index.tsx --target node --outdir dist --minify --external uzumaki

Uzumaki provides the uzumaki module when your app runs. Bundling it into your app would produce the wrong module.

Any bundler that can externalize a module works — bun build, esbuild, Rollup, tsup, and so on. The scaffolded command uses bun build because it is fast and ships with the toolchain.

FieldDescription
bundle.resourcesResource globs copied into the packaged app.
bundle.js.rootDirDirectory containing built JavaScript.
bundle.js.entryEntry file inside bundle.js.rootDir.
bundle.outputDirDirectory where packaged output is written.
bundle.binNameExecutable name. Defaults to productName.
bundle.baseBinaryOptional host binary to use as the package source.

Declare resources:

{
"bundle": {
"resources": ["assets/**/*", "data/**/*.json"]
}
}

Resolve them:

const icon = Uz.path.resource('assets/icons/search.svg');
const config = Uz.path.resource('data/app.json');

<image src> accepts bundled paths, absolute paths, file:// URLs, and https:// URLs.

Terminal window
uzumaki build --config path/to/uzumaki.config.json
uzumaki build --no-build

Use --no-build in CI when your JavaScript bundle has already been produced.