From b65bf6dda548e55fc4b08b2d57d8056e459de254 Mon Sep 17 00:00:00 2001 From: Mikkel Georgsen Date: Mon, 30 Mar 2026 23:50:37 +0200 Subject: [PATCH] feat(03-04): replace Paperclip display strings in CLI entry point and HTTP client - Add VOCAB import to cli/src/index.ts and cli/src/client/http.ts - Replace all 'Paperclip' description/help strings with VOCAB.appName - Update backup filename prefix default from 'paperclip' to 'nexus' - Update data dir help text to reference ~/.nexus - Keep .name('paperclipai') binary name unchanged (CODE-zone) --- cli/src/client/http.ts | 9 +++++---- cli/src/index.ts | 15 ++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/cli/src/client/http.ts b/cli/src/client/http.ts index 27de5eb1..20871485 100644 --- a/cli/src/client/http.ts +++ b/cli/src/client/http.ts @@ -1,4 +1,5 @@ import { URL } from "node:url"; +import { VOCAB } from "@paperclipai/branding"; // [nexus] export class ApiRequestError extends Error { status: number; @@ -205,7 +206,7 @@ function buildConnectionErrorMessage(input: { }): string { const healthUrl = buildHealthCheckUrl(input.url); const lines = [ - "Could not reach the Paperclip API.", + `Could not reach the ${VOCAB.appName} API.`, // [nexus] "", `Request: ${input.method} ${input.url}`, ]; @@ -214,12 +215,12 @@ function buildConnectionErrorMessage(input: { } lines.push( "", - "This usually means the Paperclip server is not running, the configured URL is wrong, or the request is being blocked before it reaches Paperclip.", + `This usually means the ${VOCAB.appName} server is not running, the configured URL is wrong, or the request is being blocked before it reaches ${VOCAB.appName}.`, // [nexus] "", "Try:", - "- Start Paperclip with `pnpm dev` or `pnpm paperclipai run`.", + `- Start ${VOCAB.appName} with \`pnpm dev\` or \`pnpm paperclipai run\`.`, // [nexus] `- Verify the server is reachable with \`curl ${healthUrl}\`.`, - `- If Paperclip is running elsewhere, pass \`--api-base ${input.apiBase.replace(/\/+$/, "")}\` or set \`PAPERCLIP_API_URL\`.`, + `- If ${VOCAB.appName} is running elsewhere, pass \`--api-base ${input.apiBase.replace(/\/+$/, "")}\` or set \`PAPERCLIP_API_URL\`.`, // [nexus] ); return lines.join("\n"); } diff --git a/cli/src/index.ts b/cli/src/index.ts index 828404e8..fb78b10d 100644 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -20,14 +20,15 @@ import { loadPaperclipEnvFile } from "./config/env.js"; import { registerWorktreeCommands } from "./commands/worktree.js"; import { registerPluginCommands } from "./commands/client/plugin.js"; import { registerClientAuthCommands } from "./commands/client/auth.js"; +import { VOCAB } from "@paperclipai/branding"; // [nexus] const program = new Command(); const DATA_DIR_OPTION_HELP = - "Paperclip data directory root (isolates state from ~/.paperclip)"; + `${VOCAB.appName} data directory root (isolates state from ~/.nexus)`; // [nexus] program .name("paperclipai") - .description("Paperclip CLI — setup, diagnose, and configure your instance") + .description(`${VOCAB.appName} CLI — setup, diagnose, and configure your instance`) // [nexus] .version("0.2.7"); program.hook("preAction", (_thisCommand, actionCommand) => { @@ -46,12 +47,12 @@ program .option("-c, --config ", "Path to config file") .option("-d, --data-dir ", DATA_DIR_OPTION_HELP) .option("-y, --yes", "Accept defaults (quickstart + start immediately)", false) - .option("--run", "Start Paperclip immediately after saving config", false) + .option("--run", `Start ${VOCAB.appName} immediately after saving config`, false) // [nexus] .action(onboard); program .command("doctor") - .description("Run diagnostic checks on your Paperclip setup") + .description(`Run diagnostic checks on your ${VOCAB.appName} setup`) // [nexus] .option("-c, --config ", "Path to config file") .option("-d, --data-dir ", DATA_DIR_OPTION_HELP) .option("--repair", "Attempt to repair issues automatically") @@ -83,7 +84,7 @@ program .option("-d, --data-dir ", DATA_DIR_OPTION_HELP) .option("--dir ", "Backup output directory (overrides config)") .option("--retention-days ", "Retention window used for pruning", (value) => Number(value)) - .option("--filename-prefix ", "Backup filename prefix", "paperclip") + .option("--filename-prefix ", "Backup filename prefix", "nexus") // [nexus] .option("--json", "Print backup metadata as JSON") .action(async (opts) => { await dbBackupCommand(opts); @@ -99,7 +100,7 @@ program program .command("run") - .description("Bootstrap local setup (onboard + doctor) and run Paperclip") + .description(`Bootstrap local setup (onboard + doctor) and run ${VOCAB.appName}`) // [nexus] .option("-c, --config ", "Path to config file") .option("-d, --data-dir ", DATA_DIR_OPTION_HELP) .option("-i, --instance ", "Local instance id (default: default)") @@ -117,7 +118,7 @@ heartbeat .option("-d, --data-dir ", DATA_DIR_OPTION_HELP) .option("--context ", "Path to CLI context file") .option("--profile ", "CLI context profile name") - .option("--api-base ", "Base URL for the Paperclip server API") + .option("--api-base ", `Base URL for the ${VOCAB.appName} server API`) // [nexus] .option("--api-key ", "Bearer token for agent-authenticated calls") .option( "--source ",