# Repository Briefing: hosenur/portal
> Source: https://repoforai.com/repo/hosenur/portal (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/hosenur/portal
- **Official Docs / Website**: https://openportal.space
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: B (55/100 · Maintenance 6/35 · Adoption 15/25 · Releases 14/20 · License 20/20)
- **Latest Release**: cli-v0.1.32 (2026-05-12) — https://github.com/hosenur/portal/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Self-Hosted, CLI
- **Momentum**: 816 ★ total (+0 24h / +1 7d) · 69 forks
- **Topics**: `ai`, `ai-agent`, `ai-agents`, `opencode`
- **When to Use**: Best for: 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. Skip if: 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.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Stack: React Router, IntentUI, and Tailwind CSS for the frontend; Nitro for the server and the OpenCode SDK for agent integration.
- Instance management: The CLI starts both services or OpenCode alone, lists and stops instances, and cleans stale entries.
- Chat workflow: Create, view, and delete sessions, exchange messages in real time, and reference files with `@filename`.
- Project tooling: Git integration, an in-browser terminal, and isolated workspaces; the workspace isolation mechanism is not established.
- Backend evolution: `cli-v0.1.32` adds Codex and Claude backends, searchable model selection, and visible chat errors.
- Network defaults: UI on port 3000, OpenCode on 4000, free-port fallback, and a default bind address of `0.0.0.0`.
```

## Quick Start / Clone
```bash
# Navigate to your project directory
cd /path/to/your/project

# Run OpenCode Portal
bunx openportal
```
