agentleFS
xpf0000xpf0000/FlyEnv/AGENTS.md

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

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the xpf0000/FlyEnv repository that our weekly crawl found: only 2 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about xpf0000/FlyEnv

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
  1. Distinctive:

    Use TypeScript for all new code

    line 197
  2. Distinctive:

    Prefer Composition API over Options API

    line 199
  3. Very specific:

    Use the established Pinia stores for existing shared/domain state.

    line 200
  4. Distinctive:

    Follow existing module patterns for new services

    line 201
  5. Very specific:

    Persistence: Do not add module data to config.setup or any other shared configuration object.

    line 219
  6. Very specific:

    Renderer state: Do not create a new Pinia store for module-owned state.

    line 220
  7. Distinctive:

    Module ownership: Keep module-only properties, types, helpers, policies, and methods inside the module directory.

    line 222
  8. Distinctive:

    Before implementation, record the exception authorization (if any) and verify this checklist in the plan.

    line 224
  9. Very specific:

    Add to src/render/core/type.ts in AppModuleEnum:

    line 230
  10. Very specific:

    Create translation files in /src/lang/*/myservice.json and add to index.ts.

    line 275
  11. Very specific:

    node-pty build failures: Run yarn clean and rebuild

    line 368
  12. Very specific:

    Port conflicts: Default dev port is defined in configs/vite.port.ts

    line 369
  13. Distinctive:

    Module not found: Ensure all path aliases are correctly resolved

    line 370

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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.

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 Launcher
  • Launcher.ts - Application bootstrap, single-instance lock, event handling
  • Application.ts - Main application controller, window management, IPC handling

Core Managers:

  • WindowManager - Browser window creation and management
  • TrayManager - System tray functionality
  • MenuManager - Application menus
  • ConfigManager - Configuration persistence
  • ForkManager - Forked process management
  • NodePTY - 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 point
  • BaseManager.ts - Command dispatcher
  • module/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 service
  • fetchAllOnlineVersion() - Fetch available versions
  • installSoft() - Download and install

3. Renderer Process (/src/render)

Vue 3-based UI application.

Key Files:

  • main.ts - Renderer entry point
  • App.vue - Root component
  • core/type.ts - Module type definitions

Directory Structure:

  • components/ - Vue components organized by module
  • store/ - Pinia stores
  • util/ - Utility functions
  • style/ - 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 callbacks
  • Process.ts - Process management utilities
  • child-process.ts - Child process helpers
  • utils.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 dependencies

Build Process Flow

  1. 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
  2. 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)

TargetEntryOutputMinify
devsrc/main/index.dev.tsdist/electron/main.mjsfalse
distsrc/main/index.tsdist/electron/main.mjstrue
devForksrc/fork/index.tsdist/electron/fork.mjsfalse
distForksrc/fork/index.tsdist/electron/fork.mjstrue

Vite Configuration (/configs/vite.config.ts)

Entry Points:

  • main - Main application window
  • tray - Tray popup window
  • capturer - 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: off
  • vue/block-lang: requires TypeScript in Vue SFCs
  • prettier/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:

  1. Persistence: Do not add module data to config.setup or any other shared configuration object. Persist and load module-owned state with StorageSetAsync and StorageGetAsync.
  2. 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.
  3. Service lifecycle: Reuse ModuleInstalledItem.start(), stop(), and restart() whenever they can express the lifecycle. Put module-specific arguments in the module's startExtParam/stopExtParam registration (normally its aside.vue), instead of adding a separate start/stop workflow or controller methods.
  4. 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 definition
  • Index.vue - Main view
  • aside.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 file
  • powershell.ts - PowerShell tests
  • docker-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 build

Platform-Specific Notes

macOS:

  • May require sudo xattr -dr "com.apple.quarantine" for helper binaries
  • Uses flyenv-helper for privileged operations

Windows:

  • Uses flyenv-helper-windows-amd64-v1.exe Go binary for admin tasks
  • PowerShell scripts in /scripts/

Linux:

  • Supports both .deb and .rpm packaging
  • Uses native package managers for dependencies

Security Considerations

  1. Privilege Escalation: Uses helper processes for root/admin operations
  2. Code Signing: Configured for macOS notarization and signing
  3. Sandbox: Disables GPU sandbox for certain operations
  4. 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: .exe installer and portable
  • Linux: .deb and .rpm packages

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-interactive

Common Issues

  1. node-pty build failures: Run yarn clean and rebuild
  2. Port conflicts: Default dev port is defined in configs/vite.port.ts
  3. Module not found: Ensure all path aliases are correctly resolved

Resources

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.