feat(cli): accept https://claudemesh.com/join/<token> invite URL format
Some checks failed
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled

Pairs with claudemesh-2's new /join/[token] landing page. Users can
now paste a clickable HTTPS URL instead of the dev-only ic:// scheme.

apps/cli/src/invite/parse.ts — new extractInviteToken() handles
four input formats before handing the raw base64url token to the
existing parseInviteLink pipeline:
  - https://claudemesh.com/join/<token>   (primary, clickable)
  - https://claudemesh.com/<locale>/join/<token>   (i18n prefix)
  - ic://join/<token>                     (still supported, dev)
  - <raw-token>                           (last resort: bare base64url)

User-facing strings updated to the HTTPS form:
- cli help: "join <url>"
- install success message
- list (no-meshes) hint
- MCP server "no meshes" error
- README.md primary example
- docs/QUICKSTART.md Path A + Path B

Verified extractInviteToken() on all 4 formats — each returns the
same base64url token → same broker /join lookup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-04-05 16:32:50 +01:00
parent 7be8622e6f
commit 59e999535d
8 changed files with 55 additions and 19 deletions

View File

@@ -185,7 +185,9 @@ export function runInstall(): void {
console.log("");
console.log(yellow(bold("⚠ RESTART CLAUDE CODE")) + yellow(" for MCP tools to appear."));
console.log("");
console.log(`Next: ${bold("claudemesh join ic://join/<your-invite-link>")}`);
console.log(
`Next: ${bold("claudemesh join https://claudemesh.com/join/<token>")}`,
);
}
export function runUninstall(): void {

View File

@@ -19,9 +19,11 @@ import { hostname } from "node:os";
export async function runJoin(args: string[]): Promise<void> {
const link = args[0];
if (!link) {
console.error("Usage: claudemesh join <invite-link>");
console.error("Usage: claudemesh join <invite-url-or-token>");
console.error("");
console.error("Example: claudemesh join ic://join/eyJ2IjoxLC4uLn0");
console.error(
"Example: claudemesh join https://claudemesh.com/join/eyJ2IjoxLC4uLn0",
);
process.exit(1);
}

View File

@@ -9,7 +9,9 @@ export function runList(): void {
if (config.meshes.length === 0) {
console.log("No meshes joined yet.");
console.log("");
console.log("Join one with: claudemesh join <invite-link>");
console.log(
"Join one with: claudemesh join https://claudemesh.com/join/<token>",
);
console.log(`Config file: ${getConfigPath()}`);
return;
}