Skip to content

CLI

The ZhinNX CLI is named zz. It is designed to remove repetitive work from setup, build, deploy config, and debugging.

Current install status

If ZhinNX is already published to npm, install it globally.

npm install -g zhinnx@beta

If you are testing the source ZIP or the GitHub repository before npm release, use the local CLI.

bash
cd zhinnx-cli
npm install --package-lock=false --no-audit --no-fund
node bin/zz.js --help
node bin/zz.js create my-app

You can also link the command locally.

bash
chmod +x bin/zz.js
npm link
zz --help

Create

bash
zz create my-app

Project creation is explicit. Bare commands like zz my-app are not supported, so typos such as zz crete show an error and help instead of accidentally creating a folder.

Create with template

bash
zz create my-app --template landing
zz create my-app --template dashboard
zz create my-app --template music-app
zz create my-app --template admin

Read the Templates guide for every template.

Create with deploy target

bash
zz create my-app --vercel
zz create my-app --netlify
zz create my-app --vercel --netlify

These flags generate provider config during project creation. Read the Deployment guide for how the generated files work.

Run generated project

bash
cd my-app
npm install --package-lock=false --no-audit --no-fund
npm run dev

Build

bash
zz build

The build command generates a static output directory that can be served by Vercel, Netlify, or any static host.

Update deploy config

bash
zz update --vercel
zz update --netlify
zz update --all

Use this after changing project settings or adding deploy targets.

Deploy

bash
zz deploy --vercel
zz deploy --netlify
zz deploy --all

Deploy commands wrap provider CLIs. You still need provider authentication from Vercel or Netlify. If authentication fails, run the provider CLI login command first.

Migrate React + Vite

bash
zz migrate react --syntax=jsx
zz migrate react --syntax=tsx --vercel --netlify

Migration updates package.json scripts, adds zhinnx@beta to devDependencies, writes zz.config.json, and preserves your React source files. After migrating, run:

bash
npm install --package-lock=false --no-audit --no-fund
npm run dev

For production builds on Vercel or Netlify, zhinnx must be in project dependencies because the host runs npm run build in a clean environment.

Debug

bash
zz dev --debug

This starts the dev server with the debug overlay enabled. It helps inspect current route, registered pages, state, action calls, API requests, and last errors.

Safe fallback

If zz is not available yet, run the CLI through Node.

bash
node bin/zz.js create my-app --template landing
node bin/zz.js build
node bin/zz.js dev --debug

Released under the MIT License.