FlyEnv Documentation

repository·master·Indexed 23 days ago

https://github.com/xpf0000/flyenv

FlyEnv is an all-in-one full-stack environment management tool for Windows, macOS, and Linux. It allows developers to natively manage runtimes (PHP, Node.js, Python), local services (MySQL, Nginx, Redis), and AI coding CLIs without Docker. Key features include on-demand runtime switching, a built-in MCP Server for AI agent integration, project-specific workflows with custom domains and HTTPS via MkCert, and a comprehensive suite of developer utilities.

Tokens
197.2K
Snippets
308
Records
1.2K
Agent score
85%

What's inside FlyEnv

  1. Overview of MailPit Module

    master

    MailPit is an integrated email testing server module in FlyEnv. It provides SMTP, Web UI, and POP3 server functionality, allowing developers to capture, view, and test emails locally without using a real mail server.

    Module Identifier: mailpit
    Module Type: Email Server

  2. Overview of Java Module in FlyEnv

    master
    The Java module provides multi-version management for Java Development Kits (JDK). It supports installing and managing different Java runtimes via package managers (Homebrew, MacPorts, SDKMAN) or through static binary distributions. Unlike service-based modules, the Java module focuses on version switching and environment configuration rather than managing daemon processes.
  3. Overview of Caddy Web Server Module

    master
    The Caddy module in FlyEnv is a modern web server component that provides automatic HTTPS, HTTP/2, and simplified configuration hosting. Unlike Nginx or Apache, Caddy uses the Caddyfile format and features built-in automatic SSL certificate management. It is categorized as a webServer module type.
  4. Overview of FlyEnv MCP Context Capabilities

    master

    FlyEnv provides a set of read-only context tools via its Model Context Protocol (MCP) implementation. These tools are designed to provide AI Agents (such as Claude Code, Codex, or Kimi) with structured, stable, and authoritative local development environment facts.

    Instead of forcing an Agent to guess PHP versions, database connection strings, or file paths, these tools expose the exact configuration used by FlyEnv. This allows an Agent to accurately identify the runtime environment, connection materials, and managed file locations without needing to perform generic OS-level file searching or command execution.

  5. Overview of Startup Group Class Architecture

    master

    The Startup Group Class Architecture replaces scattered startup-group factories and wrapper modules with a centralized, class-based system.

    Key Architectural Components:

    • Data Contracts: Persisted startup-group data is maintained as plain JSON DTOs in type.ts.
    • Behavioral Classes: Logic is encapsulated in six focused classes located under components/StartupGroup/class.
    • Centralized Access: A single exported StartupGroupManager singleton composes the Store, Runtime, Runner, and Candidate services.

    Integration Note for Vue Consumers: Instead of using global core files or wrappers like store.ts, runtime.ts, or setup.ts, developers should use the StartupGroupManager singleton to interact with startup groups.

  6. Overview of Tomcat Module

    master
    The Tomcat module in FlyEnv provides management for Apache Tomcat Servlet containers. It supports Java Web application deployment, lifecycle management (start/stop), version management, virtual host configuration, and SSL/TLS support. Note that Tomcat requires a Java runtime to function.
  7. Overview of the Nginx Module

    master
    The Nginx module is a core Web Server component in FlyEnv designed for high-performance HTTP/HTTPS service hosting. It manages the full lifecycle of Nginx services, including version management, service start/stop operations, configuration file generation, and virtual host management. It can also integrate with PHP via FastCGI.
  8. Overview of the OpenClaw module

    master

    The openclaw module in FlyEnv acts as an encapsulation layer for external AI CLI toolchains. It does not manage versioned installations or directory isolation for the openclaw binary itself. Instead, it interacts with the underlying system using three modes:

    1. IPC Silent Probe Mode: Executes openclaw --version and openclaw gateway status via Fork processes to determine the health of the CLI and Gateway.
    2. XTermExec Terminal Installation Mode: Executes remote installation scripts (via curl or PowerShell) directly in the XTerm terminal within the render process if the CLI or Gateway is missing.
    3. Command Panel Proxy Mode: Maps over 90 subcommands defined in command.json to UI buttons, which are passed to the local Shell via XTerm.send().

    Note: This module does not override standard service lifecycle methods like _startServer or _stopService. It relies on Base.exec() for dynamic method dispatch and exposes four custom IPC handlers: checkInstalled, getGatewayStatus, startGateway, and stopGateway.

  9. Overview of FlyEnv

    master

    FlyEnv is a desktop application designed to manage local development environments on Windows, macOS, and Linux. It allows developers to install and run runtimes (PHP, Node.js, Python, etc.), local services (MySQL, Nginx, Redis, etc.), and AI coding CLIs (Claude Code, GitHub Copilot CLI, etc.) natively without the overhead of Docker.

    Key features include:

    • On-Demand Runtimes: Install and switch between multiple versions of languages like PHP, Node.js, and Python per project.
    • Local Service Management: Run databases, web servers, and message queues as native processes.
    • AI-Ready Workspace: Includes a built-in FlyEnv MCP Server to expose local services, sites, and configs to AI agents.
    • Project Workflows: Automate project-specific environments with custom start/stop commands, local domains, and HTTPS via MkCert.
  10. Understand the Bin Version Cache Design Success Criteria

    master

    The Bin Version Cache is designed to optimize the detection of installed binary versions by avoiding redundant version command executions. Key behaviors include:

    • Avoid Redundant Execution: Hot caches and scans after application restarts will not re-execute version commands for binaries that have not changed.
    • Change Detection: The system re-detects versions if a binary's mtimeMs (modification time) or size changes.
    • Dynamic Discovery: New or deleted versions are still discovered via real-time directory scanning.
    • Process Isolation: The main process does not execute version commands directly.
    • Fault Tolerance: Failures in cache reading, IPC, or persistence will not break the existing version retrieval mechanism.
    • Standardized Access: All reliable bindings for detecting installed versions of specific binaries must be accessed through a public wrapper.
  11. Manage Python environments in FlyEnv

    master
    The Python module in FlyEnv provides environment management for Python, supporting multi-version installation, version switching, and project scaffolding using popular web frameworks. Unlike standard service modules, Python acts as a project runtime environment.
  12. Manage MySQL services in FlyEnv

    master
    The MySQL module in FlyEnv allows for multi-version management, multi-instance running (Group mode), database management, and backups. It handles the full lifecycle of MySQL services including installation, configuration, startup/shutdown, user management, and data backup.