@holix/cli

Holix Application Framework CLI
1,475
Install
npm install @holix/cli
Latest Version:1.0.6
Vue:3
License:MIT
Last Updated:Jan 5, 2026
Links: npm
Maintainer: hongzz

@holix/cli

Command-line interface for Holix applications.

Installation

pnpm add -D @holix/cli

Usage

Commands

dev

Start development mode with hot reload.

holix dev

Options:

  • --open - Auto open Electron window (default: true)
  • --clear - Clear output directory before build (default: true)
build

Build application for production.

holix build

Options:

  • --clear - Clear output directory before build (default: true)
start

Start the built application.

holix start

Configuration

Create holix.config.ts in your project root:

import { defineHolixConfig } from '@holix/cli/config'

export default defineHolixConfig({
  // Application ID
  appID: 'com.example.myapp',

  // Client entry
  app: {
    entry: 'src/index.tsx'
  },

  // Preload scripts
  preload: {
    preload: 'src/preload.ts'
  },

  // Or multiple preload scripts
  preload: {
    main: 'src/preload-main.ts',
    worker: 'src/preload-worker.ts'
  },

  // Directory configuration
  directories: {
    pages: 'src/pages'
  },

  // Output directory
  outDir: 'dist',

  // Vite configuration
  vite: {
    plugins: [],
    server: {
      port: 3000
    }
  },

  // Or use external Vite config
  viteConfigFile: './vite.config.ts',

  // Plugins
  plugins: []
})

Package.json Scripts

Add these scripts to your package.json:

{
  "scripts": {
    "dev": "holix dev",
    "build": "holix build",
    "start": "holix start"
  }
}

Development Workflow

  1. Start Development

    pnpm dev
    

    This will:

    • Build main and preload processes
    • Start Vite dev server for renderer
    • Launch Electron with hot reload
    • Watch for file changes
  2. Build for Production

    pnpm build
    

    This will:

    • Build all processes (main, preload, renderer)
    • Optimize for production
    • Output to dist/ directory
  3. Run Production Build

    pnpm start
    

Hot Reload

The development server automatically:

  • Reloads renderer process on file changes
  • Restarts main process on file changes
  • Maintains application state where possible

File-based Routing

Place page components in src/pages/:

src/pages/
├── index.tsx       # /
├── about.tsx       # /about
└── users/
    └── [id].tsx    # /users/:id

The CLI will automatically generate routes based on the file structure.

API

defineHolixConfig(config: HolixConfig): HolixConfig

Define and validate Holix configuration with full TypeScript support.

import { defineHolixConfig } from '@holix/cli/config'

export default defineHolixConfig({
  // Your configuration
})

Environment Variables

  • NODE_ENV - Set to development or production
  • HOLIX_DEBUG - Enable debug logging

License

MIT

Related Packages

ssr-hoc-vue3

hoc for vue ssr

2,181 2,687
vue-just-ssr

Instantly add a Vue SSR dev-env to your repo

1,169 7
ssr

cli for react/vue2/vue3 ssr deploy on serverless or tradtional web server

31,739 2,687
ssr-types

types for serverless ssr

19,827 2,687
ssr-common-utils

utils for serverless ssr

19,350 2,687

Version History

Version Released License
1.0.6 MIT
1.0.5 MIT
1.0.4 MIT
1.0.3 MIT
1.0.2 MIT