Node.js 22.18 or later (CI uses Node.js 24). The TypeScript sources run directly through Node's type stripping, so imports name their .ts extension.
npm ci
npm run lint # Biome
npm run typecheck # tsc
npm test # node --test
npm run build
npm run check:markers
npm run scan-
Create
integrations/<app>/plugin(the npm package),integrations/<app>/hostfor anativeapplication part, andintegrations/<app>/test. -
Follow the naming rules:
Element Rule Example npm package @neuralnomads/opencode-<app>@neuralnomads/opencode-blenderPlugin ID and RPC ID neuralnomads.<app>neuralnomads.blenderTools <app>_context,<app>_apply,<app>_<verb>blender_hostsSkills <app>-<topic>blender-geometry-nodesDisplay name "OpenCode for " "OpenCode for Blender" State directory neuralnomads/opencode-<app>Fallback environment variables NEURALNOMADS_<APP>_*Release tag <app>-v<semver>blender-v0.2.0 -
Declare the marker under
opencodeIntegrationinpackage.json(spec/README.md, section 1). -
Declare the SDK as an optional peer and pin it for development:
"peerDependencies": { "@opencode/plugin": "^2.2.0 || ^0.0.0-dev" }, "peerDependenciesMeta": { "@opencode/plugin": { "optional": true } }, "devDependencies": { "@opencode/plugin": "2.2.5" }
OpenCode provides the SDK itself; a required peer would make npm install it (about 130 MB). Never bundle
effector the SDK, and never use@opencode-ai/plugin. -
Bundle
packages/integration-kitinto the plugin build; it replaces any copied runtime. -
Publish compiled ESM JavaScript (
dist/), never raw.ts. No npm install scripts. -
Every
skills/<app>-<topic>/SKILL.mdstarts with a front-matter header whosenameequals its directory and which has adescription. -
Add the catalog entry in
catalog.jsonin the same pull request; it must copy the marker.
npm run check:markers checks the marker, the embedded application part and the catalog entry (points 3 and 8), then loads each built plugin and reads its status.
Contributors can install an unreleased build from a Git spec with a subdirectory path, for example github:NeuralNomadsAI/opencode-integrations#<ref>::path:integrations/<app>/plugin. Git specs are for testing only; users install from npm.
scripts/trace-scan.ts blocks traces of the deployment these integrations were extracted from. It scans, case-insensitively, every tracked file, every archive in the tree (opened entry by entry), the npm pack tarball of every workspace package (--packs) and, with --history, every commit of every ref. It looks for the former studio and NAS names, paths on the former studio drive letter, UNC network share paths, Windows user-profile paths and known Entra GUIDs. The forbidden words are assembled at runtime and never appear in the repository.
Entra GUID fingerprints are kept outside the repository, in the Actions secret TRACE_SCAN_FINGERPRINTS: a whitespace- or comma-separated list of SHA-256 hex digests, each computed over a lowercase dashed GUID. A maintainer sets it once:
node -e "console.log(require('node:crypto').createHash('sha256').update(process.argv[1].toLowerCase()).digest('hex'))" <guid>
gh secret set TRACE_SCAN_FINGERPRINTS --repo NeuralNomadsAI/opencode-integrationsNever commit a GUID, a fingerprint list or the secret value.
Pull requests from forks run a partial scan. GitHub does not expose secrets to them, so they check every pattern except the Entra GUIDs. The full scan runs again on every push to main and, with --require-fingerprints, before any npm publication or catalog release, which fail when the secret is missing.
Integration plugins are published with public npm access; the repository root and shared workspaces stay private. Each plugin's repository URL exactly matches the GitHub repository URL for npm trusted publishing.
A maintainer with publish access to the @neuralnomads npm scope and account-level 2FA runs one local batch in an interactive terminal:
npm login
npm run npm:bootstrap -- --dry-run
npm run npm:bootstrapAt the first npm web authentication prompt, tick "skip two-factor authentication for the next 5 minutes". Keep the same terminal open: publish, trust and access calls share that window. Further authentication can be required when it expires. The script spaces registry calls by two seconds, keeps npm output and authentication URLs visible, and uses npx --yes npm@12 when local npm is older than 11.15 (without changing the global installation).
The script runs npm ci, build and check:markers once before querying package and trust state, keeping that preparation outside the five-minute authentication window. It discovers public integrations/*/plugin workspaces and selects unpublished packages. Each new package is published at latest without local provenance, linked to publish.yml in NeuralNomadsAI/opencode-integrations with the npm-publish environment, and set to mfa=publish. Existing packages are skipped. To finish setup for existing packages (including a partially completed batch), run:
npm run npm:bootstrap -- --trust-onlyThis mode creates a publisher only when the trust list is empty. It preserves a single existing GitHub publisher only when its repository is exactly NeuralNomadsAI/opencode-integrations, workflow is publish.yml, environment is npm-publish, and permissions include createPackage (direct npm publish). Extra permissions are preserved. It then enforces MFA, allowing a failed final access call to be retried. Multiple, mismatched, incomplete or malformed configurations stop all changes for that package, including MFA; independent packages can continue. Trusted counts successful creations only.
Combine either mode with --dry-run to query and print its command plan without building, publishing or changing registry settings. Trust queries still need interactive authentication. Query failures are reported rather than treated as unpublished packages.
The npm CLI 12.2.2 trust commands expose identity and permissions, while expiry and validation remain unknown to the script. A matching publisher means its settings match; inspect npmjs.com → Packages → YOUR_PACKAGE → Settings → Trusted publishing for its lifecycle state. The script leaves every existing connection intact.
If the site shows an expired connection, remove only that affected connection, preserving other publishers. When the resulting list is empty, rerun npm run npm:bootstrap -- --trust-only to create its replacement. If other publishers remain, use the site's Add trusted publisher action to add the replacement with the exact settings above and direct-publish permission; the script blocks ambiguous lists. Confirm any mismatched or incomplete connection on the site before removing or recreating it.
New versions go through the publish.yml workflow below, using OIDC without maintainer npm 2FA. Complete the replacement's first successful OIDC publish within 48 hours: npm expires an unvalidated configuration after two days. The first successful publish validates the configuration and binds the repository identity. The npm trust bulk usage guide documents the five-minute skip window and rate-limit spacing.
Nothing is published without the maintainer's explicit approval at the time of publication:
- npm (
.github/workflows/publish.yml): started by hand, its job waits for the protectednpm-publishenvironment, which requires a maintainer's approval; it publishes through trusted publishing (OIDC) with provenance. - Catalog (
.github/workflows/catalog-release.yml): started by hand, waits for the protectedcatalog-releaseenvironment, then creates an immutablecatalog-v<n>release withcatalog.jsonas its asset. Catalog releases are never marked latest and use a tag prefix distinct from integration releases (<app>-v<semver>); CodeNomad reads the newestcatalog-*release.
To check that publication needs approval without publishing anything: start the publish workflow, see its job wait on npm-publish ("Waiting for review"), cancel the run, then confirm with npm view @neuralnomads/opencode-<app> versions that no version appeared.