Skip to content

Introduction

The electron-egg framework is built on three core packages:

  • ee-core — Framework core, providing 100+ APIs for application lifecycle, communication, storage, jobs, and more. Supports dual CJS + ESM module format.
  • ee-bin — CLI build tool for development orchestration, bundling, encryption, packaging, and resource management.
  • ee-go — Go language support library for building cross-process backends alongside the Electron frontend.

Import Format

ee-core / ee-bin (CJS + ESM)

ee-core and ee-bin output both CommonJS and ES Module formats. Choose based on your project:

javascript
// ESM (recommended for TypeScript projects)
import { ElectronEgg } from 'ee-core';
import { getConfig } from 'ee-core/config';

// CJS (recommended for traditional Electron projects)
const { ElectronEgg } = require('ee-core');
const { getConfig } = require('ee-core/config');

Recommendation

For Electron main process projects, CJS is the default and recommended format (bundleConfig.format: 'cjs'). ESM requires all business code (controllers, services, config) to be ESM-compatible.

ee-go

go
import "github.com/wallace5303/ee-go/eapp"
import "github.com/wallace5303/ee-go/econfig"

Module Documentation

PackageDescriptionDocumentation
ee-coreFramework core — lifecycle, config, communication, storage, jobs, utils, psee-core API
ee-binCLI tool — dev, build, encrypt, package, icon, updateree-bin API
ee-goGo backend — eapp, econfig, ehttp, elog, eos, etaskee-go API

ee-core Module Map

ModuleExport PathKey APIs
appee-core / ee-core/appElectronEgg, EventBus, lifecycle events
configee-core/configgetConfig, setConfig, getAppInfo
constee-core / ee-core/constProcesses, SocketIO, Events, Receiver
controlleree-core/controllerloadController, getControllers
crossee-core/crossCross, cross.run, cross.kill
coreee-core/coreFileLoader, Timing, loadFile
electronee-core/electronelectronApp, createMainWindow, loadServer
exceptionee-core/exceptionloadException
loaderee-core/loaderloadFile, requireFile, execFile, resolveModule
logee-core/loglogger, coreLogger, createLog
messageee-core/messageChildMessage, childMessage
socketee-core/socketSocketServer, HttpServer, IpcServer
storageee-core/storageSqliteStorage
jobsee-core/jobsChildJob, ChildPoolJob, LoadBalancer
utilsee-core/utilsextend, is, helper, json, port, ip
psee-core/psenv, paths, process type checks
typesee-core/typesTypeScript type definitions

ee-bin Command Map

CommandDescription
devStart development mode
buildBuild frontend + electron + platform packages
startProduction preview
execExecute custom commands
moveCopy resources
encryptCode encryption
cleanRemove encrypted output
iconGenerate app icons
updaterGenerate incremental updates
ohosHarmonyOS resource extraction

Configuration

All ee-bin commands read from ./cmd/bin.js. See Configuration Types and Default Values for details.