# acheronxu/terminal_worse architecture

> Architecture diagram of the GitHub repository acheronxu/terminal_worse, 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/acheronxu/terminal_worse
- Repository: https://github.com/acheronxu/terminal_worse

## Overview

terminal_worse is an iOS terminal app fork with two major additions: a launch-time sandbox-mount and inspection command set, and a native plugin environment for package management and command execution. The documented user flow starts in the terminal, mounts accessible containers under _sandbox, then allows shell commands to inspect or operate on them. A separate flow initializes the plugin prefix and installs or runs compatible packages. The README documents these relationships; the implementation source was not sampled, so the graph does not infer internal call structure beyond those documented flows.

Main entry points: [`env/apt`](https://github.com/acheronxu/terminal_worse/blob/main/env/apt) (Package frontend), [`src/TerminalSBX.m`](https://github.com/acheronxu/terminal_worse/blob/main/src/TerminalSBX.m) (Sandbox commands), [`env/termenv`](https://github.com/acheronxu/terminal_worse/blob/main/env/termenv) (Plugin prefix), [`env/pkgtool`](https://github.com/acheronxu/terminal_worse/blob/main/env/pkgtool) (Python backend)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sandbox["Sandbox access"]
  node_sbx["Sandbox commands<br/>[TerminalSBX.m]"]
  node_mount["Container auto-mount<br/>[TerminalSBX.m]"]
  node_inspect["Container inspection<br/>[TerminalSBX.m]"]
  node_extensions["Extension handles<br/>[TerminalSBX.m]"]
end

subgraph group_plugin["Plugin environment"]
  node_prefix["Plugin prefix"]
  node_apt["Package frontend"]
  node_pkgtool["Python backend"]
  node_dpkg["Package installer"]
  node_deb["Debian builder"]
  node_pluginrun["Plugin runner"]
  node_repo["Package sources"]
end

subgraph group_base["Terminal capabilities"]
  node_terminal["a-Shell terminal"]
  node_neofetch["Device summary<br/>[TerminalSBX.m]"]
  node_shell["Shell utilities"]
end

node_user(("Terminal user"))

node_user -->|"uses"| node_terminal
node_terminal -->|"runs commands"| node_sbx
node_terminal -->|"runs command"| node_neofetch
node_sbx -->|"auto-mounts"| node_mount
node_mount -->|"exposes containers"| node_inspect
node_user -->|"manages access"| node_extensions
node_user -->|"initializes"| node_prefix
node_prefix -->|"enables"| node_apt
node_user -->|"requests packages"| node_apt
node_apt -->|"fetches indexes"| node_repo
node_apt -.->|"uses backend"| node_pkgtool
node_user -->|"installs package"| node_dpkg
node_user -->|"builds package"| node_deb
node_user -->|"runs plugin"| node_pluginrun
node_user -->|"runs commands"| node_shell

click node_sbx "https://github.com/acheronxu/terminal_worse/blob/main/src/TerminalSBX.m"
click node_mount "https://github.com/acheronxu/terminal_worse/blob/main/src/TerminalSBX.m"
click node_inspect "https://github.com/acheronxu/terminal_worse/blob/main/src/TerminalSBX.m"
click node_extensions "https://github.com/acheronxu/terminal_worse/blob/main/src/TerminalSBX.m"
click node_neofetch "https://github.com/acheronxu/terminal_worse/blob/main/src/TerminalSBX.m"
click node_prefix "https://github.com/acheronxu/terminal_worse/blob/main/env/termenv"
click node_apt "https://github.com/acheronxu/terminal_worse/blob/main/env/apt"
click node_pkgtool "https://github.com/acheronxu/terminal_worse/blob/main/env/pkgtool"
click node_dpkg "https://github.com/acheronxu/terminal_worse/blob/main/env/dpkg"
click node_deb "https://github.com/acheronxu/terminal_worse/blob/main/env/mkdeb"
click node_pluginrun "https://github.com/acheronxu/terminal_worse/blob/main/env/plugin-run"
click node_shell "https://github.com/acheronxu/terminal_worse/blob/main/env/bash"

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_sbx,node_mount,node_inspect,node_extensions,node_user toneBlue
class node_prefix,node_apt,node_pkgtool,node_dpkg,node_deb,node_pluginrun,node_repo toneAmber
class node_terminal,node_neofetch,node_shell toneMint
```

## Components

### Sandbox access

- [Sandbox commands](https://github.com/acheronxu/terminal_worse/blob/main/src/TerminalSBX.m): `src/TerminalSBX.m`
- [Container auto-mount](https://github.com/acheronxu/terminal_worse/blob/main/src/TerminalSBX.m): `src/TerminalSBX.m`
- [Container inspection](https://github.com/acheronxu/terminal_worse/blob/main/src/TerminalSBX.m): `src/TerminalSBX.m`
- [Extension handles](https://github.com/acheronxu/terminal_worse/blob/main/src/TerminalSBX.m): `src/TerminalSBX.m`

### Plugin environment

- [Plugin prefix](https://github.com/acheronxu/terminal_worse/blob/main/env/termenv): `env/termenv`
- [Package frontend](https://github.com/acheronxu/terminal_worse/blob/main/env/apt): `env/apt`
- [Python backend](https://github.com/acheronxu/terminal_worse/blob/main/env/pkgtool): `env/pkgtool`
- [Package installer](https://github.com/acheronxu/terminal_worse/blob/main/env/dpkg): `env/dpkg`
- [Debian builder](https://github.com/acheronxu/terminal_worse/blob/main/env/mkdeb): `env/mkdeb`
- [Plugin runner](https://github.com/acheronxu/terminal_worse/blob/main/env/plugin-run): `env/plugin-run`
- **Package sources**

### Terminal capabilities

- **a-Shell terminal**
- [Device summary](https://github.com/acheronxu/terminal_worse/blob/main/src/TerminalSBX.m): `src/TerminalSBX.m`
- [Shell utilities](https://github.com/acheronxu/terminal_worse/blob/main/env/bash): `env/bash`

### Other components

- **Terminal user**

## Connections

- Terminal user → a-Shell terminal: uses (evidence: `README.md`)
- a-Shell terminal → Sandbox commands: runs commands (evidence: `README.md`)
- a-Shell terminal → Device summary: runs command (evidence: `README.md`)
- Sandbox commands → Container auto-mount: auto-mounts (evidence: `README.md`)
- Container auto-mount → Container inspection: exposes containers (evidence: `README.md`)
- Terminal user → Extension handles: manages access (evidence: `README.md`)
- Terminal user → Plugin prefix: initializes (evidence: `README.md`)
- Plugin prefix → Package frontend: enables (evidence: `README.md`)
- Terminal user → Package frontend: requests packages (evidence: `README.md`)
- Package frontend → Package sources: fetches indexes (evidence: `README.md`)
- Package frontend → Python backend: uses backend
- Terminal user → Package installer: installs package (evidence: `README.md`)
- Terminal user → Debian builder: builds package (evidence: `README.md`)
- Terminal user → Plugin runner: runs plugin (evidence: `README.md`)
- Terminal user → Shell utilities: runs commands (evidence: `README.md`)
