Skip to content

Repository files navigation

XunCode

License Build APK

Open-source code editor for Android and Linux. Built with Flutter and the Monaco Editor engine. Free to use, modify, and contribute. Licensed under Apache-2.0.

Overview

XunCode is a native, cross-platform code editor that brings a desktop-like editing experience to mobile devices and Linux desktops. It combines the Monaco Editor (the same engine powering Visual Studio Code) with a plugin ecosystem, an embedded terminal, and deep customization options.

Real feature set

Editor

  • Monaco Editor — syntax highlighting, bracket matching, auto-indentation, and minimap for 25+ languages including JavaScript, TypeScript, Python, Dart, Go, Rust, C/C++, Java, Kotlin, PHP, Ruby, Lua, HTML, CSS, SCSS, JSON, YAML, Markdown, Shell, SQL, Swift, and XML.
  • Settings — configurable font size, font family, tab size, word wrap, auto-save, and completion behavior.
  • File tabs — open multiple files, switch between them, and track unsaved changes.
  • Project sidebar — browse the projects directory, open files, and navigate the workspace.
  • Command palette — trigger plugin commands from a searchable list.
  • Status bar — cursor line/column, active language, and quick Tor toggle.

Terminal

  • proot + Alpine Linux — a full user-space Linux environment (no root required).
  • AXS (Acode eXecution Server) — bypasses Android 13+ noexec/W^X restrictions using memfd_create.
  • Fallback shell — if Alpine is not installed or unsupported, the app falls back to /system/bin/sh on Android.
  • Multiple tabs — open several terminal sessions at once.
  • On-screen keys — quick-access row for Ctrl, Esc, Tab, arrow keys, and common symbols.

Plugins

  • GitHub-based plugins — install any public repository that contains plugin.json + main.js.
  • Sandboxed execution — plugins run inside an isolated HeadlessInAppWebView with a permission model.
  • Plugin API — JavaScript API covering editor access, file system, HTTP requests, terminal/process execution, settings, storage, workspace search, and UI prompts.
  • Marketplace — browse, install, and review plugins (backend can be self-hosted or deployed on Vercel).
  • Runtime management — activate, deactivate, reload, and uninstall plugins without restarting the app.

Customization and runtimes

  • UI language packs — Russian and English are bundled; additional languages can be added by placing .txt files in Shared/XunCode/Languages/.
  • Language / runtime installer — download and install development runtimes such as Python, Node.js, Go, Rust, Ruby, Lua, PHP, Java, or any custom URL.
  • Theme — VS Code Dark+-inspired color theme with a consistent visual style across the app.

Networking

  • Proxy support — HTTP/HTTPS and SOCKS5 proxy configuration.
  • Tor via Orbot — start/stop Orbot directly from the status bar.

Platforms

  • Android — primary target. Minimum SDK 26, recommended Android 10+ (API 29+). Android 13+ support is stabilized through libaxs.so and libproot.so placed in jniLibs.
  • Linux — desktop build is supported via Flutter's Linux target. The terminal uses the native system shell instead of proot, and the plugin sandbox works out of the box.

Requirements

Platform Minimum version
Android non-root API 26 (Android 8.0), user-space proot + Alpine
Android root API 26+, emulated root inside proot, extended tools
Linux 64-bit GTK-based desktop
Flutter 3.24.5 or newer
Dart 3.3.0 or newer

Install

Android

Two APK variants are published:

  • xuncode-*-nonroot-release.apk — works on any Android 8+ device. It runs a user-space Alpine Linux environment through proot. No root access on the device is required.
  • xuncode-*-root-release.apk — same engine, but the Alpine environment starts as emulated root inside proot. Useful for tools that expect root privileges, package managers, and broader filesystem access inside the sandbox.

Download the latest APKs from GitHub Releases or grab CI artifacts from the Actions tab.

Linux

Releases are published as AppImage, .deb, .rpm, and portable tar archives on the releases page.

Build from source

git clone https://github.com/H4F8/XunCode.git
cd XunCode

# Bundle Monaco Editor assets
npm install && npm run build:monaco

# (Optional) Bundle Alpine rootfs into the APK
# Skip this to let the app download rootfs on first launch.
./scripts/bundle-rootfs.sh aarch64

# Fetch Flutter dependencies
flutter pub get

# Generate launcher icons
dart run flutter_launcher_icons

# Android debug APKs — pick a flavor
flutter build apk --debug --flavor nonroot
flutter build apk --debug --flavor root

# Linux release
flutter build linux --release

For the release Android APK you will need a signing keystore. Set the following repository secrets for CI signing:

  • KEYSTORE_PASSWORD
  • KEY_ALIAS
  • KEY_PASSWORD

Project layout

XunCode/
├── android/            # Android-specific Kotlin code, manifests, and native libs
├── assets/             # Monaco Editor bundle, languages, plugin examples
├── docs/               # Plugin API documentation
├── lib/                # Dart/Flutter source code
├── market/             # Optional Vercel marketplace backend
├── scripts/            # Monaco bundling and build helpers
├── .github/workflows/  # GitHub Actions CI
├── pubspec.yaml
└── README.md

Plugin API

See the full reference in docs/PLUGIN_API.md. Example plugins are located in example-plugins/.

Contributing

Pull requests, bug reports, and feature ideas are welcome.

Acknowledgments

License

XunCode is licensed under the Apache License 2.0.

About

Android code editor with Monaco Editor, proot terminal, Git support and extensions. Write code on your phone.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages