# omxcode > Write an app once in Mojo and run it natively on Linux (GTK 4), the web, Android, Mac and iPhone, with the heavy data work on the GPU in the same file. Every running app is also a set of MCP tools an AI agent can call, with no per-app work. Public alpha, MIT licence, Mojo 1.1. Status, measured by the checks in `scripts/check` (see components.md for the full matrix): - Runs: Linux (GTK 4), web (FastHTML), the agent host (MCP over stdio), Android (views over JNI, the classic controls). - Builds and signs, not yet run by a check: Mac (AppKit), iPhone (UIKit). - GPU path: NVIDIA today. Apple and phone GPUs use the CPU path, which runs the same functions. - Showcase: omxplorer, a data app over a million rows, about 2,100 lines of Mojo. An app is a struct with `update(event)` and `view() -> View`; the platforms draw the view tree with their own native controls. Build with `scripts/build.sh linux|web|mac|ios|android|all`. The README, reference, architecture, agent host and components in one file: [llms-full.txt](https://abhisheksreesaila.github.io/omxcode/llms-full.txt) ## Docs - [README](https://raw.githubusercontent.com/abhisheksreesaila/omxcode/main/README.md): what it is, what it feels like, measured numbers, how to try it - [Reference](https://abhisheksreesaila.github.io/omxcode/reference.md): the app model, every component, layout, the GPU canvas, the examples - [How it works](https://abhisheksreesaila.github.io/omxcode/architecture.md): the view tree, the update loop, how each platform is reached - [The agent host](https://abhisheksreesaila.github.io/omxcode/agent.md): the MCP tools (screen, act, read, render), what an agent gets back, what it can't do yet - Drawing: `mojoui.ink` (Stroke: points + pressures → one outline polygon; width from speed without pressure; `hits()` for an eraser), `Painter.polygon` and `Painter.layer_transform` (pan/zoom moves a kept layer), `Event.pressure`; example `examples/sketch` - The machine: `mojoui.audio` (Microphone: 16 kHz mono from the sound server on its own thread, a ring read by sample index, `level()`, `captured_ns()`; `load_wav`, `best_match`; Linux, Mac builds with a stub) and `mojoui.speech` (SpeechModel: whisper-large-v3-turbo on the GPU in the app's own process through Python interop, samples by address; SpeechStream: `feed()` / `poll()` → PARTIAL words and a FINAL at a pause; run on the `speech` pixi environment, needs file `speech`); example `examples/dictate`, race vs transformers.js in docs/goals/43 - Data: `mojoui.sqlite` (Database(path): prepare/bind/step/run, begin/commit/rollback, SQLite's error messages, FTS5; `fts_prefix_query(typed)` for search as you type; the system's libsqlite3 loaded at run time), `FileSaver(title, on_save, suggested=)` (save dialog / download; the app writes the path it's given), `DropTarget(view, on_drop, on_file=)` (files from the file manager, one event per path), `App.closing()` (save what's pending before the app ends); slow work in a job (`mojoui.jobs.start_ui_job`); example `examples/jot` - Works when closed: `mojoui.watch` (`FolderWatcher(path, wake=True)`: `start()`, `ready()`, `take()` → WatchEvent kind CREATED/MODIFIED/RENAMED/DELETED/OVERFLOW, path, old_path, at_ns; inotify on its own thread, new folders followed, one event per change; `walk_files(root, suffixes)`, `file_stamp(path)`), `App.background()` (True: closing the window hides it, the app keeps running) and `App.window_shown(shown)`, `App.one_instance()` (static: a name; a second launch opens the running one's window and exits before building anything; GTK), a tray item the host publishes for it (`mojoui.tray`, StatusNotifierItem; Activate opens the window), `mojoui.notify.notify(app, title, body)` (org.freedesktop.Notifications); example `examples/keeper` - [Components × platforms](https://abhisheksreesaila.github.io/omxcode/components.md): what exists where, generated from the code - [The UI thread](https://abhisheksreesaila.github.io/omxcode/ui-threads.md): why apps don't hang, and the five rules an app (or an agent writing one) follows: slow work is a request, a timer or a job ## Optional - [Decisions](https://abhisheksreesaila.github.io/omxcode/decisions.md): every design decision, with reasons (D-nn) - [Experiments](https://raw.githubusercontent.com/abhisheksreesaila/omxcode/main/EXPERIMENTS.md): what was tried, what broke, what was learned - [Roadmap](https://raw.githubusercontent.com/abhisheksreesaila/omxcode/main/ROADMAP.md): the original vision - [Source](https://github.com/abhisheksreesaila/omxcode): the repository