@codewright/install
v0.1.4
Published
One-command installer for Codewright: detects your agent harness (Claude Code, Codex CLI, OpenCode) and registers the MCP server + skill. Run with `npx @codewright/install`.
Downloads
29
Readme
@codewright/install
One-command installer for Codewright: detects your agent harness and configures it, no manual JSON editing or per-harness commands required.
Two install paths are available:
npx @codewright/install(tier 1, this package) — works with Claude Code, Codex CLI, and OpenCode. See Usage below.Claude Code plugin marketplace (tier 2) — for Claude Code only, entirely within Claude Code, no terminal needed:
/plugin marketplace add highnet/codewright /plugin install codewright@codewrightThis installs the same MCP server registration and skill as tier 1, packaged as
plugins/codewright/and listed in.claude-plugin/marketplace.jsonat the repo root. Both tiers are generated from the same building blocks (src/skill-content.ts,src/mcp-server.ts) viasrc/plugin-manifest.ts/src/generate-plugin-cli.ts— see Regenerating the plugin below.
Usage
npx @codewright/installThis:
- Detects which supported harness(es) are present — Claude Code
(
claudeon PATH), Codex CLI (codexon PATH), and OpenCode (opencodeon PATH or an existingopencode.json). - Registers the
codewrightMCP server the harness-appropriate way:- Claude Code / Codex CLI: runs
claude mcp add codewright -- npx -y @codewright/mcp/codex mcp add codewright -- npx -y @codewright/mcp(both idempotent — re-running is safe). - OpenCode: merges an
mcp.codewrightblock intoopencode.jsonin the target directory (creating the file if it doesn't exist), preserving any existing content.
- Claude Code / Codex CLI: runs
- Drops the standalone skill at
.claude/skills/codewright-recipes/SKILL.mdin the target directory — adapted frompackages/agent-skill/SKILL.mdto call thecodewrightMCP tools (or the public API directly viacurl) instead ofpnpm --filter @codewright/agent-skill ..., which only works inside this monorepo.
Options
npx @codewright/install [--dir <path>] [--harness claude-code|codex-cli|opencode]... [--skip-skill]--dir <path>— target project directory (default: current directory). Used for the OpenCode config file and the skill file.--harness <id>— restrict to specific harness(es) instead of installing for everything auto-detected present. Repeatable.--skip-skill— register the MCP server(s) only, don't write the skill file.
Regenerating the plugin
plugins/codewright/ (the tier-2 plugin's .claude-plugin/plugin.json,
.mcp.json, and skills/codewright-recipes/SKILL.md) is generated, not
hand-maintained. After changing src/skill-content.ts or src/mcp-server.ts,
regenerate and commit the result:
pnpm --filter @codewright/install generate:plugintest/plugin-manifest.test.ts fails CI if the checked-in plugin files stop
matching the generator's output, so this can't silently drift.
What it does not do
- It never publishes or modifies anything outside the target directory and
your harness's own MCP registry (e.g.
~/.claude.jsonfor Claude Code, managed by theclaudeCLI itself). - It doesn't touch
~/.codex/config.tomldirectly — that'scodex mcp add's job, not this installer's. - Tier 3 (skills.sh submission) from https://github.com/highnet/codewright/issues/261 is tracked as separate, human-gated follow-up work — out of coding-agent scope.
Publishing
This package is not published to npm as part of introducing it — publishing
under the @codewright npm scope is a separate, human-gated step performed
outside the agent workflow (see packages/mcp-server/README.md and
packages/cli/README.md for the same note on their packages).
