🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@honcho-ai/opencode-honcho

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@honcho-ai/opencode-honcho

Honcho memory integration for OpenCode

latest
npmnpm
Version
0.1.3
Version published
Maintainers
2
Created
Source

Honcho Plugin for Opencode

Add AI-native memory to OpenCode

Give OpenCode long-term memory that survives context wipes, session restarts, and fresh chats. Honcho remembers what you're working on, durable preferences, and prior context across your projects.

Quick Start

Step 1: Get Your Honcho API Key

  • Go to app.honcho.dev
  • Sign up or log in
  • Copy your API key

Step 2: Install the Plugin

OpenCode installs the Honcho plugin and adds it to your global OpenCode config.

opencode plugin "@honcho-ai/opencode-honcho" --global

To update an existing plugin install:

opencode plugin "@honcho-ai/opencode-honcho" --force

This command expects the opencode CLI to already be installed and available on your PATH. If your shell cannot find opencode, restart your shell or source your shell config and run the command again.

Step 3: Run Setup in OpenCode

  • Start OpenCode
  • Run /honcho:setup
  • Keep the default Honcho Cloud option unless you explicitly want a self-hosted or local endpoint
  • Enter your Honcho API key
  • Enter your peerName
  • Run /honcho:status to verify the runtime

What You Get

  • Persistent Memory - OpenCode can retain durable context across sessions
  • Cloud or Local Deployments - Use Honcho Cloud or point at a self-hosted or local Honcho instance
  • Workspace Mapping - OpenCode projects map to Honcho workspaces
  • Session Mapping - Sessions can be scoped per directory, repo, branch, chat instance, or globally
  • Durable Writes - Honcho can retain stable conclusions and session context
  • Memory Retrieval - Search memory, query Honcho knowledge, and inject relevant context into prompts
  • Peer Modeling - User and root-agent peers follow a fixed observation model tuned for OpenCode

Installation Output

OpenCode:

  • registers @honcho-ai/opencode-honcho with OpenCode
  • resolves the package's native server and TUI plugin targets
  • updates plugin entries in your global OpenCode config
  • activates the plugin globally for all OpenCode projects

Configuration

OpenCode Honcho configuration lives in:

  • ~/.honcho/config.json

OpenCode reads and writes this shared config file directly. OpenCode-specific defaults live under hosts.opencode in that file.

{
  "apiKey": "hch-...",
  "peerName": "user",
  "baseUrl": "https://api.honcho.dev",
  "hosts": {
    "opencode": {
      "workspace": "opencode",
      "aiPeer": "opencode",
      "recallMode": "hybrid",
      "sessionStrategy": "per-directory",
      "removeUserPrefix": true // true uses the bare peerName; false (default on upgrade) keeps the legacy user-<peerName> peer
    }
  }
}

Cloud vs Local

For Honcho Cloud:

  • apiKey is required
  • baseUrl should remain https://api.honcho.dev

For self-hosted or local Honcho:

  • baseUrl should point to your deployment, for example http://127.0.0.1:8000
  • apiKey is required only if that deployment requires authentication

If OpenCode is running in Docker or another remote environment, localhost may not refer to your machine. The configured baseUrl must be reachable from the OpenCode host runtime.

Session Strategies

StrategyBehaviorBest for
per-directoryOne session per working directoryDefault project memory
per-repoOne session per repositoryRepos with multiple entry directories
git-branchSession changes with the current branchBranch-specific workflows
per-sessionNew session for each OpenCode session idShort-lived isolated work
chat-instanceSession follows the current chat instanceHighly ephemeral usage
globalOne session for everythingShared memory across all work

Operator Commands

CommandDescription
/honcho:setupFirst-time setup for cloud or local Honcho
/honcho:statusShow effective Honcho status for the current OpenCode project, including live workspace and session names when available
/honcho:settingsShow effective config values and config paths
/honcho:configEdit shared Honcho fields in ~/.honcho/config.json

Agent Tools

The plugin exposes these tools inside OpenCode:

ToolDescription
honcho_setupValidate setup and persist shared credentials or endpoint settings
honcho_statusShow effective runtime status
honcho_get_configRead effective and persisted settings
honcho_set_configUpdate a persisted shared setting
honcho_searchSearch Honcho session messages in the current session
honcho_chatQuery Honcho for reasoning-backed context
honcho_create_conclusionSave a durable memory conclusion

Plugin Surfaces

The plugin uses these OpenCode plugin capabilities:

  • event
  • chat.message
  • tool.execute.after
  • command.execute.before
  • experimental.chat.system.transform
  • experimental.session.compacting
  • shell.env
  • tool

Development

For macOS/Linux local branch testing:

bun install
bun run build
opencode plugin "$PWD" --global --force

That command wires the current checkout into OpenCode with --force, which is the intended local branch-testing flow.

FAQs

Package last updated on 20 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts