From 64ca600195e00da3a3d73bd07aa944ab090ea2a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= <35082514+alezmad@users.noreply.github.com> Date: Sun, 5 Apr 2026 14:41:59 +0100 Subject: [PATCH] chore(cli): rename package to claudemesh-cli (unscoped) for npm publish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @claudemesh/cli was already taken on npm by an unrelated project (claudemesh "domain packages", v1.0.7). PM picked option A: publish unscoped as claudemesh-cli. Binary name stays "claudemesh" — users type the natural thing on install: npm install -g claudemesh-cli claudemesh install claudemesh join ic://join/... renamed references everywhere: - apps/cli/package.json: name - apps/cli/README.md: title + install command - apps/cli/src/{index.ts, mcp/server.ts, commands/install.ts} headers - docs/QUICKSTART.md: install command, version banner, npx hint - docs/roadmap.md: package name also (PM journey-friction #5): surface the "restart Claude Code" step LOUDLY in install output. Added a yellow-bold warning line after the ✓ success lines so new users don't miss the restart step (MCP tools only load on Claude Code restart). ⚠ RESTART CLAUDE CODE for MCP tools to appear. ANSI colors gated on isTTY + NO_COLOR/TERM=dumb guards. bundle rebuilt. ready for npm publish pending user's `npm adduser`. Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/cli/README.md | 4 ++-- apps/cli/package.json | 2 +- apps/cli/src/commands/install.ts | 21 +++++++++++++++------ apps/cli/src/index.ts | 2 +- apps/cli/src/mcp/server.ts | 2 +- docs/QUICKSTART.md | 6 +++--- docs/roadmap.md | 2 +- 7 files changed, 24 insertions(+), 15 deletions(-) diff --git a/apps/cli/README.md b/apps/cli/README.md index 9ce1112..fd14155 100644 --- a/apps/cli/README.md +++ b/apps/cli/README.md @@ -1,4 +1,4 @@ -# @claudemesh/cli +# claudemesh-cli Client tool for claudemesh — install once per machine, join one or more meshes, and your Claude Code sessions can talk to peers on demand. @@ -7,7 +7,7 @@ meshes, and your Claude Code sessions can talk to peers on demand. ```sh # From npm (once published) -npm install -g @claudemesh/cli +npm install -g claudemesh-cli # Or from the monorepo during dev cd apps/cli && bun link diff --git a/apps/cli/package.json b/apps/cli/package.json index 04087a8..cb9ceaf 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -1,5 +1,5 @@ { - "name": "@claudemesh/cli", + "name": "claudemesh-cli", "version": "0.1.0", "description": "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.", "keywords": [ diff --git a/apps/cli/src/commands/install.ts b/apps/cli/src/commands/install.ts index c2740bc..684a7dd 100644 --- a/apps/cli/src/commands/install.ts +++ b/apps/cli/src/commands/install.ts @@ -90,7 +90,7 @@ function resolveEntry(): string { * Build the MCP server entry for Claude Code's config. * * Two modes: - * - Installed globally (npm i -g @claudemesh/cli): use `claudemesh` + * - Installed globally (npm i -g claudemesh-cli): use `claudemesh` * as the command, relies on it being on PATH. * - Local dev (bun apps/cli/src/index.ts): use `bun `. */ @@ -167,16 +167,25 @@ export function runInstall(): void { process.exit(1); } + // ANSI color helpers — stick to 8-color set so terminals without + // truecolor still render. Fall back to plain if NO_COLOR or dumb TERM. + const useColor = + !process.env.NO_COLOR && process.env.TERM !== "dumb" && process.stdout.isTTY; + const bold = (s: string) => (useColor ? `\x1b[1m${s}\x1b[22m` : s); + const yellow = (s: string) => (useColor ? `\x1b[33m${s}\x1b[39m` : s); + const dim = (s: string) => (useColor ? `\x1b[2m${s}\x1b[22m` : s); + console.log(`✓ MCP server "${MCP_NAME}" ${action}`); - console.log(` config: ${CLAUDE_CONFIG}`); + console.log(dim(` config: ${CLAUDE_CONFIG}`)); console.log( - ` command: ${desired.command}${desired.args?.length ? " " + desired.args.join(" ") : ""}`, + dim( + ` command: ${desired.command}${desired.args?.length ? " " + desired.args.join(" ") : ""}`, + ), ); console.log(""); - console.log("Restart Claude Code to load the MCP server."); - console.log("Then join a mesh:"); + console.log(yellow(bold("⚠ RESTART CLAUDE CODE")) + yellow(" for MCP tools to appear.")); console.log(""); - console.log(" claudemesh join "); + console.log(`Next: ${bold("claudemesh join ic://join/")}`); } export function runUninstall(): void { diff --git a/apps/cli/src/index.ts b/apps/cli/src/index.ts index e6255b7..16679b9 100644 --- a/apps/cli/src/index.ts +++ b/apps/cli/src/index.ts @@ -1,5 +1,5 @@ /** - * @claudemesh/cli entry point. + * claudemesh-cli entry point. * * Dispatches between two modes: * - `claudemesh mcp` → MCP server (stdio transport) diff --git a/apps/cli/src/mcp/server.ts b/apps/cli/src/mcp/server.ts index 298da5d..b92e989 100644 --- a/apps/cli/src/mcp/server.ts +++ b/apps/cli/src/mcp/server.ts @@ -1,5 +1,5 @@ /** - * MCP server (stdio transport) for @claudemesh/cli. + * MCP server (stdio transport) for claudemesh-cli. * * Starts BrokerClient connections for every mesh in config on boot, * then routes the 5 MCP tools through them. diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index 8ae12e2..fb876ae 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -21,14 +21,14 @@ That's it. ## Step 1 — Install the CLI *(~30s)* ```sh -npm install -g @claudemesh/cli +npm install -g claudemesh-cli claudemesh --version ``` You should see: ``` -@claudemesh/cli v0.1.x +claudemesh-cli v0.1.x ``` > **From source** (if npm install fails): clone the repo, then @@ -179,7 +179,7 @@ to memorize them. Just describe what you want in plain English. **`claudemesh: command not found`** → `npm install -g` may have installed to a path not on your `$PATH`. Try `npm bin -g` to see the install location, and add it to your shell -rc. Or use `npx @claudemesh/cli` until you fix the path. +rc. Or use `npx claudemesh-cli` until you fix the path. **`invalid invite: signature verification failed`** → The invite was tampered with or expired. Ask the mesh owner to diff --git a/docs/roadmap.md b/docs/roadmap.md index a740694..e2340bc 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -10,7 +10,7 @@ broker, ready for real teams. - Signed ed25519 identities + signed invite links (`ic://join/...`) - Hello-sig handshake auth against the broker - Hosted broker at `wss://ic.claudemesh.com/ws` -- `@claudemesh/cli` — join, list, leave, MCP server +- `claudemesh-cli` — join, list, leave, MCP server - Claude Code MCP tools: `list_peers`, `send_message`, `check_messages`, `set_summary`, `set_status` - Dashboard (beta): presence, live traffic, peer summaries