FlyEnv
AGENTS.md3.3k starsChanged 2 months agoBSD-3-ClauseView on GitHub
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. FlyEnv follows Electron's multi-process architecture with three main components: Acts as a command relay station between the renderer and fork processes. Core Managers: Executes all heavy commands asynchronously to prevent main thread blocking. Module Structure (/src/fork/module/): Each…
Trending
Quiet since May.thin dataabout the whole repository
Who's talking about xpf0000/FlyEnv
- roomedia/ax-trend“xpf0000/FlyEnv...”GitHub · May 23, 2026
- microsoft/winget-pkgs“Remove version: xpf0000.FlyEnv version 4.10.1 (Auto)”GitHub · Sep 21, 2025
The biggest 2 of 2 mentions linking to the repository that our crawl found. Each line is their own headline.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 197
Use TypeScript for all new code
- Distinctive: line 199
Prefer Composition API over Options API
- Very specific: line 200
Use the established Pinia stores for existing shared/domain state.
- Distinctive: line 201
Follow existing module patterns for new services
- Very specific: line 219
Persistence: Do not add module data to config.setup or any other shared configuration object.
- Very specific: line 220
Renderer state: Do not create a new Pinia store for module-owned state.
- Distinctive: line 222
Module ownership: Keep module-only properties, types, helpers, policies, and methods inside the module directory.
- Distinctive: line 224
Before implementation, record the exception authorization (if any) and verify this checklist in the plan.
- Very specific: line 230
Add to src/render/core/type.ts in AppModuleEnum:
- Very specific: line 275
Create translation files in /src/lang/*/myservice.json and add to index.ts.
- Very specific: line 368
node-pty build failures: Run yarn clean and rebuild
- Very specific: line 369
Port conflicts: Default dev port is defined in configs/vite.port.ts
- Distinctive: line 370
Module not found: Ensure all path aliases are correctly resolved
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
FlyEnv - AI Agent Development Guide
Project Overview
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.17.0
- Electron Version: 39.8.7
- License: MIT
- Author: Pengfei Xu
- Repository: https://github.com/xpf0000/FlyEnv
Technology Stack
Core Technologies
- Frontend Framework: Vue 3 (Composition API)
- Desktop Framework: Electron 39.8.7
- Build Tool: Vite 6.x + esbuild 0.28.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
Additional Libraries
- 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
Project Architecture
FlyEnv follows Electron's multi-process architecture with three main components:
1. Main Process (/src/main)
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
2. Forked Asynchronous Process (/src/fork)
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
3. Renderer Process (/src/render)
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.
5. Go Helper (/src/helper-go/)
Go-based helper binary for platform-specific operations (Windows admin tasks).
6. Shared Code (/src/shared)
Shared utilities between all processes:
ForkPromise.ts- Promise with progress callbacksProcess.ts- Process management utilitieschild-process.ts- Child process helpersutils.ts- Platform detection utilities
7. Internationalization (/src/lang)
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.
Build System
Build Scripts (package.json)
# 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 dependenciesBuild Process Flow
- 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
esbuild Configuration (/configs/esbuild.config.ts)
| 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 |
Vite Configuration (/configs/vite.config.ts)
Entry Points:
main- Main application windowtray- Tray popup windowcapturer- Screen capture window
Path Aliases:
@→src/render/@shared→src/shared/@lang→src/lang/
Code Style Guidelines
ESLint Configuration
- Uses flat config format (
eslint.config.mjs) - TypeScript ESLint recommended rules
- Vue 3 recommended rules
- Prettier integration for formatting
Key Rules
@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)
Styling
- Primary: Tailwind CSS for utility-first styling
- Secondary: SCSS for complex styles
- Dark Mode: CSS selector-based (
darkMode: 'selector')
Code Conventions
- Use TypeScript for all new code
- Vue SFCs must use
<script lang="ts"> - Prefer Composition API over Options API
- Use the established Pinia stores for existing shared/domain state. For a new module, do not add Pinia state unless the user explicitly authorizes it; prefer a module-local class bound with
reactiveBind. - Follow existing module patterns for new services
Module Boundaries and Operation Ownership
Apply these rules to every new or changed module, renderer IPC flow, service lifecycle, background operation, download, installation, web panel, or external process. Before making such a change, read .codex/skills/flyenv-module-boundaries/SKILL.md and record the required operation contract in the implementation plan.
- UI state belongs to the mounted Vue component only. It includes inputs, dialogs, selections, and display-only filters; it may reset when the page is destroyed.
- Existing shared domain state belongs to Pinia or the established module store. New module-owned domain state follows New Module Constraints and defaults to a module-local class bound with
reactiveBind. - Long-running renderer operations belong to a module-local singleton controller. This includes work that can outlive its initiating page, reports progress, starts or waits for an external process, downloads or installs software, opens a panel, or requires terminal cleanup.
- Fork modules own child processes, PID/port state, and companion shutdown. Renderer state is never the source of truth for process liveness.
- Entry pages bind controller state and commands; they do not own operation IPC, progress, notices, terminal errors, or listener cleanup. The state owner follows its lifetime, not the button that first triggers it.
- A generic loading-state map cannot replace a controller. A controller owns the complete operation lifecycle: preconditions, request snapshot, IPC callbacks, notices, terminal result, re-entry guard, and cleanup.
- Each long-running operation plan must record its owner, lifetime, intermediate events, terminal events, duplicate invocation behavior, service interaction, and lifecycle tests.
New Module Constraints
Unless the user explicitly authorizes an exception for the specific module, apply all of the following:
- Persistence: Do not add module data to
config.setupor any other shared configuration object. Persist and load module-owned state withStorageSetAsyncandStorageGetAsync. - Renderer state: Do not create a new Pinia store for module-owned state. Use a normal module-local class/singleton and expose its reactive state through
reactiveBind. - Service lifecycle: Reuse
ModuleInstalledItem.start(),stop(), andrestart()whenever they can express the lifecycle. Put module-specific arguments in the module'sstartExtParam/stopExtParamregistration (normally itsaside.vue), instead of adding a separate start/stop workflow or controller methods. - Module ownership: Keep module-only properties, types, helpers, policies, and methods inside the module directory. Public service types, stores, lifecycle classes, and generic helpers must remain module-agnostic.
Before implementation, record the exception authorization (if any) and verify this checklist in the plan. Do not infer authorization from an existing module that predates these rules.
Adding a New Module
Step 1: Define Module Type
Add to src/render/core/type.ts in AppModuleEnum:
export enum AppModuleEnum {
myservice = 'myservice',
// ... existing modules
}Step 2: Create Fork Module
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();Step 3: Create Renderer Components
Create /src/render/components/MyService/:
Module.ts- Module definitionIndex.vue- Main viewaside.vue- Sidebar component
Step 4: Add Translations
Create translation files in /src/lang/*/myservice.json and add to index.ts.
Testing
Test Directory (/test/)
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.
Development Workflow
Prerequisites
- Node.js 18+
- Yarn package manager
- Platform-specific build tools:
- macOS: Xcode Command Line Tools
- Windows: Visual Studio Build Tools
- Linux: build-essential
Getting Started
# Clone and install
git clone git@github.com:xpf0000/FlyEnv.git
cd FlyEnv
yarn install
# Development
yarn dev
# Build for production
yarn buildPlatform-Specific Notes
macOS:
- 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
Security Considerations
- 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
Deployment
GitHub Actions Workflows
.github/workflows/macos-version-build.yml.github/workflows/windows-version-build.yml.github/workflows/linux-version-build.yml
Release Artifacts
- macOS:
.dmg(Intel & Apple Silicon) - Windows:
.exeinstaller and portable - Linux:
.deband.rpmpackages
Useful Commands
# Fix macOS helper permissions
yarn fix-flyenv-helper
# Kill running Electron processes (Windows)
npx tsx scripts/electron-process-kill.ts
# Update dependencies
yarn upgrade-interactiveCommon Issues
- 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
Resources
- Website: https://www.flyenv.com
- Documentation: https://deepwiki.com/xpf0000/FlyEnv
- Discord: https://discord.gg/u5SuMGxjPE
- Releases: https://github.com/xpf0000/FlyEnv/releases
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

