Introduction
Relevant source files
The following files were used as context for generating this wiki page:
Acode is a lightweight and powerful code editor designed specifically for the Android platform. It provides a comprehensive development environment that includes syntax highlighting, a built-in terminal, remote file access (FTP/SFTP), and an extensible plugin system. The project serves as a guide for developers to build and extend Acode's functionality using a robust API and various debugging tools.
The platform emphasizes ease of integration and rapid development. It allows users to manage local and remote projects seamlessly through a centralized File Browser and execute complex tasks via a dedicated Command Palette or a full Linux terminal environment.
Sources: index.md:5-35, user-guide/index.md:16-18, Readme.md:1-3
Core System Architecture
Acode operates as a multi-faceted application comprising a core editor, a file management system, a terminal emulator, and a plugin host. The system integrates mobile-specific utilities like QuickTools to optimize the coding experience on touch devices.
The diagram above illustrates the high-level relationship between the user interface and the underlying functional modules of Acode.
Sources: user-guide/index.md:20-75, user-guide/settings/editor-settings.md:1-3, user-guide/terminal.md:1-5
Key Features and Components
Acode includes several specialized components to manage the development lifecycle on Android.
| Component | Primary Function |
|---|---|
| CodeMirror Editor | Handles core editing, syntax highlighting, and autocompletion. |
| Terminal | Provides an Alpine Linux environment via proot for package management and CLI tools. |
| File Browser | Centralizes access to internal storage, SD cards, and remote FTP/SFTP servers. |
| Plugin System | Enables third-party extensions to register icon packs, formatters, and themes. |
| QuickTools | Offers a customizable toolbar for rapid access to symbols and navigation keys. |
Sources: user-guide/index.md:16-18, user-guide/terminal.md:3-5, user-guide/file-browser.md:3-5, user-guide/settings/app-settings.md:5-10, user-guide/settings/editor-settings.md:3-5
File Management and Remote Access
The File Browser acts as the centralized hub for all file connections. It uses the Android Storage Access Framework (SAF) to link local paths and dedicated protocols for remote servers.
Connection Workflow
To manage a project, you must first establish a connection.
- Use Add Path for local folders or SD cards.
- Use Add FTP/SFTP for remote server integration.
- Select a folder to set it as the Active Workspace, which loads the directory into the editor sidebar.
This sequence shows the process of adding a file source and promoting it to the active workspace for editing.
Sources: user-guide/file-browser.md:7-60, user-guide/file-browser.md:88-94
Terminal Environment
Acode provides a full Linux terminal using proot with Alpine Linux. This environment allows for native package management and direct editor interaction through the Acode CLI tool.
Terminal Capabilities
- Package Management: Uses
apkto install, search, and update Linux packages. - Acode CLI: The
acode <path>command allows you to open files or folders in the editor directly from the shell. - Persistent Service: The terminal runs as a foreground service to prevent the Android system from killing the process during background operations.
Sources: user-guide/terminal.md:3-15, user-guide/terminal.md:32-45, user-guide/terminal.md:50-65
Application Configuration
Acode exposes extensive configuration options through its Settings module, categorized into App, Editor, Terminal, and Preview settings.
App Settings Example
General application behavior is controlled through specific toggles and input fields.
{
"activeFiles": "tab_area",
"rememberFiles": true,
"checkFileChanges": true,
"animation": "system",
"console": "eruda",
"confirmOnExit": true
}
Sources: user-guide/settings/app-settings.md:12-70
Extension and Plugin Support
The system is designed for extensibility. Developers can utilize the Plugin API Guide to build diverse plugins that integrate with Acode’s robust API. These plugins can provide:
- Icon Packs: Custom file and folder icons for the sidebar.
- Formatters: Language-specific code formatting (e.g., Prettier).
- Themes: Both App-wide styling and Editor-specific syntax highlighting.
Sources: index.md:20-35, user-guide/plugins.md:1-25, user-guide/settings/formatter.md:1-15
Summary
Acode provides a mobile-first integrated development environment that bridges the gap between desktop coding and Android portability. By combining the CodeMirror editor with an Alpine Linux terminal and a flexible plugin architecture, it facilitates professional software development directly on mobile devices. Key workflows involve managing workspaces via the File Browser and optimizing input through the customizable QuickTools interface.
Sources: index.md:1-10, user-guide/index.md:12-18