Skip to content

Commit 4df64a3

Browse files
committed
docs: document npm install and release flow
1 parent c90040f commit 4df64a3

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

‎CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ Call chain inside `src/`: `delegate.ts` → `models.resolveModelOrThrow` (`listM
4747
## Keeping docs and manifests in sync
4848

4949
- Defaults and env vars are defined in `src/config.ts` and documented in the README env table and the skill — update all three together.
50-
- Version `0.1.0` appears in `package.json`, `plugin.json` and `marketplace.json` — bump all three.
50+
- release-please bumps the version in `package.json`, `plugin.json` and `marketplace.json`; never edit versions by hand.

‎README.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ Because the hook is shipped in `plugin-hooks/`, not `hooks/` (which holds this r
7070
7171
To use a local clone, add it as a directory marketplace: `/plugin marketplace add /path/to/clone`. After pulling changes, refresh the plugin (`/plugin` → update, or reinstall).
7272
73+
### As a standalone MCP server (npm)
74+
75+
The MCP server is also published to npm as `@lehcode/claude-opencode-delegate` (needs [Bun](https://bun.sh)). Register it in any MCP client with command `bunx` and args `["@lehcode/claude-opencode-delegate"]`; see `examples/claude_desktop_config.json`.
76+
7377
## Usage
7478
7579
Three entry points, all ending in the same `opencode-worker`:
@@ -151,6 +155,13 @@ git config core.hooksPath hooks/ # pre-commit (staged lint/format), pre-push (
151155
| `OPENCODE_DELEGATE_CWD` | process cwd | Base working directory |
152156
| `OPENCODE_DELEGATE_PREFERRED_PROVIDERS` | none | Comma-separated provider order when a model has several providers |
153157
158+
## Releasing
159+
160+
Releases are automated by [release-please](https://github.com/googleapis/release-please) (`.github/workflows/release.yml`). Conventional commits merged to `main` open or update a release PR that bumps `package.json`, `.claude-plugin/plugin.json` and `.claude-plugin/marketplace.json` and writes `CHANGELOG.md`; merging it creates the `vX.Y.Z` tag and GitHub release and publishes to npm via trusted publishing (OIDC, no token, provenance automatic). Never edit versions by hand.
161+
162+
- The first publish must be manual (`npm publish --access public`); then add a trusted publisher in the package settings on npmjs.com (repository `lehcode/claude-opencode-delegate`, workflow `release.yml`).
163+
- Release PRs created with the default `GITHUB_TOKEN` do not trigger CI; to run CI on them, add a `RELEASE_PLEASE_TOKEN` secret (PAT or app token with `contents` and `pull-requests` write). Optional.
164+
154165
## License
155166
156167
MIT. Originally created by [aashahin](https://github.com/aashahin).

‎examples/claude_desktop_config.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"mcpServers": {
33
"opencode": {
4-
"command": "/home/YOU/.bun/bin/bun",
5-
"args": ["/home/YOU/path/to/claude-opencode-delegate/dist/index.js"],
4+
"command": "bunx",
5+
"args": ["@lehcode/claude-opencode-delegate"],
66
"env": {
77
"OPENCODE_DELEGATE_CWD": "/home/YOU/projects/my-app",
88
"OPENCODE_DELEGATE_DEFAULT_MODEL": "opencode-go/muse-spark-1.3-contributor",

0 commit comments

Comments
 (0)