Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

CodeAssist

A lightweight, on-device IDE that edits and builds Android & Java projects — no laptop, no Gradle daemon.

CI Tests Benchmarks Release License Stars Forks

CodeAssist running on a phone

What is CodeAssist?

CodeAssist is an extensible IDE framework that runs entirely on device (Android/ART) and edits and builds Android/Java projects without hosting Gradle. A full Gradle runtime is too heavy for a phone, so CodeAssist models projects itself, mimics Gradle's incremental task engine without the Gradle daemon, and drives the Android toolchain (aapt2, D8/R8, apksigner) directly.

It is designed to be lightweight:

  • No Gradle daemon. Projects are a declarative model compiled into an incremental task DAG with fingerprint up-to-date checks and a persistent cache — Gradle's good ideas, none of its weight.
  • Flat-memory indexing. Library/SDK symbol indices are disk-backed immutable segments queried in place through a bounded block cache, so heap stays flat regardless of index size.
  • Fast, incremental everything. Editing one file re-runs only the affected build tasks; completion and analysis reuse a cached compilation environment instead of rebuilding it per keystroke.
  • On-device toolchain. Pure-Java tools (Eclipse JDT/ecj, D8/R8, apksigner) run in process; native aapt2 is invoked as a subprocess.

It ships with a Compose Multiplatform UI and both desktop and Android launchers.

Highlights

  • Java code intelligence — error-tolerant parsing, ranked completion, diagnostics, and quick-fixes powered by Eclipse JDT.
  • 🟪 Kotlin completion (beta) — full Kotlin code completion on device, tuned to the same ranked experience as Java. How it works →
  • 🧩 Block editing — project any Java file into a Scratch-style block tree and edit it there; changes write back to the source byte-for-byte. How it works →
  • 📐 Android XML assist — tag, attribute, and resource completion for layouts/manifests with live validation.
  • 📦 Real APK builds on device — resolve, compile, dex, package, sign, and install — no laptop.
  • 🔌 Extensible everywhere — module types, build systems, language backends, analyzers, quick-fixes, and more all plug in through extension points.

Screenshots

A real IDE on your phoneJava completion
A real IDE, on your phone — write, navigate, and build end to end.Completion that knows your code — precise, ranked JDT suggestions with signatures and docs.
Kotlin completionBlock editing
Kotlin completion (beta) — the same calm, ranked experience as Java.Edit as code, or as blocks — a live projection of the same source, byte-for-byte.
Build APKs on deviceCommand palette
Build real APKs, on device — resolve, compile, dex, package, sign, install.Jump anywhere, instantly — one input for commands, files, and symbols.
Android XML completionBuilt on Jetpack Compose
Layouts, fully assisted — Android XML completion with live validation.Built on Jetpack Compose — a native Compose UI throughout.

Block editor

Any Java file can be projected into interlocking, typed blocks — and edited there. The block tree is a live projection of the same DOM the code editor uses, so the two views never drift; a block edit compiles to the smallest possible source edit, leaving every untouched line and comment intact.

Structured block projection     Scratch-style puzzle blocks

Typed value sockets (Scratch-style shapes for boolean/number/string/type), inline completion inside sockets, palette search, and drag-and-drop all map back to the same surgical projection pipeline. Read how the projection and edit round-trip work →

Benchmarks

CodeAssist tracks completion quality, editor latency, indexing, and build performance against committed baselines (a regressionTest suite that fails CI on a quality regression). The numbers below regenerate on each release.

AreaMetricResult
Java completion qualityrecall / top-1 / MRR100% / 75% / 0.88
Java completion latency (per keystroke)member access / type ref4.3 ms / 2.8 ms
Symbol index qualityrecall / top-1 / MRR100% / 90% / 0.95
Symbol index queryprefix / fuzzy~4.4 µs / ~56 ns
Build engine (14-module Java project)full build / incremental~0.30 s / 4 tasks re-run

What the metrics mean

  • recall — fraction of cases where the expected completion appears in the list at all.
  • top-1 / top-5 — fraction where the expected item is ranked first / within the first five.
  • MRR (mean reciprocal rank) — average of 1 / rank of the expected item; 1.0 means it is always first.
  • latency — wall-clock time to compute completion at a keystroke (recorded on the maintainer's machine, so treat as indicative; quality metrics are deterministic across machines).
  • incremental tasks — how many build tasks re-run after a single-file edit; fewer means more precise incrementality.

Tests

774 tests passing across 163 suites · 0 failing · 1 skipped (framework / CI_CORE_ONLY).

The badges and the numbers in this section are regenerated automatically on each release (see .github/workflows/update-readme.yml).

Documentation

DocWhat's in it
docs/architecture.mdProject model, the two graphs, build abstraction, concurrency model.
docs/modules.mdThe module map and responsibilities.
docs/extension-points.mdExtension points and the language-backend SPI.
docs/language-support.mdDOM, completion, the language backends, indexing, analysis, block editing.
docs/kotlin-completion.mdHow on-device Kotlin completion works.
docs/block-editing.mdHow the projectional (block) editor works.
docs/build-system.mdThe task engine, the native pipelines, Gradle compat.

Module layout

Dependencies point downward only (acyclic). Platform modules carry no domain knowledge; domain behavior is contributed through extension points.

platform-core            no domain knowledge; depended on by all
  └─ vfs-api
       └─ project-model-api
            ├─ build-api
            └─ language-api
deps-api / index-api / analysis-api / block-api  → the layers above
ide-ui (Compose UI) ← ide-core (engine→UI bridge) ← ide-desktop, ide-android

The full table — every module, its packages, and its responsibility — is in docs/modules.md.

Building

The build uses the Gradle wrapper and a JDK 17+ (developed against the JetBrains Runtime).

# Core framework only (pure JVM; no Android SDK or Compose shells needed) CI_CORE_ONLY=true ./gradlew check # Full build, including the Compose UI and Android launcher (requires the Android SDK) ./gradlew build # Run the desktop IDE ./gradlew :ide-desktop:run # Assemble the Android launcher ./gradlew :ide-android:assembleDebug

The regression suite (completion quality, latency, allocation, and build-at-scale) is opt-in and runs via the regressionTest tasks against committed JSON baselines.

Conventions

  • IDs are @JvmInline value class wrappers — no stringly-typed APIs.
  • Open-ended classifications (NodeKind, BuildSystemId, LanguageId) are string-backed value classes so plugins can extend them; closed sets (DependencyScope, SymbolKind) are enums.
  • Long-running entry points are suspend and run under the read/write-lock discipline; model and DOM access happens inside read/write actions.
  • Mutation is transactional: stage on a *Transaction/Modifiable*, then commit().
  • Editor features target the neutral DomNode/Symbol/Scope, never a backend's native types.

License

CodeAssist is free software licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE.

Install

  • Google Play — testing track (signed via Play App Signing).
  • F-Droid / IzzyOnDroid — built from this repo, signed with the project's own key. See docs/fdroid-izzyondroid.md. (The IzzyOnDroid and Play builds have different signatures and cannot update across stores.)

关于 About

Experimental IDE for building Android applicatons on Android.
collaborate

语言 Languages

Kotlin99.9%
Java0.1%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
33
Total Commits
峰值: 33次/周
Less
More

核心贡献者 Contributors