Disclaimer: This is a personal project and is not related to https://github.com/sst/opencode or the SST team. This portal is a personal-built interface for interacting with OpenCode instances.
A web-based UI for OpenCode, the AI coding agent. This portal provides a browser interface to interact with OpenCode sessions, view messages, and chat with the AI assistant.
The easiest way to run OpenCode Portal is using npx:
# Navigate to your project directory
cd /path/to/your/project
# Run OpenCode Portal
npx openportalThis will:
- Start the OpenCode server on port 4000
- Start the web UI on port 3000
- Open your browser automatically
You can also install globally:
npm install -g openportal
# Then run in any project directory
openportalopenportal [options]
Options:
-V, --version output the version number
-p, --port <port> Port for web UI (default: "3000")
--opencode-port <port> Port for OpenCode server (default: "4000")
-d, --directory <path> Working directory for OpenCode
--no-browser Do not open browser automatically
--skip-opencode-check Skip OpenCode installation check
-h, --help display help for commandOpenCode must be installed on your system. Install it using one of these methods:
# Using curl (macOS/Linux)
curl -fsSL https://opencode.ai/install | bash
# Using npm
npm install -g opencode
# Using Homebrew (macOS)
brew install sst/tap/opencodeOpenCode Portal connects to a running OpenCode server and provides:
- Session management (create, view, delete sessions)
- Real-time chat interface with the AI assistant
- File mention support (
@filenameto reference files) - Model selection
- Dark/light theme support
OpenCode comes with its own official web UI that you can access by running:
opencode --port 4096However, the official UI is currently under development and has some limitations:
- Not mobile responsive
- Limited mobile experience
This project was inspired by my personal need to access OpenCode from my mobile device when I don't have my laptop around. The goal is to provide a mobile-first, responsive interface for interacting with OpenCode instances remotely.
This portal is designed for remote access to your OpenCode instance. Deploy the portal on a VPS alongside OpenCode, then use Tailscale (or similar VPN) to securely connect from your mobile device or any other machine.
Example setup:
[Your Phone] ---(Tailscale)---> [VPS running Portal + OpenCode]
- Next.js - React framework
- IntentUI - UI library
- Tailwind CSS - Styling
- Elysia - API routing
- OpenCode SDK - OpenCode API client
Contributions are welcome! Here's how you can help:
- Bugs: Report bugs by opening an issue with a clear description and steps to reproduce
- Feature requests: Open an issue with the
featurelabel and describe the proposed enhancement
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/portal.git cd portal - Install dependencies:
bun install
- Run the development server:
bun dev
- Create a feature branch from
main - Make your changes following the existing code style
- Test your changes thoroughly
- Update documentation if needed
- Submit a pull request with a clear description
- Use TypeScript for all new code
- Follow the existing component patterns in
apps/web/src/components/ - Use Tailwind CSS for styling
- Maintain consistent naming conventions
- Add proper TypeScript types
- Check existing issues before creating new ones
- Join the discussion in existing issues
- Be respectful and constructive in all interactions
MIT