FlyEnv is an All-In-One Full-Stack Environment Management Tool built with Electron and Vue 3. It provides a lightweight, modular development environment manager for Windows, macOS, and Linux, allowing developers to install and manage Apache, PHP, Node.js, Python, databases, and more—running natively without Docker.
- Version: 4.13.2
- Electron Version: 35.7.5
- License: MIT
- Author: Pengfei Xu
- Repository: https://github.com/xpf0000/FlyEnv
- Frontend Framework: Vue 3 (Composition API)
- Desktop Framework: Electron 35.7.5
- Build Tool: Vite 6.x + esbuild 0.25.x
- Language: TypeScript 5.8.x
- State Management: Pinia 3.x
- UI Component Library: Element Plus 2.11.x
- Styling: Tailwind CSS 3.4.x + SCSS
- Internationalization: Vue I18n 11.x
- Code Editor: Monaco Editor
- Terminal: node-pty + xterm.js
- HTTP Client: Axios
- Process Management: child_process, node-pty
- File Operations: fs-extra
- Markdown Processing: markdown-it + Shiki
FlyEnv follows Electron's multi-process architecture with three main components:
Acts as a command relay station between the renderer and fork processes.
Key Files:
index.ts- Entry point, initializes LauncherLauncher.ts- Application bootstrap, single-instance lock, event handlingApplication.ts- Main application controller, window management, IPC handling
Core Managers:
WindowManager- Browser window creation and managementTrayManager- System tray functionalityMenuManager- Application menusConfigManager- Configuration persistenceForkManager- Forked process managementNodePTY- Terminal PTY handling
Executes all heavy commands asynchronously to prevent main thread blocking.
Key Files:
index.ts- Fork process entry pointBaseManager.ts- Command dispatchermodule/Base/index.ts- Base class for all service modules
Module Structure (/src/fork/module/):
Each service has its own module (e.g., Nginx/, Php/, Mysql/). A typical module extends the Base class and implements:
_startServer(version)- Start the service_stopService(version)- Stop the servicefetchAllOnlineVersion()- Fetch available versionsinstallSoft()- Download and install
Vue 3-based UI application.
Key Files:
main.ts- Renderer entry pointApp.vue- Root componentcore/type.ts- Module type definitions
Directory Structure:
components/- Vue components organized by modulestore/- Pinia storesutil/- Utility functionsstyle/- Global styles (SCSS)
### 4. Helper Process (/src/helper)
Background helper process for privileged operations.
Deprecated. Only the Go version is used.
Go-based helper binary for platform-specific operations (Windows admin tasks).
Shared utilities between all processes:
ForkPromise.ts- Promise with progress callbacksProcess.ts- Process management utilitieschild-process.ts- Child process helpersutils.ts- Platform detection utilities
Supports 25+ languages with JSON-based translation files.
Supported Languages: Arabic, Azerbaijani, Bengali, Czech, Danish, German, Greek, English, Spanish, Finnish, French, Indonesian, Italian, Japanese, Dutch, Norwegian, Polish, Portuguese, Portuguese (Brazil), Romanian, Russian, Swedish, Turkish, Ukrainian, Vietnamese, Chinese.
# Development
yarn dev # Start development server with hot reload
yarn clean:dev # Clean dist folder
yarn build-dev-runner # Build dev runner script
# Production Build
yarn build # Build for production (platform-specific)
yarn clean # Clean node-pty build
yarn postinstall # Install Electron app dependencies-
Development (
yarn dev):- Cleans dist folder
- Builds dev-runner.ts →
electron/dev-runner.mjs - Starts Vite dev server
- Watches main/ and fork/ directories for changes
- Restarts Electron on file changes
-
Production (
yarn build):- Cleans dist folder and node-pty build
- Builds main process with esbuild
- Builds fork process with esbuild
- Builds renderer with Vite
- Packages with electron-builder
| Target | Entry | Output | Minify |
|---|---|---|---|
| dev | src/main/index.dev.ts | dist/electron/main.mjs | false |
| dist | src/main/index.ts | dist/electron/main.mjs | true |
| devFork | src/fork/index.ts | dist/electron/fork.mjs | false |
| distFork | src/fork/index.ts | dist/electron/fork.mjs | true |
Entry Points:
main- Main application windowtray- Tray popup windowcapturer- Screen capture window
Path Aliases:
@→src/render/@shared→src/shared/@lang→src/lang/
- Uses flat config format (
eslint.config.mjs) - TypeScript ESLint recommended rules
- Vue 3 recommended rules
- Prettier integration for formatting
@typescript-eslint/no-explicit-any: error (disabled in practice)vue/multi-word-component-names: offvue/block-lang: requires TypeScript in Vue SFCsprettier/prettier: error (formatting issues treated as errors)
- Primary: Tailwind CSS for utility-first styling
- Secondary: SCSS for complex styles
- Dark Mode: CSS selector-based (
darkMode: 'selector')
- Use TypeScript for all new code
- Vue SFCs must use
<script lang="ts"> - Prefer Composition API over Options API
- Use Pinia for state management
- Follow existing module patterns for new services
Add to src/render/core/type.ts in AppModuleEnum:
export enum AppModuleEnum {
myservice = 'myservice',
// ... existing modules
}Create /src/fork/module/MyService/index.ts:
import { Base } from '../Base';
import type { SoftInstalled } from '@shared/app';
class MyService extends Base {
constructor() {
super();
this.type = 'myservice';
}
async _startServer(version: SoftInstalled) {
// Implementation
}
async _stopService(version: SoftInstalled) {
// Implementation
}
}
export default new MyService();Create /src/render/components/MyService/:
Module.ts- Module definitionIndex.vue- Main viewaside.vue- Sidebar component
Create translation files in /src/lang/*/myservice.json and add to index.ts.
Contains various test files and utilities:
test.ts- General test filepowershell.ts- PowerShell testsdocker-compose.yml- Docker test configuration
Note: The project currently does not have automated unit tests configured. Testing is primarily done manually during development.
- Node.js 18+
- Yarn package manager
- Platform-specific build tools:
- macOS: Xcode Command Line Tools
- Windows: Visual Studio Build Tools
- Linux: build-essential
# Clone and install
git clone git@github.com:xpf0000/FlyEnv.git
cd FlyEnv
yarn install
# Development
yarn dev
# Build for production
yarn buildmacOS:
- May require
sudo xattr -dr "com.apple.quarantine"for helper binaries - Uses
flyenv-helperfor privileged operations
Windows:
- Uses
flyenv-helper-windows-amd64-v1.exeGo binary for admin tasks - PowerShell scripts in
/scripts/
Linux:
- Supports both .deb and .rpm packaging
- Uses native package managers for dependencies
- Privilege Escalation: Uses helper processes for root/admin operations
- Code Signing: Configured for macOS notarization and signing
- Sandbox: Disables GPU sandbox for certain operations
- Process Isolation: Forked process for command execution
.github/workflows/macos-version-build.yml.github/workflows/windows-version-build.yml.github/workflows/linux-version-build.yml
- macOS:
.dmg(Intel & Apple Silicon) - Windows:
.exeinstaller and portable - Linux:
.deband.rpmpackages
# Fix macOS helper permissions
yarn fix-flyenv-helper
# Kill running Electron processes (Windows)
npx tsx scripts/electron-process-kill.ts
# Update dependencies
yarn upgrade-interactive- node-pty build failures: Run
yarn cleanand rebuild - Port conflicts: Default dev port is defined in
configs/vite.port.ts - Module not found: Ensure all path aliases are correctly resolved
- Website: https://www.flyenv.com
- Documentation: https://deepwiki.com/xpf0000/FlyEnv
- Discord: https://discord.gg/u5SuMGxjPE
- Releases: https://github.com/xpf0000/FlyEnv/releases