Matrix OSMatrix OS

Apps

The app platform, container-based runtime, pre-installed games, utilities, and bundled desktop apps.

Matrix OS runs any kind of app -- from single-file HTML to full-stack Next.js, Python, or Rust apps. Each app lives in ~/matrixos/apps/ as files you own.

App Types

TypeRuntimeBuild StepExample
Static HTMLServed directly by gatewayNoneCalculator, games
Node (Vite/Next.js)pnpm dev processpnpm installDashboards, CRMs
Python (Flask/FastAPI)python main.pypip install -r requirements.txtData tools, ML apps
Rust/GoCompiled binaryBuild stepPerformance-critical services
DockerContainerImage pullChromium browser, VS Code

App Manifest (matrix.json)

Every non-trivial app has a matrix.json manifest in its directory:

{
  "name": "My Dashboard",
  "description": "Sales analytics dashboard",
  "runtime": "node",
  "entry": "pnpm dev",
  "port": 3100,
  "framework": "nextjs",
  "permissions": ["network", "database"],
  "resources": { "memory": "256MB", "cpu": 0.5 }
}
FieldRequiredDescription
nameYesDisplay name in dock and window title
descriptionNoShort description for the app store
runtimeNostatic (default), node, python, rust, docker
entryNoStart command (e.g., pnpm dev, python main.py)
portNoPort the app listens on (auto-assigned from 3100-3999 if omitted)
frameworkNoFramework hint: nextjs, vite, flask, etc.
permissionsNoCapabilities: network, database, filesystem
resourcesNoResource limits: memory (default 256MB), cpu (default 0.5)
autoStartNoStart automatically on gateway boot (default false)

Backward compatibility

Apps with matrix.md (the older convention) still work. The gateway reads matrix.md if matrix.json is absent and converts it internally.

App Lifecycle

The gateway manages app processes through the app manager:

  1. Registration: new directory detected in ~/apps/ or uploaded via API
  2. Start: gateway spawns the process based on runtime and entry
  3. Health check: gateway polls the app port until it responds (timeout 30s)
  4. Running: gateway reverse-proxies requests from /modules/{name}/* to the app port
  5. Stop: graceful shutdown via SIGTERM, then SIGKILL after 5s

API Endpoints

EndpointMethodDescription
/api/appsGETList all apps with status (running/stopped/error)
/api/apps/:name/startPOSTStart an app
/api/apps/:name/stopPOSTStop an app
/modules/:name/**Reverse proxy to running app

Pre-Installed Games

Matrix OS ships with polished games in ~/apps/games/:

  • Solitaire -- Klondike with drag-and-drop, win animations, undo
  • Chess -- vs AI (stockfish.js with 3 difficulty levels) or vs friend
  • Backgammon -- vs AI, animated dice, doubling cube
  • Snake -- classic gameplay, increasing speed, high scores
  • 2048 -- swipe/keyboard input, tile merge animations
  • Minesweeper -- 3 difficulty levels, flag/chord click
  • Tetris -- 7-bag randomizer, ghost piece, hold, level progression

All games persist high scores via the bridge API and are accessible from the Game Launcher app.

Core Utility Apps

  • File Manager -- browse ~/matrixos/, create/rename/delete files, drag-drop upload, file preview
  • Calculator -- scientific calculator with keyboard input and history
  • Calendar -- month/week/day views, events from cron jobs
  • Clock/Weather -- analog + digital clock, weather via free API, ambient mode

Bundled Desktop Apps

Two heavyweight apps make Matrix OS feel like a real desktop:

Chromium Browser

Full Chromium running headless via Kasm/noVNC, rendered in a Matrix OS window. The AI agent connects to the same Chromium instance via Playwright for web automation, scraping, and form filling.

VS Code (code-server)

Full VS Code via code-server, served in an iframe. Connected to your ~/matrixos/ files with pre-installed extensions for TypeScript, Python, Markdown, and Git.

Resource requirements

Browser and VS Code each require ~512MB RAM. They are available as premium features on cloud deployments.

Building Apps with AI

Ask the AI to build apps by describing what you want:

Build me an expense tracker with categories and charts

The Builder agent selects the best approach (HTML for simple apps, React for complex ones) and uses domain-specific skills to follow best practices. Apps appear in the dock within seconds.

AI Skills for App Building

The AI has pre-loaded skills for building Matrix OS apps:

SkillPurpose
build-for-matrixMaster skill: manifest format, bridge API, theming, permissions
build-react-appReact module scaffold, state management, bridge API integration
build-html-appSingle-file HTML apps, CDN imports, inline theming
build-nextjs-appNext.js 16 scaffold with App Router and server components
build-vite-appVite + React scaffold with HMR
build-python-appFastAPI/Flask scaffold with virtualenv
build-dashboardData visualization with Chart.js/recharts, responsive grids
build-crud-appCRUD patterns with bridge API, list/detail views, forms
build-gameCanvas 2D games, p5.js, physics, score persistence
design-matrix-appUX/UI guidelines for Matrix OS apps

Deploying Apps from External Sources

You can bring apps from outside Matrix OS:

  • CLI: matrix push ./my-app -- uploads a directory to ~/apps/
  • Upload API: POST /api/apps with multipart form data
  • Drag and drop: drop a folder or zip file onto the desktop
  • Chat: paste code or describe what to install
  • Git: push to your ~/matrixos/ git remote

How is this guide?

On this page