NexusCLI - TRI CLI Control Plane (Claude/Codex/Gemini/Qwen)
NexusCLI is a lightweight, Termux-first AI cockpit that orchestrates Claude Code, Codex CLI, Gemini CLI, and Qwen Code CLI from a single web/terminal UI. It supports live streaming, interrupts, session resume, workspace isolation, and remote voice input with auto HTTPS setup.
---


---
- Multi-engine orchestration (Claude, Codex, Gemini, Qwen)
- SSE streaming with realtime tool statusbar
- Interrupt/stop per engine
- Session resume + native session import across engines
- Workspace isolation, switching, and history
- File & image attachments (vision models supported)
- Model selector (think mode + reasoning levels where available)
- Voice input (browser STT, optional Whisper via OpenAI key)
- Conversation search + pin/bookmark
- Built-in jobs runner API for shell tasks
- Config API + rate limiting on chat endpoints
- Auto-update check on start with interactive prompt
- nexuscli update command to update and restart server
| Engine | Models | Provider |
|--------|--------|----------|
| Claude (native) | Opus 4.5, Sonnet 4.5, Haiku 4.5 | Anthropic |
| Claude-compatible | DeepSeek (deepseek-*), GLM-4.7 | DeepSeek, Z.ai |
| Codex | GPT-5.2 Codex, GPT-5.2, GPT-5.1 Codex (Mini/Max), GPT-5.1 | OpenAI |
| Gemini | Gemini 3 Pro Preview, Gemini 3 Flash Preview | Google |
| Qwen | coder-model, vision-model | Alibaba |
---
``bashFrom npm
npm install -g @mmmbuto/nexuscli@0.9.13
$3
`bash
Latest (default)
npm install -g @mmmbuto/nexuscli@0.9.13Stable channel (pinned)
npm install -g @mmmbuto/nexuscli@stable
`Setup
`bash
nexuscli init
`Start
`bash
nexuscli start
`$3
| Protocol | Port | URL | Use Case |
|----------|------|-----|----------|
| HTTP | 41800 |
http://localhost:41800 | Local access |
| HTTPS | 41801 | https:// | Remote access, voice input |> Note: HTTPS is required for microphone access from remote devices (browser security).
> Self-signed certificates are auto-generated on first run.
---
Commands (CLI)
| Command | Description |
|---------|-------------|
|
nexuscli init | Setup wizard (config, certs, data) |
| nexuscli start | Start server (HTTP 41800 / HTTPS 41801) |
| nexuscli stop | Stop server |
| nexuscli status | Status and available engines |
| nexuscli engines | Manage engines |
| nexuscli workspaces | Manage workspaces |
| nexuscli model | Default model |
| nexuscli api | Additional API keys (e.g., Whisper) |
| nexuscli logs | View server logs |
| nexuscli users | Users |
| nexuscli setup-termux | Termux helpers (services, paths) |
| nexuscli update | Update NexusCLI and restart server |
| nexuscli upgrade | Alias for update |
| nexuscli uninstall | Remove NexusCLI |> Note: On
nexuscli start, an update check runs (cached) and will prompt in interactive shells.API Keys
Configure API keys for additional providers:
`bash
nexuscli api list # List configured keys
nexuscli api set deepseek # DeepSeek models
nexuscli api set zai # GLM-4.7 (Z.ai Anthropic-compatible)
nexuscli api set openai # Voice input (Whisper STT)
nexuscli api set openrouter # Future: Multi-provider gateway
nexuscli api delete # Remove key
`> Note: Claude/Codex/Gemini/Qwen keys are managed by their respective CLIs.
> OpenAI key enables voice input via Whisper. HTTPS auto-generated for remote mic access.
---
Requirements
- Node.js 18+
- At least one CLI installed:
- Claude Code CLI (
claude)
- Codex CLI (codex)
- Gemini CLI (gemini)
- Qwen Code CLI (qwen)---
Termux-First Architecture
NexusCLI is designed primarily for Termux on Android devices.
$3
- Termux - primary runtime environment
- tmux (optional) - session management (user-managed)
- Node.js + SSE - lightweight backend
- React - minimal UI
$3
This project exists to study:
- terminal-driven AI orchestration
- ultra-light architectures for constrained devices
- mobile development workflows
It is a research and learning tool.
---
Battery / Keep-Alive (Android)
Android can kill background processes aggressively. NexusCLI does not keep
engine CLIs alive in background; it spawns them on demand and resumes sessions.
Keep NexusCLI alive (when you need it running):
- Disable battery optimization for Termux (Android Settings → Battery → Unrestricted).
- Enable wake-lock + notifications (via
nexuscli config).
- Install Termux:Boot to auto-restart after reboot or app kill.
- Keep a persistent notification (Termux:API helps prevent background kill).Reduce battery usage (when you don't need it always-on):
- Stop server when idle:
nexuscli stop.
- Disable wake-lock and notifications when not needed.
- Prefer lighter models and lower reasoning settings.---
API Endpoints
| Endpoint | Engine | Description |
|----------|--------|-------------|
|
POST /api/v1/chat | Claude | SSE streaming chat |
| POST /api/v1/codex | Codex | SSE streaming chat |
| POST /api/v1/gemini | Gemini | SSE streaming chat |
| POST /api/v1/qwen | Qwen | SSE streaming chat |
| POST /api/v1/chat/interrupt | Claude | Stop running generation |
| POST /api/v1/codex/interrupt | Codex | Stop running generation |
| POST /api/v1/gemini/interrupt | Gemini | Stop running generation |
| POST /api/v1/qwen/interrupt | Qwen | Stop running generation |
| GET /api/v1/models | All | List available models |
| GET /api/v1/config | - | Get user preferences (default model) |
| POST /api/v1/sessions/import | - | Import native sessions (admin) |
| POST /api/v1/jobs | - | Run a background job (SSE stream) |
| GET /api/v1/workspaces | - | List workspaces from sessions |
| GET /health | - | Health check |---
Development
`bash
Clone
git clone https://github.com/DioNanos/nexuscli.git
cd nexuscliInstall deps
npm install
cd frontend && npm install && npm run build && cd ..Run dev
npm run dev
`---
PTY Support (Shared Library)
NexusCLI uses
@mmmbuto/pty-termux-utils as a shared library for PTY
management across all Termux CLI projects (Gemini, Qwen, Nexus).- Native PTY: Uses
@mmmbuto/node-pty-android-arm64@~1.1.0 when available
- Linux ARM64: Uses @lydell/node-pty-linux-arm64@~1.2.0-beta.2 when available
- Fallback: Gracefully degrades to child_process adapter
- Debug Logging: Enable with PTY_DEBUG=1 environment variable
- Architecture: See @mmmbuto/pty-termux-utils documentation`bash
Enable PTY debug logging
PTY_DEBUG=1 nexuscli start
`---
Changelog
See CHANGELOG.md for version history.
---
License
MIT License.
See
LICENSE` for details.