Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md
CodeHelm

Run Codex locally. Control it from Discord.

Approve, resume, interrupt, and monitor AI coding work from your phone.

CodeHelm lets you start, resume, approve, interrupt, and monitor local Codex sessions from a Discord thread.

npm Bun TypeScript Discord


English · 中文


Demo · Quick Start · Workflow · Discord Setup · Development

⚡ Overview

CodeHelm runs a local daemon, manages a local Codex App Server, and turns a Discord channel into a control surface for Codex sessions. You can set a workdir, start or resume a session, approve requests, interrupt a running turn, and follow progress in one Discord thread instead of bouncing between tools.

Perfect for:

  • approving Codex actions while away from your terminal
  • keeping AI coding sessions visible to your team
  • resuming long-running sessions without losing context

You only need to: start CodeHelm locally, connect Codex to the printed remote address, and use the configured Discord channel.

CodeHelm will return: a managed Discord thread attached to a real Codex session, with transcript updates, approval controls, and final output in one place.

Demo

CodeHelm Discord remote-control demo

Workflow

  1. Start the local daemon: CodeHelm connects to Discord and starts a managed Codex App Server on loopback.
  2. Connect Codex: run codex --remote <ws-url> with the address printed by code-helm start.
  3. Choose a workdir: use /workdir in the configured Discord control channel.
  4. Create or resume a session: use /session-new or /session-resume.
  5. Work inside the managed thread: send follow-up messages, approve requests, inspect status, interrupt turns, and read the final answer.

Each managed Discord thread stays attached to one Codex session, so you can leave and come back later without starting from scratch.

Quick Start

Install

Prerequisites

Tool or setupRequirementCheck
BunInstalled on the machine running CodeHelmbun --version
CodexInstalled on the same machinecodex --version
Discord botBot token, target server, control channelDiscord setup guide
Discord channelText or announcement channel with public threadsCheck channel permissions
Bot intentMessage Content Intent enabledDiscord Developer Portal

1. Install CodeHelm

Choose one install method:

npm install -g code-helm
bun add -g code-helm

Bun is still required at runtime even if you install the package with npm.

2. Onboard Discord

code-helm onboard

The guided setup asks for:

  • your Discord bot token
  • the target guild
  • the control channel

3. Start CodeHelm

Foreground:

code-helm start

Background:

code-helm start --daemon

By default, CodeHelm starts the managed Codex App Server at ws://127.0.0.1:4200.

If that port is already in use, choose another port for this run:

code-helm start --port 4201
code-helm start --daemon --port 4201

4. Connect Codex

Use the address printed by code-helm start:

codex --remote <ws-url>

If you want Codex to start in your current shell directory:

codex -C "$(pwd)" --remote <ws-url>

5. Control Sessions From Discord

Control-channel commands:

CommandPurpose
/workdirSet the current local workdir
/session-newStart a fresh Codex session
/session-resumeReattach an existing Codex session
/session-closeClose the current managed session thread
/session-syncRecover a degraded managed session thread

Managed-thread commands and actions:

Command or actionPurpose
Send a normal thread messageContinue the Codex conversation
Approval buttonsApprove or decline Codex requests
/statusShow the current managed session status
/interruptInterrupt the current Codex turn

Commands

CommandPurpose
code-helm onboardConfigure the Discord bot and control channel
code-helm startRun CodeHelm in the foreground
code-helm start --daemonRun CodeHelm in the background
code-helm statusShow daemon state and the Codex remote URL
code-helm stopStop the background daemon
code-helm checkCheck whether a newer package is available
code-helm updateUpdate the installed package
code-helm autostart enableStart the daemon at login on macOS
code-helm autostart disableRemove the login-startup entry on macOS
code-helm uninstallRemove local CodeHelm config, state, and db
code-helm versionPrint the installed version

Development

For local repository development:

bun install
bun test
bun run typecheck

Useful development commands:

bun run dev
bun run migrate

关于 About

Control your local Codex sessions remotely through Discord on your phone or browser.
ai-codingautomationbunclicodexcoding-agentdeveloper-toolsdiscord-botlocal-firstopenai-codexremote-controltypescript

语言 Languages

TypeScript100.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
361
Total Commits
峰值: 193次/周
Less
More

核心贡献者 Contributors