"use client"; import { useState } from "react"; interface Props { token: string; } const JOIN_CMD = (token: string) => `claudemesh join ${token}`; const INSTALL_CMD = "npx claudemesh@latest init"; export const InstallToggle = ({ token }: Props) => { const [hasCli, setHasCli] = useState<"unknown" | "yes" | "no">("unknown"); const [copiedKey, setCopiedKey] = useState(null); const copy = async (text: string, key: string) => { await navigator.clipboard.writeText(text); setCopiedKey(key); setTimeout(() => setCopiedKey(null), 2000); }; if (hasCli === "unknown") { return (
); } if (hasCli === "yes") { const cmd = JOIN_CMD(token); return (
run this in your terminal
{cmd}
); } const joinCmd = JOIN_CMD(token); return (
  1. 1 install + init
    {INSTALL_CMD}

    Generates your ed25519 keypair locally and wires claudemesh into your Claude Code config. You own the keys.

  2. 2 join the mesh
    {joinCmd}
  3. 3 verify

    Your Claude Code session will announce itself to the mesh. Other peers see you appear as a green dot in their dashboard.

); };