<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: 诺离</title>
    <description>The latest articles on Forem by 诺离 (@nuoli_dev).</description>
    <link>https://forem.com/nuoli_dev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3810532%2F81ce6d5e-ed1e-479f-9c0d-c3de985c7d7e.png</url>
      <title>Forem: 诺离</title>
      <link>https://forem.com/nuoli_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nuoli_dev"/>
    <language>en</language>
    <item>
      <title>I Built AI Hub — A Self-Hosted Multi-Session AI Chat Platform with Claude Code CLI Under the Hood</title>
      <dc:creator>诺离</dc:creator>
      <pubDate>Sat, 07 Mar 2026 04:42:35 +0000</pubDate>
      <link>https://forem.com/nuoli_dev/i-built-ai-hub-a-self-hosted-multi-session-ai-chat-platform-with-claude-code-cli-under-the-hood-599g</link>
      <guid>https://forem.com/nuoli_dev/i-built-ai-hub-a-self-hosted-multi-session-ai-chat-platform-with-claude-code-cli-under-the-hood-599g</guid>
      <description>&lt;p&gt;Hey folks 👋&lt;/p&gt;

&lt;p&gt;I've been working on a project called &lt;strong&gt;AI Hub&lt;/strong&gt; and wanted to share it with the community. It's a self-hosted, web-based multi-session AI chat platform that uses &lt;strong&gt;Claude Code CLI&lt;/strong&gt; as its agent engine — and it's fully open source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/cih1996/ai-hub" rel="noopener noreferrer"&gt;https://github.com/cih1996/ai-hub&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Built This
&lt;/h2&gt;

&lt;p&gt;I was tired of juggling multiple terminal windows running Claude Code CLI sessions. I wanted a clean web UI where I could manage multiple AI conversations simultaneously, with real-time streaming, persistent history, and the full power of Claude Code's agentic capabilities — all from my browser.&lt;/p&gt;

&lt;p&gt;So I built AI Hub.&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Does
&lt;/h2&gt;

&lt;p&gt;AI Hub wraps Claude Code CLI into a proper web application. Here's the architecture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vue 3 Frontend ←WebSocket/REST→ Go Backend ←Persistent Subprocess Pool→ Claude Code CLI
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-session management&lt;/strong&gt; — Run multiple Claude Code sessions in parallel, each with its own context and history&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time streaming&lt;/strong&gt; — WebSocket-based message streaming, so you see responses as they're generated&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single binary deployment&lt;/strong&gt; — The entire app (frontend + backend) compiles into one Go binary via &lt;code&gt;go embed&lt;/code&gt;. No Docker, no nginx, just download and run&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI-compatible API&lt;/strong&gt; — Expose your Claude Code sessions as an OpenAI-format API endpoint, so you can plug AI Hub into any tool that speaks OpenAI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Triggers (Scheduled Tasks)&lt;/strong&gt; — Set up cron-like triggers to send messages to sessions on a schedule. Great for automated workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Channels&lt;/strong&gt; — Connect external platforms like QQ and Feishu (Lark) as message channels, turning AI Hub into a chatbot backend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Project Rules&lt;/strong&gt; — Manage per-project system prompts and rules that persist across sessions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Go (Gin framework, WebSocket, SQLite)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Vue 3 + TypeScript + Vite&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent Engine:&lt;/strong&gt; Claude Code CLI (runs as persistent subprocesses)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment:&lt;/strong&gt; Single binary via &lt;code&gt;go embed&lt;/code&gt; — supports macOS, Linux, and Windows&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;

&lt;p&gt;Getting started takes about 30 seconds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Make sure Claude Code CLI is installed&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @anthropic-ai/claude-code# 2. Download the latest release from GitHub
&lt;span class="c"&gt;# https://github.com/cih1996/ai-hub/releases&lt;/span&gt;

&lt;span class="c"&gt;# 3. Run it&lt;/span&gt;
./ai-hub

&lt;span class="c"&gt;# 4. Open http://localhost:8080 in your browser&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. No containers, no reverse proxies, no config files. One binary, one command.&lt;/p&gt;

&lt;h2&gt;
  
  
  The OpenAI-Compatible API
&lt;/h2&gt;

&lt;p&gt;One thing I'm particularly proud of is the OpenAI-compatible API layer. Once AI Hub is running, you get an endpoint at &lt;code&gt;http://localhost:8080/api/v1/chat/completions&lt;/code&gt; that speaks the OpenAI format.&lt;/p&gt;

&lt;p&gt;This means you can use AI Hub as a backend for tools like Cursor, Continue, or any OpenAI-compatible client — but powered by Claude Code CLI under the hood.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;I'm actively working on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More channel integrations (Slack, Discord, Telegram)&lt;/li&gt;
&lt;li&gt;Enhanced memory and context management&lt;/li&gt;
&lt;li&gt;Plugin system for extending agent capabilities&lt;/li&gt;
&lt;li&gt;Better multi-user support&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It Out
&lt;/h2&gt;

&lt;p&gt;If you're interested, check out the repo: &lt;strong&gt;&lt;a href="https://github.com/cih1996/ai-hub" rel="noopener noreferrer"&gt;github.com/cih1996/ai-hub&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stars and feedback are always appreciated ⭐&lt;/p&gt;

&lt;p&gt;Would love to hear your thoughts — especially if you're already using Claude Code CLI and want a better way to manage sessions. Drop a comment below!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>go</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
