hosenur/portal
Self-hosted CLI and mobile web UI for managing OpenCode sessions and workspaces
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Portal is an independent TypeScript UI and launcher, not a replacement for the coding agent. The CLI starts OpenCode and a separate web service, and the browser is the entry point for interacting with the agent. React Router, IntentUI, and Tailwind CSS make up the frontend stack; Nitro provides the server layer, and the OpenCode integration uses the OpenCode SDK.
The repository separates apps/ and packages/, with shared build and development scripts at the root and web components in apps/web/src/components/. The explicit integration surface is the agent backend. Codex and Claude support broadens that surface, but it does not establish a public plugin API or an MCP server interface.
Key Capabilities & Differentiators
Portal supports creating, viewing, and deleting sessions, chatting in real time, referencing files with @filename, and choosing a model. Git integration, an in-browser terminal, and isolated workspaces extend the workflow beyond chat, though the workspace mechanism is not specified well enough to treat it as a security sandbox.
Release cli-v0.1.30 updated interactive question support, and cli-v0.1.31 stabilized OpenCode chat integration. cli-v0.1.32 adds Codex and Claude backends, searchable model selection, and visible chat errors. These changes establish a broader backend surface, not feature parity or a common model and credential matrix across backends.
Trade-offs & Limitations
OpenCode can already serve its own browser UI with opencode --port 4096. If that interface meets your needs, it avoids deploying and maintaining Portal’s separate web service. Portal earns that extra operational cost when mobile access, instance lifecycle commands, and project tools such as the browser terminal materially improve the workflow.
The default 0.0.0.0 binding and the presence of a terminal make network exposure an important deployment decision. Keep access private unless authentication, authorization, and workspace boundaries have been verified for your setup. The MIT license permits commercial use and modification, but it does not cover external agent or model service terms.
Hardware & Deployment Guide
For the OpenCode path, install OpenCode on the host and run bunx openportal from the project directory. Bun is recommended; the root manifest declares Node.js >=20.19.0, but Node execution may have rough edges. The default launch uses ports 3000 for the UI and 4000 for OpenCode, choosing available ports on conflict. Use --directory, --port, --opencode-port, and --hostname to control placement and binding.
For phone access, run Portal and OpenCode on the same host or VPS and connect over Tailscale or a similar VPN. Restrict ingress explicitly because the default bind address is 0.0.0.0. Self-hosting the UI does not establish offline inference; validate connectivity and credentials for the selected backend. cli-v0.1.31 added file locking around writes to ~/.portal.json, a concrete improvement when CLI commands update instance state concurrently.
@filename.cli-v0.1.32 adds Codex and Claude backends, searchable model selection, and visible chat errors.0.0.0.0.Developers who keep an agent running on a workstation or VPS and want to resume sessions, reference files, or use a project terminal from a phone over a private network.
OpenCode’s built-in web UI already covers your needs, or your rollout depends on verified tenant isolation, public-facing access controls, or fully offline inference.
Quick Start & Installation
# Navigate to your project directory cd /path/to/your/project # Run OpenCode Portal bunx openportal
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| portal ★ | 816 | +1 | TypeScript | MIT | Self-hosted CLI and mobile web UI for managing OpenCode sessions and workspaces |
| cc-switch | 159.1k | +1.7k | Rust | MIT | Tauri desktop manager for AI coding providers, local routing, and MCP config |
| herdr | 54.1k | +871 | Rust | Apache-2.0 | Rust terminal multiplexer for persistent, multi-machine coding-agent workspaces |
| magpie | 45.5k | +2.9k | Go | MIT | A local API gateway that pools model subscriptions across coding agents |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/hosenur/portal.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about portal
How does Portal connect to OpenCode, and can I start the backend without the UI?
openportal command starts the web UI and OpenCode. The browser is the user-facing client, while the OpenCode integration uses the OpenCode SDK to work with a running server. Use openportal run when you want to start only the OpenCode server, without the Portal UI.What hardware does a self-hosted instance need?
Can a company self-host or redistribute Portal?
When should I choose Portal over OpenCode’s built-in web UI?
opencode --port 4096. Test it first if you mainly need desktop chat and session access. Portal is worth the added service when phone usability, CLI-managed instances, and an in-browser terminal are important to your workflow.Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy