This document explains how to install opencode-cc-camouflage and its
prerequisites.
You need three components installed in order:
not-claude-code-emulator- Message runtimeopencode-anthropic-auth- Peer auth pluginopencode-cc-camouflage- This maintenance plugin
You have two options for installing the emulator:
The easiest way to install the emulator:
npm install -g not-claude-code-emulatorClone the message runtime that provides Anthropic-compatible interfaces:
cd ~/github
git clone https://github.com/code-yeongyu/not-claude-code-emulator.git
cd not-claude-code-emulator
git checkout 5541e5c1cb0895cfd4390391dc642c74fc5d0a1aThis specific commit is the pinned v1 target. Do not use a different version unless you understand the compatibility implications.
Both methods are supported. npm global install is recommended for simplicity.
If you installed via npm global, set the environment variable to tell the plugin where to find the emulator:
export CC_CAMOUFLAGE_EMULATOR_ROOT=$(npm root -g)/not-claude-code-emulatorAdd this to your shell profile (.bashrc, .zshrc, etc.) for persistence.
Clone the auth plugin that handles Anthropic OAuth:
cd ~/github
git clone https://github.com/ex-machina-co/opencode-anthropic-auth.git
cd opencode-anthropic-auth
git checkout 6594dd1f1ff8b63342f83173d4477f8b549b4867Install it as an OpenCode plugin. The exact method depends on your OpenCode setup:
# If using local-folder plugin discovery
# Add to your opencode.json or opencode.jsonc:
# {
# "plugins": [
# {
# "name": "opencode-anthropic-auth",
# "path": "~/github/opencode-anthropic-auth"
# }
# ]
# }Clone this repository:
cd ~/github
git clone https://github.com/codeg-dev/opencode-cc-camouflage.git
cd opencode-cc-camouflageInstall dependencies:
bun installInstall it as an OpenCode plugin alongside the peer:
# Add to your opencode.json or opencode.jsonc:
# {
# "plugins": [
# {
# "name": "opencode-anthropic-auth",
# "path": "~/github/opencode-anthropic-auth"
# },
# {
# "name": "opencode-cc-camouflage",
# "path": "~/github/opencode-cc-camouflage"
# }
# ]
# }Run the status tool to check if everything is detected:
bun run statusExpected output for a healthy installation:
peer=present
emulator=present
patch=clean
install_mode=local-folder
support=supported
Run the doctor tool for diagnostic guidance:
bun run doctorIf you see missing-peer, the peer plugin is not discoverable. Check your
OpenCode config and ensure the path is correct.
If you see unsupported, you are on a platform not covered by v1.
The OAuth precedence is fixed for companion-plugin troubleshooting:
- Claude desktop cache
- System keychain
- OpenCode auth store fallback
On headless machines, or whenever Claude Safe Storage is unavailable, the desktop cache and keychain are not treated as canonical. In that exception path, the OpenCode auth store becomes the canonical fallback.
This plugin supports both installation modes:
| Mode | Discovery | Notes |
|---|---|---|
| local-folder | Config-declared path in opencode.json(c) | Preferred; exact path control |
| cache | OpenCode plugin cache heuristics | Fallback; may vary by setup |
Local-folder installs are prioritized. If you have both, the config-declared path takes precedence.
Primary supported environment. All features work as documented.
Supported with the same pinned upstream fixtures. The plugin uses standard
POSIX utilities (patch, git apply) that should be available on most
distributions.
Supported in v1 for the same pinned fixtures. Config-declared paths and
node_modules-style discovery accept Windows drive letters and backslashes.
- Check that
~/github/opencode-anthropic-authexists - Verify your OpenCode config includes the plugin path
- Restart OpenCode to pick up config changes
- Run
bun run doctorfor detailed diagnostics
If you updated the peer plugin to a newer version, the pinned preflight checks may no longer match. This is expected. Options:
- Revert the peer to the pinned commit
- Wait for this plugin to release updated patch metadata
- Manually verify patch safety before applying
You are on an unsupported platform. For v1, macOS, Linux, and Windows are supported. Do not proceed with patch workflows on unsupported platforms.
Once installed and healthy, you can:
- Run
bun run statusto check state - Run
bun run doctorfor diagnostics - Run OpenCode tool
patch_applyto apply patches (when explicitly needed) - Run OpenCode tool
patch_revertto roll back
See rollback.md for detailed rollback procedures.