@opencode/console

Connect Claude Code, Pi, Codex, DeepSeek Harness and Hermes Agent to an OpenCode Console workspace and enforce its policies

Packages

Package details

extension

Install @opencode/console from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@opencode/console
Package
@opencode/console
Version
0.1.7
Published
Nov 8, 2026
Downloads
811/mo · 811/wk
Author
thdxr
License
MIT
Types
extension
Size
1.2 MB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./pi-extension.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@opencode/console

Connects Claude Code, Pi, Codex, DeepSeek Harness and Hermes Agent to an OpenCode Console workspace. They then use the workspace's models, MCP servers, skills and instructions, and their tool calls follow the workspace's policies. OpenCode connects to Console on its own, so OpenCode users don't need this package.

Set up Claude Code

npx @opencode/console setup claude-code

Setup opens your browser to sign in and pick a workspace, then writes Claude Code's user settings. It needs Node.js 22 or later. To update, run npx @opencode/console@latest setup claude-code.

Set up Pi

npx @opencode/console setup pi

The package is also a Pi package, so pi install npm:@opencode/console works too; run npx @opencode/console login once after it.

Set up Codex

npx @opencode/console setup codex

Setup writes Codex's ~/.codex/config.toml and hooks.json (or those in CODEX_HOME) and approves its policy hooks, so Codex runs them without asking in /hooks.

Keep your own Claude or ChatGPT sign-in

npx @opencode/console setup claude-code --keep-provider
npx @opencode/console setup codex --keep-provider
npx @opencode/console setup hermes --keep-provider

Claude Code or Codex keeps your own sign-in and models, and still gets the workspace's MCP servers, skills, instructions and policies. If the workspace counts usage from members' own subscriptions, they then send it token counts and model names, and never prompts or code. Codex reports them from a hook after each model response; it needs Codex 0.164.0 or later. An OpenTelemetry endpoint you already set for Claude Code stays yours, and Claude Code sends nothing then. npx @opencode/console status shows which applies. Hermes keeps its own providers and models the same way, and sends no usage. Run setup without --keep-provider to use the workspace's models again.

Set up DeepSeek Harness

npx @opencode/console setup deepseek-harness

Setup adds a plugin to DeepSeek Harness's ~/.dsh/cordis.patch.yml (or the one in DSH_HOME), so dsh web, dsh headless and every other profile use the workspace. While it's set up, the workspace's models replace the model providers you added to DeepSeek Harness, and new sessions start on the workspace's default model. Restart a running dsh after setup.

Set up Hermes Agent

npx @opencode/console setup hermes

Setup writes ~/.hermes/config.yaml (or the active profile's, the one in HERMES_HOME, or --profile <name>'s), adds a plugin in plugins/opencode-console and the workspace's instructions to SOUL.md. /model lists the workspace's models, and every tool call and /skill goes through the workspace's policies, in hermes chat, the messaging gateway and cron alike. It needs Hermes Agent 0.22.6 or later. Hermes loads plugins when its gateway starts, so run hermes gateway restart after setup. Hermes doesn't watch Slack threads or GitHub work yet.

Watch Slack threads, GitHub work and MCP server events

When the workspace has event watches on, sessions get updates on the Slack threads and GitHub pull requests, issues, commits and Actions runs they work on. A session watches what it posts through the workspace's Slack and GitHub servers, and the pull requests and branches gh pr create and git push start. Its watch tool watches anything else, such as a link you paste. Pi, Claude Code and DeepSeek Harness wake an idle session with the update. Codex can't start a turn on its own, so an update reaches a turn while it runs or keeps it going when it ends, and one that arrives while Codex sits idle comes with your next prompt.

A session can also watch events from the workspace's other MCP servers, such as an issue tracker's, when the server offers them over MCP Events and you can use it in the workspace. The events tool lists what each server offers, and watch takes a server, an event and that event's arguments. Console checks your access to the server again for every event. The agent is told each event comes from the server, and not to act on requests in it that you haven't made.

Other commands

npx @opencode/console status                       # Show the sign-in, workspace and config
npx @opencode/console setup claude-code --remove   # Undo the Claude Code setup and keep the sign-in
npx @opencode/console setup pi --remove            # Undo the Pi setup and keep the sign-in
npx @opencode/console setup codex --remove         # Undo the Codex setup and keep the sign-in
npx @opencode/console setup deepseek-harness --remove  # Undo the DeepSeek Harness setup and keep the sign-in
npx @opencode/console setup hermes --remove        # Undo the Hermes setup for the profile and keep the sign-in
npx @opencode/console logout                       # Sign out

To use a personal or service account key instead of signing in, for example in CI, set OPENCODE_API_KEY. npx @opencode/console help lists every command.

The guides for Claude Code, Codex, Pi, DeepSeek Harness and Hermes Agent explain what setup changes and how workspace policies apply to each agent.