# aishervin/terminux architecture

> Architecture diagram of the GitHub repository aishervin/terminux, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aishervin/terminux
- Repository: https://github.com/aishervin/terminux

## Overview

Terminux provisions an Ubuntu-based OpenCode environment in Termux, then launches a localhost service and opens its paired web UI. The map also preserves the branded UI skin and repository-provided agent skills. README statements support the install/runtime flow and documented capabilities; source excerpts show the skin’s internal calls. Installer, launcher, and skill implementations were not sampled, so their internal interactions are limited to documented relationships.

Main entry points: [`bin/termunix`](https://github.com/aishervin/terminux/blob/main/bin/termunix) (Command launcher), [`install.sh`](https://github.com/aishervin/terminux/blob/main/install.sh) (Setup installer), [`skin/src/gui.ts`](https://github.com/aishervin/terminux/blob/main/skin/src/gui.ts) (GUI plugin), [`skills/android-github-actions-build/SKILL.md`](https://github.com/aishervin/terminux/blob/main/skills/android-github-actions-build/SKILL.md) (Android build skill)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_provision["Environment Provisioning"]
  node_installer["Setup installer<br/>[install.sh]"]
  node_ubuntu["Ubuntu environment"]
  node_opencode["OpenCode"]
  node_repo["Terminux checkout"]
end

subgraph group_runtime["Launcher Runtime"]
  node_launcher["Command launcher"]
  node_health["Health checks<br/>[Doctor.sh]"]
  node_service["Local service"]
  node_pairing["Pairing link"]
end

subgraph group_skin["Mobile UI Skin"]
  node_skin_entry["GUI plugin<br/>[gui.ts]"]
  node_brand["Brand settings<br/>[brand.ts]"]
  node_logo["Embedded logo<br/>[logo.ts]"]
  node_theme["Theme builder<br/>[theme.ts]"]
  node_styles["Style builder<br/>[styles.ts]"]
end

subgraph group_skills["Agent Skills"]
  node_android_skill["Android build skill<br/>[SKILL.md]"]
  node_build_workflows["Build workflows<br/>[main-build.yml]"]
  node_release_workflow["Release workflow<br/>[release.yml]"]
  node_guide_skill["Terminux guide<br/>[SKILL.md]"]
end

node_user(("Android user"))
node_termux["Termux"]
node_browser(("Android browser"))

node_user -->|"runs on"| node_termux
node_termux -->|"runs installer"| node_installer
node_installer -->|"provisions"| node_ubuntu
node_installer -->|"installs"| node_opencode
node_installer -->|"checks out"| node_repo
node_user -->|"runs commands"| node_launcher
node_launcher -->|"checks health"| node_health
node_launcher -->|"starts or stops"| node_service
node_launcher -->|"updates checkout"| node_repo
node_launcher -->|"creates pairing"| node_pairing
node_launcher -->|"opens browser"| node_browser
node_service -->|"serves localhost UI"| node_browser
node_pairing -->|"authorizes access"| node_browser
node_opencode -.->|"loads GUI plugin"| node_skin_entry
node_skin_entry -->|"reads settings"| node_brand
node_brand -->|"imports logo"| node_logo
node_skin_entry -->|"builds theme"| node_theme
node_skin_entry -->|"builds CSS"| node_styles
node_theme -->|"uses palette"| node_brand
node_styles -->|"uses settings"| node_brand
node_android_skill -->|"documents workflows"| node_build_workflows
node_android_skill -->|"documents workflows"| node_release_workflow
node_user -->|"uses build guidance"| node_android_skill
node_user -->|"uses environment guide"| node_guide_skill
node_repo -->|"provides skill"| node_android_skill
node_repo -->|"provides skill"| node_guide_skill

click node_installer "https://github.com/aishervin/terminux/blob/main/install.sh"
click node_launcher "https://github.com/aishervin/terminux/blob/main/bin/termunix"
click node_health "https://github.com/aishervin/terminux/blob/main/Doctor.sh"
click node_skin_entry "https://github.com/aishervin/terminux/blob/main/skin/src/gui.ts"
click node_brand "https://github.com/aishervin/terminux/blob/main/skin/src/brand.ts"
click node_logo "https://github.com/aishervin/terminux/blob/main/skin/src/logo.ts"
click node_theme "https://github.com/aishervin/terminux/blob/main/skin/src/theme.ts"
click node_styles "https://github.com/aishervin/terminux/blob/main/skin/src/styles.ts"
click node_android_skill "https://github.com/aishervin/terminux/blob/main/skills/android-github-actions-build/SKILL.md"
click node_build_workflows "https://github.com/aishervin/terminux/blob/main/skills/android-github-actions-build/references/main-build.yml"
click node_release_workflow "https://github.com/aishervin/terminux/blob/main/skills/android-github-actions-build/references/release.yml"
click node_guide_skill "https://github.com/aishervin/terminux/blob/main/skills/terminux-guide/SKILL.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_installer,node_ubuntu,node_opencode,node_repo,node_user,node_browser toneBlue
class node_launcher,node_health,node_service,node_pairing toneAmber
class node_skin_entry,node_brand,node_logo,node_theme,node_styles toneMint
class node_android_skill,node_build_workflows,node_release_workflow,node_guide_skill toneRose
class node_termux toneIndigo
```

## Components

### Environment Provisioning

- [Setup installer](https://github.com/aishervin/terminux/blob/main/install.sh): `install.sh`
- **Ubuntu environment**
- **OpenCode**
- **Terminux checkout**

### Launcher Runtime

- [Command launcher](https://github.com/aishervin/terminux/blob/main/bin/termunix): `bin/termunix`
- [Health checks](https://github.com/aishervin/terminux/blob/main/Doctor.sh): `Doctor.sh`
- **Local service**
- **Pairing link**

### Mobile UI Skin

- [GUI plugin](https://github.com/aishervin/terminux/blob/main/skin/src/gui.ts): `skin/src/gui.ts`
- [Brand settings](https://github.com/aishervin/terminux/blob/main/skin/src/brand.ts): `skin/src/brand.ts`
- [Embedded logo](https://github.com/aishervin/terminux/blob/main/skin/src/logo.ts): `skin/src/logo.ts`
- [Theme builder](https://github.com/aishervin/terminux/blob/main/skin/src/theme.ts): `skin/src/theme.ts`
- [Style builder](https://github.com/aishervin/terminux/blob/main/skin/src/styles.ts): `skin/src/styles.ts`

### Agent Skills

- [Android build skill](https://github.com/aishervin/terminux/blob/main/skills/android-github-actions-build/SKILL.md): `skills/android-github-actions-build/SKILL.md`
- [Build workflows](https://github.com/aishervin/terminux/blob/main/skills/android-github-actions-build/references/main-build.yml): `skills/android-github-actions-build/references/main-build.yml`
- [Release workflow](https://github.com/aishervin/terminux/blob/main/skills/android-github-actions-build/references/release.yml): `skills/android-github-actions-build/references/release.yml`
- [Terminux guide](https://github.com/aishervin/terminux/blob/main/skills/terminux-guide/SKILL.md): `skills/terminux-guide/SKILL.md`

### Other components

- **Android user**
- **Termux**
- **Android browser**

## Connections

- Android user → Termux: runs on (evidence: `README.md`)
- Termux → Setup installer: runs installer (evidence: `README.md`)
- Setup installer → Ubuntu environment: provisions (evidence: `README.md`)
- Setup installer → OpenCode: installs (evidence: `README.md`)
- Setup installer → Terminux checkout: checks out (evidence: `README.md`)
- Android user → Command launcher: runs commands (evidence: `README.md`)
- Command launcher → Health checks: checks health (evidence: `README.md`)
- Command launcher → Local service: starts or stops (evidence: `README.md`)
- Command launcher → Terminux checkout: updates checkout (evidence: `README.md`)
- Command launcher → Pairing link: creates pairing (evidence: `README.md`)
- Command launcher → Android browser: opens browser (evidence: `README.md`)
- Local service → Android browser: serves localhost UI (evidence: `README.md`)
- Pairing link → Android browser: authorizes access (evidence: `README.md`)
- OpenCode → GUI plugin: loads GUI plugin
- GUI plugin → Brand settings: reads settings (evidence: `skin/src/gui.ts`)
- Brand settings → Embedded logo: imports logo (evidence: `skin/src/brand.ts`)
- GUI plugin → Theme builder: builds theme (evidence: `skin/src/gui.ts`)
- GUI plugin → Style builder: builds CSS (evidence: `skin/src/gui.ts`)
- Theme builder → Brand settings: uses palette (evidence: `skin/src/theme.ts`)
- Style builder → Brand settings: uses settings (evidence: `skin/src/styles.ts`)
- Android build skill → Build workflows: documents workflows (evidence: `README.md`)
- Android build skill → Release workflow: documents workflows (evidence: `README.md`)
- Android user → Android build skill: uses build guidance (evidence: `README.md`)
- Android user → Terminux guide: uses environment guide (evidence: `README.md`)
- Terminux checkout → Android build skill: provides skill (evidence: `README.md`)
- Terminux checkout → Terminux guide: provides skill (evidence: `README.md`)
