From 0408f60bd7c752d94d87a21b44e9a9da2fb9a8dc Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Fri, 23 Jan 2026 13:51:33 +0000 Subject: [PATCH 01/13] feat: add swarm mode patch for native multi-agent features Upgrade to Claude Code 2.1.17 and add support for native multi-agent features introduced in 2.1.16 by patching the statsig gate function. Features enabled by swarm mode patch: - TeammateTool for team coordination - Delegate mode for Task tool - Swarm spawning via ExitPlanMode (launchSwarm + teammateCount) - Teammate mailbox/messaging - Task ownership and claiming Implementation: - Add swarm-mode-patch.ts with gate detection and patching logic - Add SwarmModeStep for variant creation (enabled by default) - Add SwarmModeUpdateStep to re-apply patch on updates - Add NATIVE_MULTIAGENT_SUPPORTED constant (replaces legacy team mode) - Record swarmModeEnabled in variant.json metadata The patch changes the gate function from: function i8(){if(Yz(process.env.CLAUDE_CODE_AGENT_SWARMS))return!1;return xK("tengu_brass_pebble",!1)} To: function i8(){return!0} This bypasses the statsig feature flag check and enables all native multi-agent features regardless of account tier. Co-Authored-By: Claude Opus 4.5 --- docs/research/native-multiagent-gates.md | 167 ++++++++++++++++++ src/core/constants.ts | 12 +- src/core/index.ts | 10 +- src/core/types.ts | 4 + src/core/variant-builder/VariantBuilder.ts | 5 +- src/core/variant-builder/VariantUpdater.ts | 4 +- .../variant-builder/steps/FinalizeStep.ts | 8 +- .../variant-builder/steps/SwarmModeStep.ts | 84 +++++++++ src/core/variant-builder/steps/index.ts | 1 + src/core/variant-builder/swarm-mode-patch.ts | 127 +++++++++++++ src/core/variant-builder/types.ts | 2 + .../update-steps/SwarmModeUpdateStep.ts | 92 ++++++++++ .../variant-builder/update-steps/index.ts | 1 + test/unit/swarm-mode-patch.test.ts | 107 +++++++++++ 14 files changed, 617 insertions(+), 7 deletions(-) create mode 100644 docs/research/native-multiagent-gates.md create mode 100644 src/core/variant-builder/steps/SwarmModeStep.ts create mode 100644 src/core/variant-builder/swarm-mode-patch.ts create mode 100644 src/core/variant-builder/update-steps/SwarmModeUpdateStep.ts create mode 100644 test/unit/swarm-mode-patch.test.ts diff --git a/docs/research/native-multiagent-gates.md b/docs/research/native-multiagent-gates.md new file mode 100644 index 0000000..d7c4794 --- /dev/null +++ b/docs/research/native-multiagent-gates.md @@ -0,0 +1,167 @@ +# Native Multi-Agent Feature Gates in Claude Code 2.1.16+ + +Research conducted: 2026-01-23 +Claude Code version analyzed: 2.1.17 + +## Summary + +Claude Code 2.1.16+ includes native multi-agent features (swarms, teammates, team coordination) that are **built into the CLI**. All features are controlled by a **single gate function** that can be patched to force-enable them. + +## Feature Gate Analysis + +### Primary Gate Function + +In the minified CLI, **all** multi-agent features are gated by a single function: + +```javascript +function i8() { + if (Yz(process.env.CLAUDE_CODE_AGENT_SWARMS)) return !1; + return xK("tengu_brass_pebble", !1); +} +``` + +Where: +- `Yz()` - Evaluates env var as "falsey" (handles string "false", "0", empty, etc.) +- `xK()` - Checks statsig feature flag with a default value + +### Force-Enabling via Patch + +The gate function can be patched to bypass the statsig check entirely: + +```javascript +// Before patch: +function i8(){if(Yz(process.env.CLAUDE_CODE_AGENT_SWARMS))return!1;return xK("tengu_brass_pebble",!1)} + +// After patch: +function i8(){return!0} +``` + +This is the same approach used for legacy team mode patching. + +### Features Controlled by i8() + +| Feature | Code Pattern | Description | +|---------|--------------|-------------| +| **TeammateTool** | `i8()?[tq2()]:[]` | Tool conditionally included in toolset | +| **Delegate mode** | `i8()?["bypassPermissions"]:["bypassPermissions","delegate"]` | Task tool mode option | +| **Swarm spawning** | `i8()` check in ExitPlanMode | launchSwarm + teammateCount params | +| **Teammate mailbox** | `i8()?[yw("teammate_mailbox",...)]` | Inter-agent messaging | +| **Task teammates** | `i8()&&H?.teammates` | Task list teammate display | + +**One patch enables all features.** + +### Environment Variable + +Set `CLAUDE_CODE_AGENT_SWARMS=0` or `CLAUDE_CODE_AGENT_SWARMS=false` to **disable** swarm features (opt-out only, cannot force-enable). + +### Statsig Flag + +The `tengu_brass_pebble` flag is checked server-side. Without patching, enablement depends on: +- Subscription tier (Max, Team, Pro) +- Account age / feature rollout +- Geographic availability + +## Native Multi-Agent Features + +### TeammateTool + +Available operations: +- `spawnTeam` - Create a new team (team = project = task list) +- `approvePlan` - Approve a teammate's plan +- `rejectPlan` - Reject a teammate's plan with feedback +- `requestShutdown` - Request a teammate to gracefully shut down + +### ExitPlanMode Swarm Parameters + +When `i8()` returns true, ExitPlanMode accepts: +- `launchSwarm: boolean` - Enable swarm spawning +- `teammateCount: number` - Number of teammates to spawn (1-5) + +### Backend System + +Two execution backends for spawning teammates: + +1. **In-Process Backend** - Runs teammates in the same process + - Used in non-interactive sessions + - Controlled by `--teammate-mode` flag + +2. **Pane Backend** - Spawns teammates in terminal panes + - **tmux** - Primary, works inside or outside tmux sessions + - **iTerm2** - Native iTerm2 support via `it2` CLI + +### Related Environment Variables + +| Variable | Purpose | +|----------|---------| +| `CLAUDE_CODE_AGENT_SWARMS` | Override swarm feature gate (set to 0/false to disable) | +| `CLAUDE_CODE_TEAM_MODE` | Enable team mode | +| `CLAUDE_CODE_TEAM_NAME` | Set team name (set by wrapper at runtime) | +| `CLAUDE_CODE_AGENT_ID` | Unique agent identifier | +| `CLAUDE_CODE_AGENT_NAME` | Human-readable agent name | +| `CLAUDE_CODE_PLAN_MODE_REQUIRED` | Require plan approval from leader | + +## Implications for cc-mirror + +### What cc-mirror Should Do + +1. **Version bump**: Use Claude Code 2.1.17+ to get native features +2. **No patching needed**: Features are built-in, not patched like legacy team mode +3. **Provider configuration**: Optionally set env vars to configure behavior +4. **Documentation**: Help users understand feature availability + +### What cc-mirror Should NOT Do + +1. **Don't try to enable statsig flags** - Server-side, can't be overridden +2. **Don't patch cli.js** - Features are native, not patched in +3. **Don't assume universal availability** - Features may be tier-gated + +## Version History + +| Version | Features Added | +|---------|----------------| +| 2.1.16 | Initial native multi-agent support | +| 2.1.17 | TeammateTool, swarm spawning refinements | + +## Patch Implementation + +cc-mirror implements swarm mode patching in `src/core/variant-builder/swarm-mode-patch.ts`: + +```typescript +import { setSwarmModeEnabled } from './swarm-mode-patch.js'; + +const result = setSwarmModeEnabled(cliContent, true); +// result.changed: boolean - whether patch was applied +// result.state: 'enabled' | 'disabled' | 'unknown' +// result.content: patched CLI content +``` + +### Verified Against Claude Code 2.1.17 + +``` +Gate found: true +Function name: i8 +Current state: disabled + +Patch applied: true +New state: enabled +Patched function: function i8(){return!0} +``` + +## Verification Commands + +```bash +# Check if swarm gate is present in cli.js (unpatched) +grep -o 'tengu_brass_pebble' ~/.cc-mirror//npm/node_modules/@anthropic-ai/claude-code/cli.js + +# Check for TeammateTool +grep -o 'TeammateTool' ~/.cc-mirror//npm/node_modules/@anthropic-ai/claude-code/cli.js + +# Verify patch was applied (should return empty if patched) +grep 'tengu_brass_pebble' ~/.cc-mirror//npm/node_modules/@anthropic-ai/claude-code/cli.js +``` + +## See Also + +- `src/core/constants.ts` - NATIVE_MULTIAGENT_MIN_VERSION constant +- `src/core/variant-builder/swarm-mode-patch.ts` - Patch implementation +- Legacy team mode documentation (deprecated) diff --git a/src/core/constants.ts b/src/core/constants.ts index d88542c..ef1cf77 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -6,6 +6,14 @@ export const DEFAULT_BIN_DIR = process.platform === 'win32' ? path.join(DEFAULT_ROOT, 'bin') : path.join(os.homedir(), '.local', 'bin'); export const TWEAKCC_VERSION = '3.2.2'; export const DEFAULT_NPM_PACKAGE = '@anthropic-ai/claude-code'; -export const DEFAULT_NPM_VERSION = '2.1.12'; -// Team mode is intentionally disabled in current development builds. +export const DEFAULT_NPM_VERSION = '2.1.17'; + +// Native multi-agent features (swarms, teammates) are available in Claude Code 2.1.16+ +// These are gated by statsig flag 'tengu_brass_pebble' and can be overridden with +// CLAUDE_CODE_AGENT_SWARMS env var. See docs/research/native-multiagent-gates.md +export const NATIVE_MULTIAGENT_MIN_VERSION = '2.1.16'; +export const NATIVE_MULTIAGENT_SUPPORTED = true; + +// Legacy team mode (cli.js patching) is deprecated - native features replace it +// @deprecated Use native multi-agent features instead export const TEAM_MODE_SUPPORTED = false; diff --git a/src/core/index.ts b/src/core/index.ts index e40642c..49fcc6e 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -5,6 +5,7 @@ import { DEFAULT_NPM_PACKAGE, DEFAULT_NPM_VERSION, DEFAULT_ROOT, + NATIVE_MULTIAGENT_SUPPORTED, TEAM_MODE_SUPPORTED, } from './constants.js'; import { ensureDir } from './fs.js'; @@ -22,7 +23,14 @@ import type { VariantEntry, } from './types.js'; -export { DEFAULT_ROOT, DEFAULT_BIN_DIR, DEFAULT_NPM_PACKAGE, DEFAULT_NPM_VERSION, TEAM_MODE_SUPPORTED }; +export { + DEFAULT_ROOT, + DEFAULT_BIN_DIR, + DEFAULT_NPM_PACKAGE, + DEFAULT_NPM_VERSION, + NATIVE_MULTIAGENT_SUPPORTED, + TEAM_MODE_SUPPORTED, +}; export { expandTilde } from './paths.js'; export const createVariant = (params: CreateVariantParams): CreateVariantResult => { diff --git a/src/core/types.ts b/src/core/types.ts index 796edc1..89a75e8 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -23,6 +23,8 @@ export interface VariantMeta { npmVersion?: string; /** Whether team mode is enabled (legacy) */ teamModeEnabled?: boolean; + /** Whether swarm mode is enabled (native multi-agent features) */ + swarmModeEnabled?: boolean; } export interface VariantEntry { @@ -59,6 +61,8 @@ export interface CreateVariantParams { tweakccStdio?: 'pipe' | 'inherit'; /** Enable team mode by patching cli.js (legacy) */ enableTeamMode?: boolean; + /** Disable swarm mode (native multi-agent features are enabled by default) */ + disableSwarmMode?: boolean; /** Callback for progress updates during installation */ onProgress?: ProgressCallback; } diff --git a/src/core/variant-builder/VariantBuilder.ts b/src/core/variant-builder/VariantBuilder.ts index 82e82fc..97028cd 100644 --- a/src/core/variant-builder/VariantBuilder.ts +++ b/src/core/variant-builder/VariantBuilder.ts @@ -12,6 +12,7 @@ import { DEFAULT_NPM_PACKAGE, DEFAULT_NPM_VERSION, DEFAULT_ROOT, + NATIVE_MULTIAGENT_SUPPORTED, TEAM_MODE_SUPPORTED, } from '../constants.js'; import { assertValidVariantName, expandTilde, getWrapperPath } from '../paths.js'; @@ -22,6 +23,7 @@ import type { BuildContext, BuildPaths, BuildPreferences, BuildState, BuildStep, import { PrepareDirectoriesStep } from './steps/PrepareDirectoriesStep.js'; import { InstallNpmStep } from './steps/InstallNpmStep.js'; import { TeamModeStep } from './steps/TeamModeStep.js'; +import { SwarmModeStep } from './steps/SwarmModeStep.js'; import { WriteConfigStep } from './steps/WriteConfigStep.js'; import { BrandThemeStep } from './steps/BrandThemeStep.js'; import { TweakccStep } from './steps/TweakccStep.js'; @@ -59,9 +61,10 @@ export class VariantBuilder { this.steps = [ new PrepareDirectoriesStep(), new InstallNpmStep(), + ...(NATIVE_MULTIAGENT_SUPPORTED ? [new SwarmModeStep()] : []), // Swarm mode (native multi-agent) enabled by default new WriteConfigStep(), new BrandThemeStep(), // Creates tweakcc/config.json - ...(TEAM_MODE_SUPPORTED ? [new TeamModeStep()] : []), // Team mode is gated by TEAM_MODE_SUPPORTED + ...(TEAM_MODE_SUPPORTED ? [new TeamModeStep()] : []), // Legacy team mode (deprecated) new TweakccStep(), new WrapperStep(), new ShellEnvStep(), diff --git a/src/core/variant-builder/VariantUpdater.ts b/src/core/variant-builder/VariantUpdater.ts index e3ade9b..216f269 100644 --- a/src/core/variant-builder/VariantUpdater.ts +++ b/src/core/variant-builder/VariantUpdater.ts @@ -16,6 +16,7 @@ import type { ReportFn, UpdateContext, UpdatePaths, UpdatePreferences, UpdateSta // Import steps import { RebuildUpdateStep } from './update-steps/RebuildUpdateStep.js'; import { InstallNpmUpdateStep } from './update-steps/InstallNpmUpdateStep.js'; +import { SwarmModeUpdateStep } from './update-steps/SwarmModeUpdateStep.js'; import { TeamModeUpdateStep } from './update-steps/TeamModeUpdateStep.js'; import { ModelOverridesStep } from './update-steps/ModelOverridesStep.js'; import { TweakccUpdateStep } from './update-steps/TweakccUpdateStep.js'; @@ -56,7 +57,8 @@ export class VariantUpdater { this.steps = [ new RebuildUpdateStep(), new InstallNpmUpdateStep(), - new TeamModeUpdateStep(), // Patches cli.js for team mode (if enabled) + new SwarmModeUpdateStep(), // Patches cli.js for native multi-agent features (enabled by default) + new TeamModeUpdateStep(), // Legacy team mode (deprecated, if enabled) new ModelOverridesStep(), new TweakccUpdateStep(), new WrapperUpdateStep(), diff --git a/src/core/variant-builder/steps/FinalizeStep.ts b/src/core/variant-builder/steps/FinalizeStep.ts index a1880ed..888d28d 100644 --- a/src/core/variant-builder/steps/FinalizeStep.ts +++ b/src/core/variant-builder/steps/FinalizeStep.ts @@ -4,7 +4,7 @@ import path from 'node:path'; import { writeJson } from '../../fs.js'; -import { TEAM_MODE_SUPPORTED } from '../../constants.js'; +import { NATIVE_MULTIAGENT_SUPPORTED, TEAM_MODE_SUPPORTED } from '../../constants.js'; import type { VariantMeta } from '../../types.js'; import type { BuildContext, BuildStep } from '../types.js'; @@ -24,11 +24,14 @@ export class FinalizeStep implements BuildStep { private finalize(ctx: BuildContext): void { const { params, paths, prefs, state, provider } = ctx; - // Check if team mode was enabled (via params OR provider defaults) + // Check if team mode was enabled (via params OR provider defaults) - legacy const teamModeEnabled = TEAM_MODE_SUPPORTED ? Boolean(params.enableTeamMode) || Boolean(provider.enablesTeamMode) : false; + // Check if swarm mode was enabled (default: true unless explicitly disabled) + const swarmModeEnabled = NATIVE_MULTIAGENT_SUPPORTED ? Boolean(state.swarmModeEnabled) : false; + const meta: VariantMeta = { name: params.name, provider: params.providerKey, @@ -48,6 +51,7 @@ export class FinalizeStep implements BuildStep { npmPackage: prefs.resolvedNpmPackage, npmVersion: prefs.resolvedNpmVersion, teamModeEnabled, + swarmModeEnabled, }; writeJson(path.join(paths.variantDir, 'variant.json'), meta); diff --git a/src/core/variant-builder/steps/SwarmModeStep.ts b/src/core/variant-builder/steps/SwarmModeStep.ts new file mode 100644 index 0000000..5e4290d --- /dev/null +++ b/src/core/variant-builder/steps/SwarmModeStep.ts @@ -0,0 +1,84 @@ +/** + * SwarmModeStep - Patches cli.js to enable native multi-agent features + * + * Swarm mode enables (Claude Code 2.1.16+): + * - TeammateTool for team coordination + * - Delegate mode for Task tool + * - Swarm spawning via ExitPlanMode + * - Teammate mailbox/messaging + * - Task ownership and claiming + * + * This replaces the legacy team mode patch with native Claude Code features. + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { detectSwarmModeState, setSwarmModeEnabled } from '../swarm-mode-patch.js'; +import type { BuildContext, BuildStep } from '../types.js'; + +export class SwarmModeStep implements BuildStep { + name = 'SwarmMode'; + + private shouldEnableSwarmMode(ctx: BuildContext): boolean { + // Swarm mode is enabled by default unless explicitly disabled + // Check for explicit disable flag (disableSwarmMode = true means don't enable) + if (ctx.params.disableSwarmMode === true) return false; + // Otherwise enable by default + return true; + } + + execute(ctx: BuildContext): void { + if (!this.shouldEnableSwarmMode(ctx)) return; + ctx.report('Enabling swarm mode...'); + this.patchCli(ctx); + } + + async executeAsync(ctx: BuildContext): Promise { + if (!this.shouldEnableSwarmMode(ctx)) return; + await ctx.report('Enabling swarm mode...'); + this.patchCli(ctx); + } + + private patchCli(ctx: BuildContext): void { + const { state, paths } = ctx; + + // Find cli.js path + const cliPath = path.join(paths.npmDir, 'node_modules', '@anthropic-ai', 'claude-code', 'cli.js'); + const backupPath = `${cliPath}.backup`; + + if (!fs.existsSync(cliPath)) { + state.notes.push('Warning: cli.js not found, skipping swarm mode patch'); + return; + } + + // Create backup if not exists + if (!fs.existsSync(backupPath)) { + fs.copyFileSync(cliPath, backupPath); + } + + // Read cli.js + const content = fs.readFileSync(cliPath, 'utf8'); + + const patchResult = setSwarmModeEnabled(content, true); + if (patchResult.state === 'unknown') { + state.notes.push('Warning: Swarm mode gate not found in cli.js, patch may not work'); + return; + } + if (!patchResult.changed && patchResult.state === 'enabled') { + state.notes.push('Swarm mode already enabled'); + return; + } + + fs.writeFileSync(cliPath, patchResult.content); + + // Verify patch + const verifyContent = fs.readFileSync(cliPath, 'utf8'); + if (detectSwarmModeState(verifyContent) !== 'enabled') { + state.notes.push('Warning: Swarm mode patch verification failed'); + return; + } + + state.notes.push('Swarm mode enabled successfully'); + state.swarmModeEnabled = true; + } +} diff --git a/src/core/variant-builder/steps/index.ts b/src/core/variant-builder/steps/index.ts index cca64b9..3fd5b76 100644 --- a/src/core/variant-builder/steps/index.ts +++ b/src/core/variant-builder/steps/index.ts @@ -5,6 +5,7 @@ export { PrepareDirectoriesStep } from './PrepareDirectoriesStep.js'; export { InstallNpmStep } from './InstallNpmStep.js'; export { TeamModeStep } from './TeamModeStep.js'; +export { SwarmModeStep } from './SwarmModeStep.js'; export { WriteConfigStep } from './WriteConfigStep.js'; export { BrandThemeStep } from './BrandThemeStep.js'; export { TweakccStep } from './TweakccStep.js'; diff --git a/src/core/variant-builder/swarm-mode-patch.ts b/src/core/variant-builder/swarm-mode-patch.ts new file mode 100644 index 0000000..aa1eb57 --- /dev/null +++ b/src/core/variant-builder/swarm-mode-patch.ts @@ -0,0 +1,127 @@ +/** + * Swarm Mode Patch - Force-enable native multi-agent features in Claude Code 2.1.16+ + * + * Native multi-agent features (swarms, TeammateTool, delegate mode, teammate coordination) + * are gated by the `tengu_brass_pebble` statsig flag checked via a gate function. + * + * This module patches the gate function to bypass the statsig check and force-enable all features. + * + * See: docs/research/native-multiagent-gates.md + */ + +export type SwarmModeState = 'enabled' | 'disabled' | 'unknown'; + +// The gate function checks CLAUDE_CODE_AGENT_SWARMS env var, then statsig flag +// Pattern: function XX(){if(Yz(process.env.CLAUDE_CODE_AGENT_SWARMS))return!1;return xK("tengu_brass_pebble",!1)} +const SWARM_GATE_MARKER = /tengu_brass_pebble/; + +// Match the gate function definition - captures the function name +// The function has a specific pattern: checks env var, then calls xK() for statsig +const SWARM_GATE_FN_RE = + /function\s+([a-zA-Z_$][\w$]*)\(\)\{if\([\w$]+\(process\.env\.CLAUDE_CODE_AGENT_SWARMS\)\)return!1;return\s*[\w$]+\("tengu_brass_pebble",!1\)\}/; + +/** + * Find the swarm gate function in the CLI content + */ +const findSwarmGateFunction = (content: string): { fnName: string; fullMatch: string } | null => { + // First verify the marker exists + if (!SWARM_GATE_MARKER.test(content)) return null; + + const match = content.match(SWARM_GATE_FN_RE); + if (!match) return null; + + return { fnName: match[1], fullMatch: match[0] }; +}; + +/** + * Check if swarm mode is already patched (gate returns true unconditionally) + */ +const isAlreadyPatched = (content: string, fnName: string): boolean => { + const patchedRe = new RegExp(`function\\s+${fnName}\\(\\)\\{return!0\\}`); + return patchedRe.test(content); +}; + +/** + * Detect the current swarm mode state in CLI content + */ +export const detectSwarmModeState = (content: string): SwarmModeState => { + const gate = findSwarmGateFunction(content); + + if (gate) { + // Found the original gate function - not patched + return 'disabled'; + } + + // If the marker is gone, the gate was likely patched + // Check for signs that swarm code exists but gate is patched + if (!SWARM_GATE_MARKER.test(content)) { + // Look for swarm-related code that would indicate the feature exists + const hasSwarmCode = /TeammateTool|teammate_mailbox|launchSwarm/.test(content); + if (hasSwarmCode) { + // Swarm code exists but marker is gone - likely patched to enabled + return 'enabled'; + } + // No swarm code at all - unknown/unsupported version + return 'unknown'; + } + + // The marker exists but the full gate function doesn't - ambiguous state + return 'unknown'; +}; + +/** + * Patch the CLI to enable swarm mode + * + * @param content - The CLI content to patch + * @param enable - Whether to enable (true) or could restore (false) - currently only enable supported + * @returns The patched content and state information + */ +export const setSwarmModeEnabled = ( + content: string, + enable: boolean +): { content: string; changed: boolean; state: SwarmModeState } => { + if (!enable) { + // Restoring original state is not supported - would need to store original function + return { content, changed: false, state: detectSwarmModeState(content) }; + } + + const gate = findSwarmGateFunction(content); + if (!gate) { + // Check if already patched + const currentState = detectSwarmModeState(content); + if (currentState === 'enabled') { + return { content, changed: false, state: 'enabled' }; + } + return { content, changed: false, state: 'unknown' }; + } + + // Check if already patched + if (isAlreadyPatched(content, gate.fnName)) { + return { content, changed: false, state: 'enabled' }; + } + + // Patch the gate function to always return true + const patched = content.replace(gate.fullMatch, `function ${gate.fnName}(){return!0}`); + + return { content: patched, changed: true, state: 'enabled' }; +}; + +/** + * Get information about the swarm gate for diagnostics + */ +export const getSwarmGateInfo = ( + content: string +): { + found: boolean; + fnName?: string; + state: SwarmModeState; +} => { + const gate = findSwarmGateFunction(content); + const state = detectSwarmModeState(content); + + if (gate) { + return { found: true, fnName: gate.fnName, state }; + } + + return { found: false, state }; +}; diff --git a/src/core/variant-builder/types.ts b/src/core/variant-builder/types.ts index 4bdb00a..720a611 100644 --- a/src/core/variant-builder/types.ts +++ b/src/core/variant-builder/types.ts @@ -52,6 +52,8 @@ export interface BuildState { env?: ProviderEnv; resolvedApiKey?: string; meta?: VariantMeta; + /** Whether swarm mode was successfully enabled */ + swarmModeEnabled?: boolean; } /** diff --git a/src/core/variant-builder/update-steps/SwarmModeUpdateStep.ts b/src/core/variant-builder/update-steps/SwarmModeUpdateStep.ts new file mode 100644 index 0000000..c486b12 --- /dev/null +++ b/src/core/variant-builder/update-steps/SwarmModeUpdateStep.ts @@ -0,0 +1,92 @@ +/** + * SwarmModeUpdateStep - Re-applies swarm mode patch on updates + * + * Since npm reinstall may overwrite the patched cli.js, we need to + * re-apply the swarm mode patch during updates. + * + * Swarm mode enables (Claude Code 2.1.16+): + * - TeammateTool for team coordination + * - Delegate mode for Task tool + * - Swarm spawning via ExitPlanMode + * - Teammate mailbox/messaging + * - Task ownership and claiming + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { NATIVE_MULTIAGENT_SUPPORTED } from '../../constants.js'; +import { detectSwarmModeState, setSwarmModeEnabled } from '../swarm-mode-patch.js'; +import type { UpdateContext, UpdateStep } from '../types.js'; + +export class SwarmModeUpdateStep implements UpdateStep { + name = 'SwarmMode'; + + private shouldEnableSwarmMode(ctx: UpdateContext): boolean { + // Swarm mode is enabled by default on updates unless: + // 1. The variant was created with swarm mode disabled, OR + // 2. The variant.json doesn't have swarmModeEnabled set (old variant) + // + // For old variants without swarmModeEnabled, we enable it during update + // to bring them up to date with the new default behavior. + if (ctx.meta.swarmModeEnabled === false) return false; + return true; + } + + execute(ctx: UpdateContext): void { + if (!NATIVE_MULTIAGENT_SUPPORTED) return; + if (!this.shouldEnableSwarmMode(ctx)) return; + ctx.report('Re-applying swarm mode patch...'); + this.patchCli(ctx); + } + + async executeAsync(ctx: UpdateContext): Promise { + if (!NATIVE_MULTIAGENT_SUPPORTED) return; + if (!this.shouldEnableSwarmMode(ctx)) return; + await ctx.report('Re-applying swarm mode patch...'); + this.patchCli(ctx); + } + + private patchCli(ctx: UpdateContext): void { + const { state, meta, paths } = ctx; + + // Find cli.js path + const cliPath = path.join(paths.npmDir, 'node_modules', '@anthropic-ai', 'claude-code', 'cli.js'); + const backupPath = `${cliPath}.backup`; + + if (!fs.existsSync(cliPath)) { + state.notes.push('Warning: cli.js not found, skipping swarm mode patch'); + return; + } + + // Create backup if not exists + if (!fs.existsSync(backupPath)) { + fs.copyFileSync(cliPath, backupPath); + } + + // Read cli.js + const content = fs.readFileSync(cliPath, 'utf8'); + + const patchResult = setSwarmModeEnabled(content, true); + if (patchResult.state === 'unknown') { + state.notes.push('Warning: Swarm mode gate not found in cli.js, patch may not work'); + return; + } + if (!patchResult.changed && patchResult.state === 'enabled') { + state.notes.push('Swarm mode already enabled'); + meta.swarmModeEnabled = true; + return; + } + + fs.writeFileSync(cliPath, patchResult.content); + + // Verify patch + const verifyContent = fs.readFileSync(cliPath, 'utf8'); + if (detectSwarmModeState(verifyContent) !== 'enabled') { + state.notes.push('Warning: Swarm mode patch verification failed'); + return; + } + + meta.swarmModeEnabled = true; + state.notes.push('Swarm mode enabled successfully'); + } +} diff --git a/src/core/variant-builder/update-steps/index.ts b/src/core/variant-builder/update-steps/index.ts index e85b699..7047bca 100644 --- a/src/core/variant-builder/update-steps/index.ts +++ b/src/core/variant-builder/update-steps/index.ts @@ -4,6 +4,7 @@ export { InstallNpmUpdateStep } from './InstallNpmUpdateStep.js'; export { TeamModeUpdateStep } from './TeamModeUpdateStep.js'; +export { SwarmModeUpdateStep } from './SwarmModeUpdateStep.js'; export { ModelOverridesStep } from './ModelOverridesStep.js'; export { TweakccUpdateStep } from './TweakccUpdateStep.js'; export { WrapperUpdateStep } from './WrapperUpdateStep.js'; diff --git a/test/unit/swarm-mode-patch.test.ts b/test/unit/swarm-mode-patch.test.ts new file mode 100644 index 0000000..b185923 --- /dev/null +++ b/test/unit/swarm-mode-patch.test.ts @@ -0,0 +1,107 @@ +import { describe, it } from 'node:test'; +import assert from 'node:assert'; +import { + detectSwarmModeState, + setSwarmModeEnabled, + getSwarmGateInfo, +} from '../../src/core/variant-builder/swarm-mode-patch.js'; + +describe('swarm-mode-patch', () => { + // Realistic gate function pattern from Claude Code 2.1.17 + const UNPATCHED_GATE = `function i8(){if(Yz(process.env.CLAUDE_CODE_AGENT_SWARMS))return!1;return xK("tengu_brass_pebble",!1)}`; + const PATCHED_GATE = `function i8(){return!0}`; + + // Simulated CLI content with the gate function + const makeCliContent = (gate: string) => + `var someCode=123;${gate}var moreCode=456;function teammate(){return i8()&&doStuff()}`; + + describe('detectSwarmModeState', () => { + it('returns disabled when unpatched gate function is found', () => { + const content = makeCliContent(UNPATCHED_GATE); + assert.strictEqual(detectSwarmModeState(content), 'disabled'); + }); + + it('returns unknown when no marker is found', () => { + const content = 'function foo(){return!0}var bar=123;'; + assert.strictEqual(detectSwarmModeState(content), 'unknown'); + }); + + it('returns unknown when marker exists but no gate function pattern', () => { + // Has the marker string but not the full gate function pattern + const content = 'var x="tengu_brass_pebble";function foo(){return!1}'; + assert.strictEqual(detectSwarmModeState(content), 'unknown'); + }); + }); + + describe('setSwarmModeEnabled', () => { + it('patches the gate function to return true', () => { + const content = makeCliContent(UNPATCHED_GATE); + const result = setSwarmModeEnabled(content, true); + + assert.strictEqual(result.changed, true); + assert.strictEqual(result.state, 'enabled'); + assert.ok(result.content.includes('function i8(){return!0}')); + assert.ok(!result.content.includes('tengu_brass_pebble')); + }); + + it('does not change already patched content', () => { + const content = makeCliContent(PATCHED_GATE); + // Add the marker somewhere else so detectSwarmModeState can find it + const contentWithMarker = content + ';var marker="tengu_brass_pebble"'; + const result = setSwarmModeEnabled(contentWithMarker, true); + + // Should detect as enabled (or unknown) and not change + assert.strictEqual(result.changed, false); + }); + + it('returns unchanged when enable=false (restore not supported)', () => { + const content = makeCliContent(UNPATCHED_GATE); + const result = setSwarmModeEnabled(content, false); + + assert.strictEqual(result.changed, false); + assert.strictEqual(result.state, 'disabled'); + assert.strictEqual(result.content, content); + }); + + it('handles different function names', () => { + const gateWithDifferentName = `function xY7(){if(Yz(process.env.CLAUDE_CODE_AGENT_SWARMS))return!1;return xK("tengu_brass_pebble",!1)}`; + const content = `var a=1;${gateWithDifferentName}var b=2;`; + const result = setSwarmModeEnabled(content, true); + + assert.strictEqual(result.changed, true); + assert.strictEqual(result.state, 'enabled'); + assert.ok(result.content.includes('function xY7(){return!0}')); + }); + }); + + describe('getSwarmGateInfo', () => { + it('returns gate info when found', () => { + const content = makeCliContent(UNPATCHED_GATE); + const info = getSwarmGateInfo(content); + + assert.strictEqual(info.found, true); + assert.strictEqual(info.fnName, 'i8'); + assert.strictEqual(info.state, 'disabled'); + }); + + it('returns not found when gate is missing', () => { + const content = 'function foo(){return!0}'; + const info = getSwarmGateInfo(content); + + assert.strictEqual(info.found, false); + assert.strictEqual(info.state, 'unknown'); + }); + }); + + describe('real CLI content patterns', () => { + it('handles whitespace variations in gate function', () => { + // Sometimes minifiers add/remove whitespace differently + const gateWithSpace = `function i8(){if(Yz(process.env.CLAUDE_CODE_AGENT_SWARMS))return!1;return xK("tengu_brass_pebble",!1)}`; + const content = makeCliContent(gateWithSpace); + const result = setSwarmModeEnabled(content, true); + + assert.strictEqual(result.changed, true); + assert.strictEqual(result.state, 'enabled'); + }); + }); +}); From 87a4bdcfb3ef39a2d0384b3b293b59335bb0a500 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Fri, 23 Jan 2026 15:54:44 +0000 Subject: [PATCH 02/13] feat: rename project from cc-mirror to claude-sneakpeek - Rename package to claude-sneakpeek for npm account realmikekelly - Update GitHub URLs to mikekelly/claude-sneakpeek - Rename ~/.cc-mirror/ to ~/.claude-sneakpeek/ - Rename CC_MIRROR_* env vars to CLAUDE_SNEAKPEEK_* - Rename dist/cc-mirror.mjs to dist/claude-sneakpeek.mjs - Update shell markers from # cc-mirror: to # claude-sneakpeek: - Simplify README with cleaner quick start using claudesp variant - Update all docs, tests, and scripts with new naming Co-Authored-By: Claude Opus 4.5 --- .github/ISSUE_TEMPLATE/bug_report.md | 4 +- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- AGENTS.md | 38 +-- CHANGELOG.md | 16 +- CONTRIBUTING.md | 6 +- DESIGN.md | 36 +-- README.md | 304 +++--------------- docs/README.md | 8 +- docs/TWEAKCC-GUIDE.md | 22 +- docs/architecture/overview.md | 32 +- docs/features/mirror-claude.md | 24 +- docs/features/team-mode.md | 84 ++--- docs/research/native-multiagent-gates.md | 14 +- package.json | 12 +- scripts/bundle.ts | 6 +- scripts/enable-team-mode.sh | 8 +- scripts/render-tui-svg.ts | 6 +- src/cli/commands/create.ts | 2 +- src/cli/commands/tasks.ts | 32 +- src/cli/commands/update.ts | 2 +- src/cli/help.ts | 24 +- src/cli/utils/buildShareUrl.ts | 4 +- src/cli/utils/printSummary.ts | 4 +- src/core/constants.ts | 2 +- src/core/errors.ts | 4 +- src/core/prompt-pack/targets.ts | 4 +- src/core/shell-env.ts | 4 +- src/core/skills.ts | 22 +- src/core/tasks/resolve.ts | 14 +- .../update-steps/TeamModeUpdateStep.ts | 4 +- src/core/wrapper.ts | 26 +- src/tui/app.tsx | 8 +- src/tui/components/ui/Input.tsx | 2 +- src/tui/components/ui/Layout.tsx | 2 +- src/tui/components/ui/Logo.tsx | 4 +- src/tui/components/ui/Menu.tsx | 2 +- src/tui/components/ui/Progress.tsx | 2 +- src/tui/components/ui/Typography.tsx | 2 +- src/tui/components/ui/theme.ts | 2 +- src/tui/components/ui/types.ts | 2 +- src/tui/content/easter-eggs.ts | 6 +- src/tui/content/education.ts | 6 +- src/tui/content/providers.ts | 2 +- src/tui/hooks/useVariantCreate.ts | 6 +- src/tui/hooks/useVariantUpdate.ts | 2 +- src/tui/screens/AboutScreen.tsx | 6 +- src/tui/screens/FeedbackScreen.tsx | 8 +- src/tui/screens/HomeScreen.tsx | 6 +- src/tui/screens/ModelConfigScreen.tsx | 4 +- src/tui/screens/index.ts | 2 +- test/claude-config.test.ts | 2 +- test/cli/help.test.ts | 4 +- test/core.test.ts | 7 +- test/core/tasks/resolve.test.ts | 21 +- test/core/tasks/store.test.ts | 2 +- test/core/wrapper.test.ts | 6 +- test/e2e/creation.test.ts | 6 +- test/e2e/team-mode.test.ts | 2 +- test/helpers/fs-helpers.ts | 2 +- test/helpers/mock-core.ts | 4 +- test/prompt-pack.test.ts | 2 +- test/shell-env.test.ts | 6 +- test/skills.test.ts | 4 +- test/tui/hooks.test.ts | 16 +- 64 files changed, 357 insertions(+), 571 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 63d948c..2c96e44 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -14,7 +14,7 @@ A clear and concise description of what the bug is. Steps to reproduce the behavior: -1. Run `npx cc-mirror ...` +1. Run `npx claude-sneakpeek ...` 2. Select '...' 3. See error @@ -30,7 +30,7 @@ If applicable, add screenshots to help explain your problem. - **OS**: [e.g., macOS 14.0, Ubuntu 22.04, Windows 11] - **Node.js version**: [e.g., 20.10.0] -- **cc-mirror version**: [e.g., 1.0.0] +- **claude-sneakpeek version**: [e.g., 1.0.0] - **Provider**: [e.g., zai, minimax, openrouter, ccrouter] ## Additional Context diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 20f1c7c..0465eca 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,6 +1,6 @@ --- name: Feature Request -about: Suggest an idea for cc-mirror +about: Suggest an idea for claude-sneakpeek title: '[Feature] ' labels: enhancement assignees: '' diff --git a/AGENTS.md b/AGENTS.md index ce4dc90..99cca31 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -68,8 +68,8 @@ npm run dev # Run CLI from TypeScript sources npm run tui # Launch TUI wizard npm test # Run all tests npm run typecheck # TypeScript check without emit -npm run bundle # Build dist/cc-mirror.mjs -npm run render:tui-svg # Regenerate docs/cc-mirror-tree.svg +npm run bundle # Build dist/claude-sneakpeek.mjs +npm run render:tui-svg # Regenerate docs/claude-sneakpeek-tree.svg ``` ## Coding Conventions @@ -84,7 +84,7 @@ npm run render:tui-svg # Regenerate docs/cc-mirror-tree.svg ### Variant Directory Structure ``` -~/.cc-mirror// +~/.claude-sneakpeek// ├── config/ │ ├── settings.json # Env overrides (API keys, base URLs, model defaults) │ ├── .claude.json # API-key approvals + onboarding/theme + MCP servers @@ -102,11 +102,11 @@ npm run render:tui-svg # Regenerate docs/cc-mirror-tree.svg Location: `/` (macOS/Linux) or `/.cmd` (Windows) -Default `` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on Windows. +Default `` is `~/.local/bin` on macOS/Linux and `~/.claude-sneakpeek/bin` on Windows. - Sets `CLAUDE_CONFIG_DIR` to variant config - Loads `settings.json` into env at runtime -- Shows provider splash ASCII art when TTY and `CC_MIRROR_SPLASH != 0` +- Shows provider splash ASCII art when TTY and `CLAUDE_SNEAKPEEK_SPLASH != 0` - Auto-update disable: `DISABLE_AUTOUPDATER=1` in settings.json env ### Provider Auth Modes @@ -127,7 +127,7 @@ Default `` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on W ## Team Mode -**Legacy notice:** Team mode is only supported in the published cc-mirror **1.6.3** release. Current development builds do not patch Claude Code; focus is provider enablement and stable updates. +**Legacy notice:** Team mode is only supported in the published claude-sneakpeek **1.6.3** release. Current development builds do not patch Claude Code; focus is provider enablement and stable updates. Team mode patches `cli.js` to enable Task\* tools for multi-agent collaboration. @@ -144,7 +144,7 @@ function sU() { ``` - Backup stored at `cli.js.backup` before patching -- Task storage: `~/.cc-mirror//config/tasks//` +- Task storage: `~/.claude-sneakpeek//config/tasks//` ### Dynamic Team Names (v1.3.0+) @@ -227,12 +227,12 @@ export const MINIMAX_BLOCKED_TOOLS = [ ```bash # Variant config -cat ~/.cc-mirror//config/settings.json -cat ~/.cc-mirror//config/.claude.json -cat ~/.cc-mirror//variant.json +cat ~/.claude-sneakpeek//config/settings.json +cat ~/.claude-sneakpeek//config/.claude.json +cat ~/.claude-sneakpeek//variant.json # TweakCC config -cat ~/.cc-mirror//tweakcc/config.json +cat ~/.claude-sneakpeek//tweakcc/config.json # Wrapper script cat / @@ -242,18 +242,18 @@ cat / ```bash # Check if cli.js is patched -grep "function sU(){return" ~/.cc-mirror//npm/node_modules/@anthropic-ai/claude-code/cli.js +grep "function sU(){return" ~/.claude-sneakpeek//npm/node_modules/@anthropic-ai/claude-code/cli.js # Should show: function sU(){return!0} (enabled) # Not: function sU(){return!1} (disabled) # List team tasks -ls ~/.cc-mirror//config/tasks// +ls ~/.claude-sneakpeek//config/tasks// ``` ### Health Check ```bash -npx cc-mirror doctor +npx claude-sneakpeek doctor ``` ### Reference Files @@ -261,17 +261,17 @@ npx cc-mirror doctor - **Upstream CLI references**: `repos/anthropic-claude-code-*/cli.js` (multiple versions for comparison) - **System prompt sources**: `repos/claude-code-system-prompts/` (includes CHANGELOG.md) - **Research notes**: `notes/` (deep dives, version analysis, design decisions) -- **Applied prompts**: `~/.cc-mirror//tweakcc/system-prompts/` -- **Debug logs**: `~/.cc-mirror//config/debug/*.txt` +- **Applied prompts**: `~/.claude-sneakpeek//tweakcc/system-prompts/` +- **Debug logs**: `~/.claude-sneakpeek//config/debug/*.txt` ### CLI Feature Gates ```bash # Search for feature flags in cli.js -rg "tengu_prompt_suggestion|promptSuggestionEnabled" ~/.cc-mirror//npm/node_modules/@anthropic-ai/claude-code/cli.js +rg "tengu_prompt_suggestion|promptSuggestionEnabled" ~/.claude-sneakpeek//npm/node_modules/@anthropic-ai/claude-code/cli.js # Check cached gates -cat ~/.cc-mirror//config/.claude.json | jq '.statsig' +cat ~/.claude-sneakpeek//config/.claude.json | jq '.statsig' ``` ## ZAI CLI (for Z.ai variants) @@ -299,7 +299,7 @@ Requires `Z_AI_API_KEY` in environment. 2. Verify `variant.json` exists 3. Verify `.claude.json` has `hasCompletedOnboarding` + `theme` 4. Run wrapper in TTY and confirm splash + no onboarding prompt -5. Use `npx cc-mirror update test-zai` to validate update flow +5. Use `npx claude-sneakpeek update test-zai` to validate update flow ## Testing diff --git a/CHANGELOG.md b/CHANGELOG.md index c231096..f4c0fc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ All notable changes to this project will be documented in this file. ### Documentation -- README and docs now mark team mode as legacy (cc-mirror 1.6.3 only). +- README and docs now mark team mode as legacy (claude-sneakpeek 1.6.3 only). ## [1.6.5] - 2026-01-12 @@ -29,7 +29,7 @@ All notable changes to this project will be documented in this file. ### Changed -- `cc-mirror update` now resets `npm/` and `tweakcc/` before reinstalling, preserving config/tasks/skills for a clean rebuild. +- `claude-sneakpeek update` now resets `npm/` and `tweakcc/` before reinstalling, preserving config/tasks/skills for a clean rebuild. - Update command defaults to quiet tweakcc output; use `--verbose` to show full logs. ### Added @@ -67,7 +67,7 @@ All notable changes to this project will be documented in this file. ### Changed - **Complete messaging overhaul: "Claude Code, Unshackled"** - - New tagline positions CC-MIRROR as an opinionated Claude Code distribution + - New tagline positions CLAUDE-SNEAKPEEK as an opinionated Claude Code distribution - "We did the hacking — you get the superpowers" - Team mode (multi-agent orchestration) is now the flagship feature @@ -77,10 +77,10 @@ All notable changes to this project will be documented in this file. - Updated provider descriptions across CLI, TUI, and documentation - **README.md completely rewritten** - - New hero section: "The Unlock" — explains what CC-MIRROR enables + - New hero section: "The Unlock" — explains what CLAUDE-SNEAKPEEK enables - Before/after ASCII diagram showing the transformation - Mirror Claude Quick Start at the top - - "What is CC-MIRROR?" section explains the opinionated distribution model + - "What is CLAUDE-SNEAKPEEK?" section explains the opinionated distribution model - Orchestrator skill section with example workflow - Clear documentation of team mode as default (with disable instructions) @@ -116,7 +116,7 @@ All notable changes to this project will be documented in this file. ### Changed -- **All commands now use `npx cc-mirror`** for portability - no global install required +- **All commands now use `npx claude-sneakpeek`** for portability - no global install required - Updated task-manager skill with `npx` prefix - Updated README.md command examples - Updated team-mode.md CLI examples @@ -307,7 +307,7 @@ All notable changes to this project will be documented in this file. - AskUserQuestion as mandatory tool (never text menus) - Background agents by default (`run_in_background=True`) - 8 domain-specific reference guides (code review, testing, devops, documentation, etc.) - - Managed skill marker (`.cc-mirror-managed`) for safe updates without overwriting user customizations + - Managed skill marker (`.claude-sneakpeek-managed`) for safe updates without overwriting user customizations - **Documentation** - `docs/features/team-mode.md` - Complete team mode guide with architecture diagrams @@ -339,7 +339,7 @@ All notable changes to this project will be documented in this file. ### Fixed -- Fixed bin path to use relative path (`./dist/cc-mirror.mjs`) +- Fixed bin path to use relative path (`./dist/claude-sneakpeek.mjs`) - Added missing `@eslint/js` dev dependency ## [1.0.2] - 2025-01-03 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d6b66e5..6068ba6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to cc-mirror +# Contributing to claude-sneakpeek Thanks for your interest in contributing! @@ -6,8 +6,8 @@ Thanks for your interest in contributing! ```bash # Clone the repo -git clone https://github.com/numman-ali/cc-mirror.git -cd cc-mirror +git clone https://github.com/numman-ali/claude-sneakpeek.git +cd claude-sneakpeek # Install dependencies npm install diff --git a/DESIGN.md b/DESIGN.md index b0b8350..cb9b840 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -1,4 +1,4 @@ -# cc-mirror Design +# claude-sneakpeek Design ## Goals @@ -11,7 +11,7 @@ ``` .-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-. - | ~/.cc-mirror/ | + | ~/.claude-sneakpeek/ | '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-' |-- npm/ # npm install root (cli.js lives here) |-- config/ # CLAUDE_CONFIG_DIR @@ -26,7 +26,7 @@ ``` Wrappers are installed into `/` (configurable). -Default `` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on Windows. +Default `` is `~/.local/bin` on macOS/Linux and `~/.claude-sneakpeek/bin` on Windows. ## Core Components @@ -66,15 +66,15 @@ Default `` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on W ## Updating Binaries -- `cc-mirror update` rebuilds the `npm/` + `tweakcc/` directories (preserving config, tasks, skills, approvals), then re-runs `npm install` and reapplies tweakcc for a clean upgrade. +- `claude-sneakpeek update` rebuilds the `npm/` + `tweakcc/` directories (preserving config, tasks, skills, approvals), then re-runs `npm install` and reapplies tweakcc for a clean upgrade. ## Maintenance Checklist -- Update all variants after Claude Code upgrades: `cc-mirror update` -- Update a single variant: `cc-mirror update ` -- Reapply or change brand preset: `cc-mirror update --brand zai` -- Adjust API keys/base URL: edit `~/.cc-mirror//config/settings.json` -- Launch tweakcc UI for a variant: `cc-mirror tweak ` +- Update all variants after Claude Code upgrades: `claude-sneakpeek update` +- Update a single variant: `claude-sneakpeek update ` +- Reapply or change brand preset: `claude-sneakpeek update --brand zai` +- Adjust API keys/base URL: edit `~/.claude-sneakpeek//config/settings.json` +- Launch tweakcc UI for a variant: `claude-sneakpeek tweak ` - Opt out of prompt packs: `--no-prompt-pack` - Select prompt pack mode: `--prompt-pack-mode minimal|maximal` - Opt out of skill install: `--no-skill-install` @@ -85,36 +85,36 @@ Provider templates are plain TS objects; add new providers by extending `src/pro ## Auth Handling -When an API key is supplied, cc-mirror writes `ANTHROPIC_API_KEY` into the variant config +When an API key is supplied, claude-sneakpeek writes `ANTHROPIC_API_KEY` into the variant config so Claude Code recognizes API-key auth during onboarding. Wrappers also load `settings.json` env vars at launch, ensuring onboarding sees API-key auth before Claude Code applies config env internally. -For Z.ai variants, cc-mirror also sets `Z_AI_API_KEY` to the same value by default (used by `zai-cli`), unless the user overrides it via extra env. Quick/TUI flows can also write it into the shell profile (opt out with `--no-shell-env`). +For Z.ai variants, claude-sneakpeek also sets `Z_AI_API_KEY` to the same value by default (used by `zai-cli`), unless the user overrides it via extra env. Quick/TUI flows can also write it into the shell profile (opt out with `--no-shell-env`). -cc-mirror also stores the **last 20 characters** of the API key in -`~/.cc-mirror//config/.claude.json` under `customApiKeyResponses.approved` so Claude Code +claude-sneakpeek also stores the **last 20 characters** of the API key in +`~/.claude-sneakpeek//config/.claude.json` under `customApiKeyResponses.approved` so Claude Code skips the OAuth login screen in interactive mode. Brand presets stamp the user label for the chat banner from `CLAUDE_CODE_USER_LABEL` (fallback: OS username). `ANTHROPIC_AUTH_TOKEN` is stripped from variant settings and wrappers; variants are API-key only to avoid auth conflicts. -MiniMax variants seed a default MCP server entry in `~/.cc-mirror//config/.claude.json` so the coding-plan MCP is ready once you add your API key. +MiniMax variants seed a default MCP server entry in `~/.claude-sneakpeek//config/.claude.json` so the coding-plan MCP is ready once you add your API key. -Z.ai variants add a deny list for known server-side MCP tools in `~/.cc-mirror//config/settings.json`, pushing the model toward `zai-cli`. +Z.ai variants add a deny list for known server-side MCP tools in `~/.claude-sneakpeek//config/settings.json`, pushing the model toward `zai-cli`. Prompt packs (provider overlays) are injected into tweakcc prompt fragments after tweakcc runs, then re-applied so the patched binary includes provider guidance. -dev-browser is installed into `~/.cc-mirror//config/skills/dev-browser` by default for Z.ai and MiniMax variants (opt out with `--no-skill-install`). +dev-browser is installed into `~/.claude-sneakpeek//config/skills/dev-browser` by default for Z.ai and MiniMax variants (opt out with `--no-skill-install`). ## Brand Presets -Brand presets are optional tweakcc configurations written into `~/.cc-mirror//tweakcc/config.json`. +Brand presets are optional tweakcc configurations written into `~/.claude-sneakpeek//tweakcc/config.json`. Presets are provider-aware (e.g., `zai` auto-selects the Z.ai Carbon skin, `minimax` selects MiniMax Pulse) but can be overridden via `--brand`. ## Install (npm-only) -cc-mirror always installs `@anthropic-ai/claude-code@2.0.76` into `~/.cc-mirror//npm` and runs its `cli.js`. +claude-sneakpeek always installs `@anthropic-ai/claude-code@2.0.76` into `~/.claude-sneakpeek//npm` and runs its `cli.js`. Use `--npm-package` to override the package name; the version stays pinned. diff --git a/README.md b/README.md index b82dadf..137cb16 100644 --- a/README.md +++ b/README.md @@ -1,144 +1,51 @@ -# CC-MIRROR +# claude-sneakpeek -

- CC-MIRROR Provider Themes -

+Isolated Claude Code installations with custom providers and themes. -

- npm version - License: MIT - Twitter Follow -

- -

Claude Code, Unshackled

- -

- Pre-configured Claude Code variants with custom providers,
- prompt packs, and battle-tested enhancements.

- One command. Instant power-up. -

- ---- - -> **Note:** Team mode is only supported in the published **cc-mirror 1.6.3** release. -> Current development builds do not patch Claude Code; the focus is provider enablement and stable updates. - -## Legacy Team Mode (cc-mirror 1.6.3) - -Claude Code has a hidden multi-agent capability. CC-MIRROR enabled it in the 1.6.3 release. - -``` -┌─────────────────────────────────────────────────────────────────────────────┐ -│ │ -│ BEFORE AFTER │ -│ ══════ ═════ │ -│ │ -│ ┌─────────────────┐ ┌─────────────────────────────────┐ │ -│ │ Claude Code │ │ YOUR Claude Code │ │ -│ │ │ CC-MIRROR │ │ │ -│ │ • Single │ ─────────► │ ✓ Multi-Agent Orchestration │ │ -│ │ config │ │ ✓ Task-based Coordination │ │ -│ │ • No team │ │ ✓ Background Agent Spawning │ │ -│ │ mode │ │ ✓ Battle-tested Skill │ │ -│ │ │ │ ✓ Isolated Config │ │ -│ └─────────────────┘ └─────────────────────────────────┘ │ -│ │ -└─────────────────────────────────────────────────────────────────────────────┘ -``` - -**What gets unlocked:** - -| Tool | Purpose | -| ------------ | -------------------------------------------------------- | -| `TaskCreate` | Create tasks with subject, description, and dependencies | -| `TaskGet` | Retrieve full task details by ID | -| `TaskUpdate` | Update status, add comments, set blockers | -| `TaskList` | List all tasks with summary info | - -Plus a **battle-tested orchestrator skill** — refined through millions of tokens of iteration — that teaches Claude how to effectively coordinate multiple agents working in parallel. - ---- - -## Quick Start +## Install ```bash -# Fastest path to a configured Claude Code variant -npx cc-mirror quick --provider mirror --name mclaude - -# Run it -mclaude +npx claude-sneakpeek quick --provider mirror --name claudesp ``` -That's it. You now have a Claude Code variant ready to run. - -

- CC-MIRROR Home Screen -

- -### Or use the interactive wizard - -```bash -npx cc-mirror -``` +That's it. Now run `claudesp` to launch your isolated Claude Code. --- -## What is CC-MIRROR? - -CC-MIRROR is an **opinionated Claude Code distribution**. We did the hacking — you get the superpowers. - -At its core, CC-MIRROR: +## What is claude-sneakpeek? -1. **Clones** Claude Code into isolated instances -2. **Configures** provider endpoints, model mapping, and env defaults -3. **Applies** prompt packs and tweakcc themes -4. **Installs** optional skills (dev-browser) -5. **Packages** everything into a single command +claude-sneakpeek creates isolated Claude Code installations. Each variant has its own config, sessions, MCP servers, and credentials. Your main Claude Code stays untouched. -Each variant is completely isolated — its own config, sessions, MCP servers, and credentials. Your main Claude Code installation stays untouched. - -``` -┌─────────────────────────────────────────────────────────────────────────┐ -│ ~/.cc-mirror/ │ -│ │ -│ ├── mclaude/ ← Mirror Claude │ -│ │ ├── npm/ Claude Code installation │ -│ │ ├── config/ API keys, sessions, MCP servers │ -│ │ │ ├── tasks// Team task storage (legacy) │ -│ │ │ └── skills/orchestration/ Orchestrator skill (legacy) │ -│ │ ├── tweakcc/ Theme customization │ -│ │ └── variant.json Metadata │ -│ │ │ -│ ├── zai/ ← Z.ai variant (GLM models) │ -│ └── minimax/ ← MiniMax variant (M2.1) │ -│ │ -│ Wrappers: /mclaude, /zai, ... │ -└─────────────────────────────────────────────────────────────────────────┘ ``` +~/.claude-sneakpeek/ +├── claudesp/ ← Your variant +│ ├── npm/ Claude Code installation +│ ├── config/ API keys, sessions, MCP servers +│ ├── tweakcc/ Theme customization +│ └── variant.json Metadata +├── zai/ ← Another variant (optional) +└── minimax/ ← Another variant (optional) -Default `` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on Windows. +Wrapper: ~/.local/bin/claudesp +``` -**Windows tip:** add `%USERPROFILE%\\.cc-mirror\\bin` to your `PATH`, or run the `.cmd` wrapper directly. Each wrapper has a sibling `.mjs` launcher. +The wrapper command (`claudesp`) is added to `~/.local/bin` (macOS/Linux) or `~/.claude-sneakpeek/bin` (Windows). --- ## Providers -### Mirror Claude (Recommended) +### Mirror (default) -The purest path to vanilla Claude Code. No proxy, no model changes — just clean isolation. +Uses the standard Anthropic API. Authenticate normally via OAuth or API key. ```bash -npx cc-mirror quick --provider mirror --name mclaude +npx claude-sneakpeek quick --provider mirror --name claudesp ``` -- **Direct Anthropic API** — No proxy, authenticate normally (OAuth or API key) -- **Isolated config** — Experiment without affecting your main setup -- **Provider presets** — Clean defaults without hidden patches - ### Alternative Providers -Want to use different models? CC-MIRROR supports multiple providers: +Use different model providers: | Provider | Models | Auth | Best For | | -------------- | ---------------------- | ---------- | ------------------------------- | @@ -149,148 +56,33 @@ Want to use different models? CC-MIRROR supports multiple providers: ```bash # Z.ai (GLM Coding Plan) -npx cc-mirror quick --provider zai --api-key "$Z_AI_API_KEY" +npx claude-sneakpeek quick --provider zai --api-key "$Z_AI_API_KEY" # MiniMax (MiniMax-M2.1) -npx cc-mirror quick --provider minimax --api-key "$MINIMAX_API_KEY" +npx claude-sneakpeek quick --provider minimax --api-key "$MINIMAX_API_KEY" # OpenRouter (100+ models) -npx cc-mirror quick --provider openrouter --api-key "$OPENROUTER_API_KEY" \ +npx claude-sneakpeek quick --provider openrouter --api-key "$OPENROUTER_API_KEY" \ --model-sonnet "anthropic/claude-sonnet-4-20250514" # Claude Code Router (local LLMs) -npx cc-mirror quick --provider ccrouter -``` - ---- - -## Legacy Orchestrator Skill (cc-mirror 1.6.3) - -When team mode is enabled (cc-mirror 1.6.3), CC-MIRROR installs an **orchestrator skill** that teaches Claude how to coordinate work effectively. - -### The Conductor Identity - -Claude becomes "The Conductor" — a warm, capable orchestrator who transforms ambitious requests into elegant execution: - -``` -┌─────────────────────────────────────────────────────────────────┐ -│ │ -│ You are the Conductor. Users bring the vision. │ -│ You orchestrate the symphony of agents that makes it real. │ -│ │ -│ Complex work should feel effortless. │ -│ That's your gift to every user. │ -│ │ -└─────────────────────────────────────────────────────────────────┘ +npx claude-sneakpeek quick --provider ccrouter ``` -### What It Provides - -| Aspect | What Claude Learns | -| ---------------------- | ------------------------------------------------ | -| **Task Graph** | Decompose work into tasks with dependencies | -| **Parallel Execution** | Fan-out, pipeline, map-reduce patterns | -| **Background Agents** | Spawn agents that work while you continue | -| **Smart Prompting** | Context, scope, constraints, output expectations | -| **Progress Updates** | Milestone celebrations, warm professional tone | - -### Example Flow - -``` -User: "Build me a REST API for todo management with tests" - -Claude (The Conductor): -├── Clarifies requirements (AskUserQuestion with rich options) -├── Creates task graph with dependencies -├── Spawns background agents for parallel work: -│ ├── Agent 1: Database schema -│ ├── Agent 2: API routes (blocked by schema) -│ └── Agent 3: Test setup -├── Continues working while agents execute -├── Synthesizes results -└── Delivers unified output -``` - -> [Full Team Mode Documentation](docs/features/team-mode.md) - --- -## Project-Scoped Tasks (Legacy: cc-mirror 1.6.3) - -> Legacy feature: available only in cc-mirror 1.6.3. - -Tasks are automatically isolated by project folder — no cross-project pollution: +## Commands ```bash -cd ~/projects/api && mclaude # Team: mclaude-api -cd ~/projects/frontend && mclaude # Team: mclaude-frontend +npx claude-sneakpeek # Interactive TUI +npx claude-sneakpeek quick [options] # Fast setup +npx claude-sneakpeek list # List variants +npx claude-sneakpeek update [name] # Update variant(s) +npx claude-sneakpeek remove # Delete a variant +npx claude-sneakpeek doctor # Health check -# Multiple teams in the same project -TEAM=backend mclaude # Team: mclaude-myproject-backend -TEAM=frontend mclaude # Team: mclaude-myproject-frontend -``` - -### CLI Task Management (Legacy) - -Manage team tasks from the command line: - -```bash -npx cc-mirror tasks # List open tasks -npx cc-mirror tasks --ready # List ready tasks (open + not blocked) -npx cc-mirror tasks --json # JSON output for automation -npx cc-mirror tasks show 18 # Show task details -npx cc-mirror tasks create # Create new task -npx cc-mirror tasks update 5 --status resolved -npx cc-mirror tasks graph # Visualize dependencies -npx cc-mirror tasks graph --json # Graph as JSON for programmatic use -npx cc-mirror tasks clean --resolved # Cleanup done tasks -``` - ---- - -## Team Mode Flags (Legacy: cc-mirror 1.6.3) - -Team mode is enabled by default only in cc-mirror 1.6.3. In current builds, team mode is always disabled and these flags are ignored. - -```bash -# Create without team mode (legacy) -npx cc-mirror create --provider mirror --name vanilla --no-team-mode - -# Disable on existing variant -npx cc-mirror update myvariant --disable-team-mode -``` - -Legacy (1.6.3) TUI toggle: **Manage Variants → Toggle Team Mode** - ---- - -## All Commands - -```bash -# Create & manage variants -npx cc-mirror # Interactive TUI -npx cc-mirror quick [options] # Fast setup with defaults -npx cc-mirror create [options] # Full configuration wizard -npx cc-mirror list # List all variants -npx cc-mirror update [name] # Update one or all variants -npx cc-mirror remove # Delete a variant -npx cc-mirror doctor # Health check all variants -npx cc-mirror tweak # Launch tweakcc customization - -# Task management (legacy; cc-mirror 1.6.3) -npx cc-mirror tasks # List open tasks -npx cc-mirror tasks show # Show task details -npx cc-mirror tasks create # Create new task -npx cc-mirror tasks update # Update task -npx cc-mirror tasks delete # Delete task -npx cc-mirror tasks archive # Archive task -npx cc-mirror tasks clean # Bulk cleanup -npx cc-mirror tasks graph # Visualize dependencies - -# Launch your variant -mclaude # Run Mirror Claude -zai # Run Z.ai variant -minimax # Run MiniMax variant +# Run your variant +claudesp ``` --- @@ -329,12 +121,8 @@ Each provider includes a custom color theme via [tweakcc](https://github.com/Pie ## Documentation -| Document | Description | -| ----------------------------------------------- | ------------------------------------ | -| [Team Mode](docs/features/team-mode.md) | Legacy team mode (cc-mirror 1.6.3) | -| [Mirror Claude](docs/features/mirror-claude.md) | Pure Claude Code with clean defaults | -| [Architecture](docs/architecture/overview.md) | How CC-MIRROR works under the hood | -| [Full Documentation](docs/README.md) | Complete documentation index | +- [Mirror Claude](docs/features/mirror-claude.md) — Using the mirror provider +- [Architecture](docs/architecture/overview.md) — How it works --- @@ -342,25 +130,9 @@ Each provider includes a custom color theme via [tweakcc](https://github.com/Pie - [tweakcc](https://github.com/Piebald-AI/tweakcc) — Theme and customize Claude Code - [Claude Code Router](https://github.com/musistudio/claude-code-router) — Route Claude Code to any LLM -- [n-skills](https://github.com/numman-ali/n-skills) — Universal skills for AI agents - ---- - -## Contributing - -Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup. - -**Want to add a provider?** Check the [Provider Guide](docs/TWEAKCC-GUIDE.md). --- ## License -MIT — see [LICENSE](LICENSE) - ---- - -

- Created by Numman Ali
- @nummanali -

+MIT diff --git a/docs/README.md b/docs/README.md index 60ef765..fc6230d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -# CC-MIRROR Documentation +# CLAUDE-SNEAKPEEK Documentation ``` ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -27,7 +27,7 @@ | Document | Description | | ------------------------------------------ | ------------------------------------ | -| [Team Mode](features/team-mode.md) | Legacy team mode (cc-mirror 1.6.3) | +| [Team Mode](features/team-mode.md) | Legacy team mode (claude-sneakpeek 1.6.3) | | [Mirror Claude](features/mirror-claude.md) | Pure Claude Code with clean defaults | | [Brand Themes](features/brand-themes.md) | Custom color schemes per provider | | [Prompt Packs](features/prompt-packs.md) | Enhanced system prompts | @@ -36,7 +36,7 @@ | Document | Description | | ------------------------------------------------------ | ---------------------------------- | -| [Overview](architecture/overview.md) | How cc-mirror works under the hood | +| [Overview](architecture/overview.md) | How claude-sneakpeek works under the hood | | [Provider System](architecture/provider-system.md) | Adding and configuring providers | | [Variant Lifecycle](architecture/variant-lifecycle.md) | Create, update, and remove flows | @@ -74,7 +74,7 @@ docs/ ## 💡 Quick Links -- **New to cc-mirror?** Start with the [Quick Start](../README.md#quick-start) +- **New to claude-sneakpeek?** Start with the [Quick Start](../README.md#quick-start) - **Want team features?** Legacy docs: [Team Mode](features/team-mode.md) - **Pure Claude experience?** Try [Mirror Claude](features/mirror-claude.md) - **Adding a provider?** See [Provider System](architecture/provider-system.md) diff --git a/docs/TWEAKCC-GUIDE.md b/docs/TWEAKCC-GUIDE.md index 544dfa7..cd78090 100644 --- a/docs/TWEAKCC-GUIDE.md +++ b/docs/TWEAKCC-GUIDE.md @@ -1,6 +1,6 @@ -# tweakcc Integration Guide (cc-mirror) +# tweakcc Integration Guide (claude-sneakpeek) -This document summarizes tweakcc capabilities and concrete implementation ideas for cc-mirror variants. It is intentionally practical: you can copy/paste snippets, adopt patterns, or expand into your own presets. +This document summarizes tweakcc capabilities and concrete implementation ideas for claude-sneakpeek variants. It is intentionally practical: you can copy/paste snippets, adopt patterns, or expand into your own presets. ## What tweakcc can do (from upstream README) @@ -20,15 +20,15 @@ This document summarizes tweakcc capabilities and concrete implementation ideas tweakcc patches the Claude Code `cli.js` from the npm install. -## How cc-mirror uses tweakcc +## How claude-sneakpeek uses tweakcc - Per-variant config lives at: - - `~/.cc-mirror//tweakcc/config.json` - - `~/.cc-mirror//tweakcc/system-prompts/` + - `~/.claude-sneakpeek//tweakcc/config.json` + - `~/.claude-sneakpeek//tweakcc/system-prompts/` - Patch apply uses: - - `TWEAKCC_CONFIG_DIR=~/.cc-mirror//tweakcc` - - `TWEAKCC_CC_INSTALLATION_PATH=~/.cc-mirror//npm/node_modules/@anthropic-ai/claude-code/cli.js` -- cc-mirror applies tweakcc after create/update, unless `--no-tweak`. + - `TWEAKCC_CONFIG_DIR=~/.claude-sneakpeek//tweakcc` + - `TWEAKCC_CC_INSTALLATION_PATH=~/.claude-sneakpeek//npm/node_modules/@anthropic-ai/claude-code/cli.js` +- claude-sneakpeek applies tweakcc after create/update, unless `--no-tweak`. ## Recommended implementation patterns @@ -122,7 +122,7 @@ Suggested workflow: 1. Run tweakcc UI or open the system prompts folder. 2. Edit a single prompt file. -3. Run `tweakcc --apply` (cc-mirror does this on update). +3. Run `tweakcc --apply` (claude-sneakpeek does this on update). ### 7) Context limit overrides @@ -135,7 +135,7 @@ Use `CLAUDE_CODE_CONTEXT_LIMIT` only for custom endpoints that support larger wi - tweakcc is sensitive to Claude Code versions. Patch failures are expected after CC updates. - The `tweakcc` UI will still work even when one patch fails. -## Recommended cc-mirror UX flows +## Recommended claude-sneakpeek UX flows ### Quick path (simple install) @@ -162,7 +162,7 @@ Use `CLAUDE_CODE_CONTEXT_LIMIT` only for custom endpoints that support larger wi ## Startup ASCII art -tweakcc can **show or hide** Claude Code’s built‑in startup banner and clawd art. It does not currently support **custom** startup ASCII art. cc-mirror can optionally print a small wrapper splash when `CC_MIRROR_SPLASH=1`, and skips it for non‑TTY output or `--output-format` runs. +tweakcc can **show or hide** Claude Code’s built‑in startup banner and clawd art. It does not currently support **custom** startup ASCII art. claude-sneakpeek can optionally print a small wrapper splash when `CLAUDE_SNEAKPEEK_SPLASH=1`, and skips it for non‑TTY output or `--output-format` runs. ## Where to look in this repo diff --git a/docs/architecture/overview.md b/docs/architecture/overview.md index c2659e0..e07902c 100644 --- a/docs/architecture/overview.md +++ b/docs/architecture/overview.md @@ -1,8 +1,8 @@ # 🏗️ Architecture Overview -This document explains how cc-mirror works under the hood. +This document explains how claude-sneakpeek works under the hood. -> **Note:** Team mode patching is legacy (cc-mirror 1.6.3 only). Current builds do not patch Claude Code. +> **Note:** Team mode patching is legacy (claude-sneakpeek 1.6.3 only). Current builds do not patch Claude Code. --- @@ -15,7 +15,7 @@ This document explains how cc-mirror works under the hood. │ ┌─────────────────┐ ┌──────────────────┐ ┌─────────────────────────┐ │ │ │ │ │ │ │ │ │ │ │ CLI / TUI │───▶│ Core Engine │───▶│ Variant Directory │ │ -│ │ │ │ │ │ ~/.cc-mirror// │ │ +│ │ │ │ │ │ ~/.claude-sneakpeek// │ │ │ └─────────────────┘ └──────────────────┘ └─────────────────────────┘ │ │ │ │ │ │ │ │ │ ▼ │ @@ -37,7 +37,7 @@ This document explains how cc-mirror works under the hood. └───────────────────────────────────────────────────────────────────────────────┘ ``` -Default `` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on Windows. +Default `` is `~/.local/bin` on macOS/Linux and `~/.claude-sneakpeek/bin` on Windows. --- @@ -88,7 +88,7 @@ src/ ``` ┌─────────────────────────────────────────────────────────────────────────────┐ │ │ -│ npx cc-mirror create │ +│ npx claude-sneakpeek create │ │ │ │ │ ▼ │ │ ┌───────────────┐ │ @@ -105,7 +105,7 @@ src/ │ ┌───────────────────────────────────────────────────────────────────────┐ │ │ │ BUILD STEPS │ │ │ │ │ │ -│ │ 1. CreateDirectoryStep Create ~/.cc-mirror// │ │ +│ │ 1. CreateDirectoryStep Create ~/.claude-sneakpeek// │ │ │ │ │ │ │ │ │ 2. InstallNpmStep npm install @anthropic-ai/claude-code │ │ │ │ │ │ │ @@ -129,7 +129,7 @@ src/ ### Update Flow ``` -npx cc-mirror update +npx claude-sneakpeek update │ ▼ ┌───────────────┐ @@ -142,7 +142,7 @@ npx cc-mirror update │ UPDATE STEPS │ │ │ │ 1. InstallNpmUpdateStep Reinstall npm package (unless settingsOnly) │ -│ 2. TeamModeUpdateStep Legacy team mode cleanup (cc-mirror 1.6.3) │ +│ 2. TeamModeUpdateStep Legacy team mode cleanup (claude-sneakpeek 1.6.3) │ │ 3. ModelOverridesStep Update model mappings │ │ 4. TweakccUpdateStep Re-apply theme │ │ 5. WrapperUpdateStep Regenerate wrapper script │ @@ -161,7 +161,7 @@ npx cc-mirror update ``` ┌─────────────────────────────────────────────────────────────────────────────┐ │ │ -│ ~/.cc-mirror// │ +│ ~/.claude-sneakpeek// │ │ │ │ ├── npm/ Claude Code npm installation │ │ │ └── node_modules/ │ @@ -193,7 +193,7 @@ npx cc-mirror update ## Provider System -Providers define how cc-mirror connects to different APIs. +Providers define how claude-sneakpeek connects to different APIs. ```typescript interface ProviderTemplate { @@ -209,7 +209,7 @@ interface ProviderTemplate { credentialOptional?: boolean; // Feature flags - enablesTeamMode?: boolean; // Legacy: auto-enable team mode (cc-mirror 1.6.3) + enablesTeamMode?: boolean; // Legacy: auto-enable team mode (claude-sneakpeek 1.6.3) noPromptPack?: boolean; // Skip prompt pack overlays } ``` @@ -244,21 +244,21 @@ The wrapper script makes variants accessible as commands: # /zai # Show splash art (if TTY and enabled) -if [ -t 1 ] && [ "${CC_MIRROR_SPLASH:-1}" != "0" ]; then +if [ -t 1 ] && [ "${CLAUDE_SNEAKPEEK_SPLASH:-1}" != "0" ]; then # ASCII art here... fi # Set Claude Code config directory -export CLAUDE_CONFIG_DIR="$HOME/.cc-mirror/zai/config" +export CLAUDE_CONFIG_DIR="$HOME/.claude-sneakpeek/zai/config" # Load environment from settings.json # (API keys, base URLs, model mappings) # Run Claude Code -exec "$HOME/.cc-mirror/zai/npm/node_modules/.bin/claude" "$@" +exec "$HOME/.claude-sneakpeek/zai/npm/node_modules/.bin/claude" "$@" ``` -On Windows, the wrapper is `\\zai.cmd` with a sibling `\\zai.mjs` launcher script. Add `%USERPROFILE%\\.cc-mirror\\bin` to `PATH` to run wrappers without a full path. +On Windows, the wrapper is `\\zai.cmd` with a sibling `\\zai.mjs` launcher script. Add `%USERPROFILE%\\.claude-sneakpeek\\bin` to `PATH` to run wrappers without a full path. --- @@ -278,7 +278,7 @@ function sU() { } ``` -### Patch Steps (Legacy: cc-mirror 1.6.3) +### Patch Steps (Legacy: claude-sneakpeek 1.6.3) 1. **Backup**: Copy `cli.js` to `cli.js.backup` 2. **Patch**: Replace `function sU(){return!1}` with `function sU(){return!0}` diff --git a/docs/features/mirror-claude.md b/docs/features/mirror-claude.md index ea34617..93e4980 100644 --- a/docs/features/mirror-claude.md +++ b/docs/features/mirror-claude.md @@ -43,7 +43,7 @@ Mirror Claude is a **pure Claude Code variant** with advanced features enabled. ```bash # Create a Mirror Claude variant -npx cc-mirror create --provider mirror --name mclaude +npx claude-sneakpeek create --provider mirror --name mclaude # Run it - authenticate via normal Claude flow mclaude @@ -159,7 +159,7 @@ mclaude ``` ┌─────────────────────────────────────────────────────────┐ -│ ~/.cc-mirror/mclaude/ │ +│ ~/.claude-sneakpeek/mclaude/ │ │ ├── npm/ Claude Code installation │ │ ├── config/ │ │ │ ├── settings.json Minimal env (splash only) │ @@ -173,18 +173,18 @@ mclaude └─────────────────────────────────────────────────────────┘ ``` -Default `` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on Windows. +Default `` is `~/.local/bin` on macOS/Linux and `~/.claude-sneakpeek/bin` on Windows. -**Windows tip:** add `%USERPROFILE%\\.cc-mirror\\bin` to `PATH` (wrapper is `.cmd` with a sibling `.mjs` launcher). +**Windows tip:** add `%USERPROFILE%\\.claude-sneakpeek\\bin` to `PATH` (wrapper is `.cmd` with a sibling `.mjs` launcher). ### What Mirror Sets ```json { "env": { - "CC_MIRROR_SPLASH": "1", - "CC_MIRROR_PROVIDER_LABEL": "Mirror Claude", - "CC_MIRROR_SPLASH_STYLE": "mirror", + "CLAUDE_SNEAKPEEK_SPLASH": "1", + "CLAUDE_SNEAKPEEK_PROVIDER_LABEL": "Mirror Claude", + "CLAUDE_SNEAKPEEK_SPLASH_STYLE": "mirror", "DISABLE_AUTOUPDATER": "1" } } @@ -204,17 +204,17 @@ Default `` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on W ```bash # Mirror with shell env integration (for Zsh/Bash profile) -npx cc-mirror create --provider mirror --name mclaude --shell-env +npx claude-sneakpeek create --provider mirror --name mclaude --shell-env ``` ### Run Multiple Mirrors ```bash # Work account -npx cc-mirror create --provider mirror --name work-claude +npx claude-sneakpeek create --provider mirror --name work-claude # Personal account -npx cc-mirror create --provider mirror --name personal-claude +npx claude-sneakpeek create --provider mirror --name personal-claude # Run each with different API keys ANTHROPIC_API_KEY="$WORK_KEY" work-claude @@ -225,6 +225,6 @@ ANTHROPIC_API_KEY="$PERSONAL_KEY" personal-claude ## 🔙 Related -- [Team Mode](team-mode.md) - Legacy team mode documentation (cc-mirror 1.6.3) +- [Team Mode](team-mode.md) - Legacy team mode documentation (claude-sneakpeek 1.6.3) - [Brand Themes](brand-themes.md) - Theme customization -- [Architecture Overview](../architecture/overview.md) - How cc-mirror works +- [Architecture Overview](../architecture/overview.md) - How claude-sneakpeek works diff --git a/docs/features/team-mode.md b/docs/features/team-mode.md index 6965c59..974ce79 100644 --- a/docs/features/team-mode.md +++ b/docs/features/team-mode.md @@ -1,6 +1,6 @@ # 🤖 Team Mode (Legacy) -> **Legacy:** Team mode is only supported in the published **cc-mirror 1.6.3** release. +> **Legacy:** Team mode is only supported in the published **claude-sneakpeek 1.6.3** release. > Newer development builds do not patch Claude Code; this doc is historical reference. Team Mode enables multi-agent collaboration in Claude Code through shared task management. Multiple agents can work together on complex projects, each claiming and completing tasks from a shared queue. @@ -48,16 +48,16 @@ Team Mode unlocks these tools in Claude Code: ```bash # Any provider with team mode -npx cc-mirror create --provider zai --name zai-team --enable-team-mode +npx claude-sneakpeek create --provider zai --name zai-team --enable-team-mode # Mirror Claude has team mode by default -npx cc-mirror create --provider mirror --name mclaude +npx claude-sneakpeek create --provider mirror --name mclaude ``` ### Enable on Existing Variants ```bash -npx cc-mirror update myvariant --enable-team-mode +npx claude-sneakpeek update myvariant --enable-team-mode ``` ### Verify Team Mode @@ -90,7 +90,7 @@ function sU() { } ``` -When you use `--enable-team-mode`, cc-mirror patches this function automatically. +When you use `--enable-team-mode`, claude-sneakpeek patches this function automatically. ### Task Storage @@ -98,7 +98,7 @@ Tasks are stored per-variant in isolated directories: ``` ┌─────────────────────────────────────────────────────────┐ -│ ~/.cc-mirror//config/ │ +│ ~/.claude-sneakpeek//config/ │ │ └── tasks/ │ │ └── / │ │ ├── 1.json Task #1 │ @@ -107,7 +107,7 @@ Tasks are stored per-variant in isolated directories: └─────────────────────────────────────────────────────────┘ ``` -Each cc-mirror variant has completely isolated task storage via `CLAUDE_CONFIG_DIR`. +Each claude-sneakpeek variant has completely isolated task storage via `CLAUDE_CONFIG_DIR`. ### Dynamic Team Names (v1.2.0+) @@ -139,7 +139,7 @@ Each team has its own isolated task storage. ## 🎯 Orchestration Skill -When team mode is enabled, cc-mirror automatically installs an **orchestration skill** that teaches Claude how to effectively coordinate work using the team mode tools. +When team mode is enabled, claude-sneakpeek automatically installs an **orchestration skill** that teaches Claude how to effectively coordinate work using the team mode tools. ### The Conductor Identity @@ -213,7 +213,7 @@ Milestone celebrations: ### Skill Location ``` -~/.cc-mirror//config/skills/orchestration/ +~/.claude-sneakpeek//config/skills/orchestration/ ├── SKILL.md # Identity, philosophy, core workflow └── references/ ├── patterns.md # All patterns with visual diagrams @@ -227,7 +227,7 @@ Milestone celebrations: ## 📦 Team Pack -When team mode is enabled, cc-mirror also installs **Team Pack** — enhanced prompt files and toolset configuration. +When team mode is enabled, claude-sneakpeek also installs **Team Pack** — enhanced prompt files and toolset configuration. ### What Team Pack Does @@ -249,9 +249,9 @@ Team mode provides `TaskCreate`, `TaskGet`, `TaskUpdate`, and `TaskList` as the ### Managed vs User Skills -cc-mirror marks its installed skill with a `.cc-mirror-managed` file. If you want to customize the orchestrator: +claude-sneakpeek marks its installed skill with a `.claude-sneakpeek-managed` file. If you want to customize the orchestrator: -1. Delete the `.cc-mirror-managed` marker +1. Delete the `.claude-sneakpeek-managed` marker 2. Edit the skill files as needed 3. Future updates won't overwrite your changes @@ -444,26 +444,26 @@ echo "All agents complete" ## 🛠️ CLI Task Management -cc-mirror provides a CLI for managing team tasks directly from the command line. +claude-sneakpeek provides a CLI for managing team tasks directly from the command line. ### Command Structure ```bash -npx cc-mirror tasks [operation] [id] [options] +npx claude-sneakpeek tasks [operation] [id] [options] ``` ### Operations | Operation | Command | Description | | --------- | ---------------------------------- | ---------------------------------------- | -| List | `npx cc-mirror tasks` | List open tasks (default) | -| Show | `npx cc-mirror tasks show ` | Show detailed task info | -| Create | `npx cc-mirror tasks create` | Create a new task | -| Update | `npx cc-mirror tasks update ` | Update an existing task | -| Delete | `npx cc-mirror tasks delete ` | Permanently delete a task | -| Archive | `npx cc-mirror tasks archive ` | Move task to archive (preserves history) | -| Clean | `npx cc-mirror tasks clean` | Bulk cleanup of tasks | -| Graph | `npx cc-mirror tasks graph` | Visualize task dependencies | +| List | `npx claude-sneakpeek tasks` | List open tasks (default) | +| Show | `npx claude-sneakpeek tasks show ` | Show detailed task info | +| Create | `npx claude-sneakpeek tasks create` | Create a new task | +| Update | `npx claude-sneakpeek tasks update ` | Update an existing task | +| Delete | `npx claude-sneakpeek tasks delete ` | Permanently delete a task | +| Archive | `npx claude-sneakpeek tasks archive ` | Move task to archive (preserves history) | +| Clean | `npx claude-sneakpeek tasks clean` | Bulk cleanup of tasks | +| Graph | `npx claude-sneakpeek tasks graph` | Visualize task dependencies | ### Common Options @@ -480,46 +480,46 @@ npx cc-mirror tasks [operation] [id] [options] ```bash # List open tasks for current project -npx cc-mirror tasks +npx claude-sneakpeek tasks # List all tasks (including resolved) -npx cc-mirror tasks --status all +npx claude-sneakpeek tasks --status all # Show task details -npx cc-mirror tasks show 18 +npx claude-sneakpeek tasks show 18 # Create a new task -npx cc-mirror tasks create --subject "Implement auth" --description "Add JWT tokens" +npx claude-sneakpeek tasks create --subject "Implement auth" --description "Add JWT tokens" # Mark a task as resolved with comment -npx cc-mirror tasks update 5 --status resolved --add-comment "Done" +npx claude-sneakpeek tasks update 5 --status resolved --add-comment "Done" # Delete a task permanently -npx cc-mirror tasks delete 42 --force +npx claude-sneakpeek tasks delete 42 --force # Archive a task (preserves history in archive/ folder) -npx cc-mirror tasks archive 5 +npx claude-sneakpeek tasks archive 5 # Clean up resolved tasks (dry run) -npx cc-mirror tasks clean --resolved --dry-run +npx claude-sneakpeek tasks clean --resolved --dry-run # Clean tasks older than 30 days -npx cc-mirror tasks clean --older-than 30 --force +npx claude-sneakpeek tasks clean --older-than 30 --force # View tasks across all teams in a variant -npx cc-mirror tasks --variant mc --all +npx claude-sneakpeek tasks --variant mc --all # JSON output for scripting -npx cc-mirror tasks --json | jq '.tasks[] | select(.status == "open")' +npx claude-sneakpeek tasks --json | jq '.tasks[] | select(.status == "open")' # Filter to ready tasks only (open + not blocked) -npx cc-mirror tasks --ready --json +npx claude-sneakpeek tasks --ready --json # View task dependency graph -npx cc-mirror tasks graph --variant mc --team my-project +npx claude-sneakpeek tasks graph --variant mc --team my-project # Graph as JSON for programmatic analysis -npx cc-mirror tasks graph --json +npx claude-sneakpeek tasks graph --json ``` ### Enriched JSON Output (v1.6.1+) @@ -602,7 +602,7 @@ The CLI automatically detects: - **Team name**: Based on current git repository folder name (matches wrapper logic) - **Variant**: First variant with tasks, or specify with `--variant` -This means running `npx cc-mirror tasks` in `/Users/you/projects/my-api` will automatically target the `my-api` team. +This means running `npx claude-sneakpeek tasks` in `/Users/you/projects/my-api` will automatically target the `my-api` team. --- @@ -619,13 +619,13 @@ This means running `npx cc-mirror tasks` in `/Users/you/projects/my-api` will au ```bash # List all tasks for a team -ls ~/.cc-mirror//config/tasks// +ls ~/.claude-sneakpeek//config/tasks// # View a specific task -cat ~/.cc-mirror//config/tasks//1.json | jq +cat ~/.claude-sneakpeek//config/tasks//1.json | jq # Check if team mode is enabled (look for patched function) -grep "function sU(){return" ~/.cc-mirror//npm/node_modules/@anthropic-ai/claude-code/cli.js +grep "function sU(){return" ~/.claude-sneakpeek//npm/node_modules/@anthropic-ai/claude-code/cli.js # Should show: function sU(){return!0} ``` @@ -633,7 +633,7 @@ grep "function sU(){return" ~/.cc-mirror//npm/node_modules/@anthropic-a ## ⚠️ Limitations -1. **Task storage is local** - Tasks stored in `~/.cc-mirror//config/tasks/` - not shared across machines +1. **Task storage is local** - Tasks stored in `~/.claude-sneakpeek//config/tasks/` - not shared across machines 2. **Manual coordination** - Workers don't automatically poll for new tasks 3. **Minified function** - The patched function name may change in future Claude Code versions @@ -642,5 +642,5 @@ grep "function sU(){return" ~/.cc-mirror//npm/node_modules/@anthropic-a ## 🔙 Related - [Mirror Claude](mirror-claude.md) - Has team mode enabled by default -- [Architecture Overview](../architecture/overview.md) - How cc-mirror works +- [Architecture Overview](../architecture/overview.md) - How claude-sneakpeek works - [CLI Reference](../reference/cli-reference.md) - `--enable-team-mode` flag diff --git a/docs/research/native-multiagent-gates.md b/docs/research/native-multiagent-gates.md index d7c4794..d98769f 100644 --- a/docs/research/native-multiagent-gates.md +++ b/docs/research/native-multiagent-gates.md @@ -100,16 +100,16 @@ Two execution backends for spawning teammates: | `CLAUDE_CODE_AGENT_NAME` | Human-readable agent name | | `CLAUDE_CODE_PLAN_MODE_REQUIRED` | Require plan approval from leader | -## Implications for cc-mirror +## Implications for claude-sneakpeek -### What cc-mirror Should Do +### What claude-sneakpeek Should Do 1. **Version bump**: Use Claude Code 2.1.17+ to get native features 2. **No patching needed**: Features are built-in, not patched like legacy team mode 3. **Provider configuration**: Optionally set env vars to configure behavior 4. **Documentation**: Help users understand feature availability -### What cc-mirror Should NOT Do +### What claude-sneakpeek Should NOT Do 1. **Don't try to enable statsig flags** - Server-side, can't be overridden 2. **Don't patch cli.js** - Features are native, not patched in @@ -124,7 +124,7 @@ Two execution backends for spawning teammates: ## Patch Implementation -cc-mirror implements swarm mode patching in `src/core/variant-builder/swarm-mode-patch.ts`: +claude-sneakpeek implements swarm mode patching in `src/core/variant-builder/swarm-mode-patch.ts`: ```typescript import { setSwarmModeEnabled } from './swarm-mode-patch.js'; @@ -151,13 +151,13 @@ Patched function: function i8(){return!0} ```bash # Check if swarm gate is present in cli.js (unpatched) -grep -o 'tengu_brass_pebble' ~/.cc-mirror//npm/node_modules/@anthropic-ai/claude-code/cli.js +grep -o 'tengu_brass_pebble' ~/.claude-sneakpeek//npm/node_modules/@anthropic-ai/claude-code/cli.js # Check for TeammateTool -grep -o 'TeammateTool' ~/.cc-mirror//npm/node_modules/@anthropic-ai/claude-code/cli.js +grep -o 'TeammateTool' ~/.claude-sneakpeek//npm/node_modules/@anthropic-ai/claude-code/cli.js # Verify patch was applied (should return empty if patched) -grep 'tengu_brass_pebble' ~/.cc-mirror//npm/node_modules/@anthropic-ai/claude-code/cli.js +grep 'tengu_brass_pebble' ~/.claude-sneakpeek//npm/node_modules/@anthropic-ai/claude-code/cli.js ``` ## See Also diff --git a/package.json b/package.json index ebeaf91..f6afaf2 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,17 @@ { - "name": "cc-mirror", + "name": "claude-sneakpeek", "version": "1.6.6", "type": "module", "description": "Claude Code, Unshackled — Pre-configured variants with multi-agent orchestration, custom providers, and battle-tested enhancements", - "author": "Numman Ali", + "author": "realmikekelly", "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/numman-ali/cc-mirror.git" + "url": "git+https://github.com/mikekelly/claude-sneakpeek.git" }, - "homepage": "https://github.com/numman-ali/cc-mirror#readme", + "homepage": "https://github.com/mikekelly/claude-sneakpeek#readme", "bugs": { - "url": "https://github.com/numman-ali/cc-mirror/issues" + "url": "https://github.com/mikekelly/claude-sneakpeek/issues" }, "keywords": [ "claude", @@ -28,7 +28,7 @@ "llm" ], "bin": { - "cc-mirror": "./dist/cc-mirror.mjs" + "claude-sneakpeek": "./dist/claude-sneakpeek.mjs" }, "files": [ "dist" diff --git a/scripts/bundle.ts b/scripts/bundle.ts index da6da28..98aba7f 100644 --- a/scripts/bundle.ts +++ b/scripts/bundle.ts @@ -23,7 +23,7 @@ const external = [ // Build CLI await build({ entryPoints: [path.join(root, 'src', 'cli', 'index.ts')], - outfile: path.join(distDir, 'cc-mirror.mjs'), + outfile: path.join(distDir, 'claude-sneakpeek.mjs'), bundle: true, platform: 'node', format: 'esm', @@ -45,7 +45,7 @@ await build({ external, }); -fs.chmodSync(path.join(distDir, 'cc-mirror.mjs'), 0o755); +fs.chmodSync(path.join(distDir, 'claude-sneakpeek.mjs'), 0o755); // Copy bundled skills to dist const skillsSrcDir = path.join(root, 'src', 'skills'); @@ -55,4 +55,4 @@ if (fs.existsSync(skillsSrcDir)) { console.log('Copied skills to dist/skills'); } -console.log('Bundled to dist/cc-mirror.mjs and dist/tui.mjs'); +console.log('Bundled to dist/claude-sneakpeek.mjs and dist/tui.mjs'); diff --git a/scripts/enable-team-mode.sh b/scripts/enable-team-mode.sh index 647b647..20416e7 100755 --- a/scripts/enable-team-mode.sh +++ b/scripts/enable-team-mode.sh @@ -1,11 +1,11 @@ #!/bin/bash # enable-team-mode.sh -# Patches a cc-mirror variant to enable team mode features +# Patches a claude-sneakpeek variant to enable team mode features set -e VARIANT_NAME="${1:-team-mode}" -CC_MIRROR_ROOT="$HOME/.cc-mirror" +CC_MIRROR_ROOT="$HOME/.claude-sneakpeek" VARIANT_DIR="$CC_MIRROR_ROOT/$VARIANT_NAME" CLI_PATH="$VARIANT_DIR/npm/node_modules/@anthropic-ai/claude-code/cli.js" SETTINGS_PATH="$VARIANT_DIR/config/settings.json" @@ -16,7 +16,7 @@ GREEN='\033[0;32m' YELLOW='\033[1;33m' NC='\033[0m' # No Color -echo -e "${YELLOW}Team Mode Enabler for cc-mirror${NC}" +echo -e "${YELLOW}Team Mode Enabler for claude-sneakpeek${NC}" echo "==================================" echo "" @@ -120,7 +120,7 @@ echo "Or with custom agent identity:" echo " CLAUDE_CODE_AGENT_ID=worker-1 $VARIANT_NAME" echo "" echo "Task storage location (isolated per variant):" -echo " ~/.cc-mirror/$VARIANT_NAME/config/tasks/$VARIANT_NAME/" +echo " ~/.claude-sneakpeek/$VARIANT_NAME/config/tasks/$VARIANT_NAME/" echo "" echo "To restore original CLI:" echo " cp '$BACKUP_PATH' '$CLI_PATH'" diff --git a/scripts/render-tui-svg.ts b/scripts/render-tui-svg.ts index d983d1b..152a17b 100644 --- a/scripts/render-tui-svg.ts +++ b/scripts/render-tui-svg.ts @@ -22,7 +22,7 @@ const escapeXml = (value: string) => const renderHomeScreen = async () => { const app = render( React.createElement(App, { - initialRootDir: '~/.cc-mirror', + initialRootDir: '~/.claude-sneakpeek', initialBinDir: '~/.local/bin', }) ); @@ -50,7 +50,7 @@ const buildSvg = (lines: string[]) => { .join('\n'); return ` - + ${text} @@ -62,7 +62,7 @@ ${text} const main = async () => { const lines = await renderHomeScreen(); const svg = buildSvg(lines); - const target = path.join(process.cwd(), 'docs', 'cc-mirror-tree.svg'); + const target = path.join(process.cwd(), 'docs', 'claude-sneakpeek-tree.svg'); fs.writeFileSync(target, svg); console.log(`Wrote ${target}`); }; diff --git a/src/cli/commands/create.ts b/src/cli/commands/create.ts index 1e5fc98..9256917 100644 --- a/src/cli/commands/create.ts +++ b/src/cli/commands/create.ts @@ -309,7 +309,7 @@ async function handleNonInteractiveMode(opts: ParsedArgs, params: CreateParams): export async function runCreateCommand({ opts, quickMode }: CreateCommandOptions): Promise { const params = await prepareCreateParams(opts); if (!core.TEAM_MODE_SUPPORTED && (opts['enable-team-mode'] || opts['disable-team-mode'])) { - console.log('Team mode flags are ignored in this release. Use cc-mirror 1.6.3 for team mode support.'); + console.log('Team mode flags are ignored in this release. Use claude-sneakpeek 1.6.3 for team mode support.'); } if (quickMode) { diff --git a/src/cli/commands/tasks.ts b/src/cli/commands/tasks.ts index c37968f..ddfd752 100644 --- a/src/cli/commands/tasks.ts +++ b/src/cli/commands/tasks.ts @@ -2,7 +2,7 @@ * Tasks command - Main router for task operations * * Usage: - * cc-mirror tasks [operation] [id] [options] + * claude-sneakpeek tasks [operation] [id] [options] * * Operations: * list (default) List tasks @@ -43,10 +43,10 @@ function parseIds(value: string | undefined): string[] | undefined { */ function showTasksHelp(): void { console.log(` -npx cc-mirror tasks - Manage legacy team tasks (cc-mirror 1.6.3 only) +npx claude-sneakpeek tasks - Manage legacy team tasks (claude-sneakpeek 1.6.3 only) USAGE: - npx cc-mirror tasks [operation] [id] [options] + npx claude-sneakpeek tasks [operation] [id] [options] OPERATIONS: list List tasks (default if no operation specified) @@ -100,13 +100,13 @@ CLEAN OPTIONS: --force Skip confirmation EXAMPLES: - npx cc-mirror tasks # List open tasks - npx cc-mirror tasks --status all # List all tasks - npx cc-mirror tasks show 5 # Show task #5 - npx cc-mirror tasks create --subject "Fix bug" --description "..." - npx cc-mirror tasks update 5 --status resolved - npx cc-mirror tasks delete 5 --force - npx cc-mirror tasks clean --resolved --dry-run + npx claude-sneakpeek tasks # List open tasks + npx claude-sneakpeek tasks --status all # List all tasks + npx claude-sneakpeek tasks show 5 # Show task #5 + npx claude-sneakpeek tasks create --subject "Fix bug" --description "..." + npx claude-sneakpeek tasks update 5 --status resolved + npx claude-sneakpeek tasks delete 5 --force + npx claude-sneakpeek tasks clean --resolved --dry-run `); } @@ -117,7 +117,9 @@ export async function runTasksCommand({ opts }: TasksCommandOptions): Promise'); + console.error('Error: Task ID required. Usage: npx claude-sneakpeek tasks show '); process.exitCode = 1; return; } @@ -172,7 +174,7 @@ export async function runTasksCommand({ opts }: TasksCommandOptions): Promise'); + console.error('Error: Task ID required. Usage: npx claude-sneakpeek tasks update '); process.exitCode = 1; return; } @@ -198,7 +200,7 @@ export async function runTasksCommand({ opts }: TasksCommandOptions): Promise'); + console.error('Error: Task ID required. Usage: npx claude-sneakpeek tasks delete '); process.exitCode = 1; return; } @@ -270,7 +272,7 @@ export async function runTasksCommand({ opts }: TasksCommandOptions): Promise { console.log(` ╔══════════════════════════════════════════════════════════════════════════╗ -║ CC-MIRROR ║ +║ CLAUDE-SNEAKPEEK ║ ║ Claude Code, Unshackled ║ ╚══════════════════════════════════════════════════════════════════════════╝ @@ -14,13 +14,13 @@ export const printHelp = () => { One command. Instant power-up. FOCUS - CC-MIRROR focuses on provider enablement and stable workflows. - Team mode is only supported in cc-mirror 1.6.3 (published release). + CLAUDE-SNEAKPEEK focuses on provider enablement and stable workflows. + Team mode is only supported in claude-sneakpeek 1.6.3 (published release). QUICK START - npx cc-mirror quick --provider mirror # Fastest path to multi-agent - npx cc-mirror quick --provider zai # Z.ai with GLM models - npx cc-mirror # Interactive TUI + npx claude-sneakpeek quick --provider mirror # Fastest path to multi-agent + npx claude-sneakpeek quick --provider zai # Z.ai with GLM models + npx claude-sneakpeek # Interactive TUI COMMANDS quick [options] Fast setup: provider → ready in 30s @@ -30,7 +30,7 @@ COMMANDS remove Remove a variant doctor Health check all variants tweak Launch tweakcc customization - tasks [operation] Manage legacy team tasks (cc-mirror 1.6.3 only) + tasks [operation] Manage legacy team tasks (claude-sneakpeek 1.6.3 only) OPTIONS (create/quick) --name Variant name (becomes CLI command) @@ -59,13 +59,13 @@ PROVIDERS ccrouter Local LLMs via Claude Code Router EXAMPLES - npx cc-mirror quick --provider mirror --name mclaude - npx cc-mirror quick --provider zai --api-key "$Z_AI_API_KEY" - npx cc-mirror tasks graph - npx cc-mirror doctor + npx claude-sneakpeek quick --provider mirror --name mclaude + npx claude-sneakpeek quick --provider zai --api-key "$Z_AI_API_KEY" + npx claude-sneakpeek tasks graph + npx claude-sneakpeek doctor LEARN MORE - https://github.com/numman-ali/cc-mirror + https://github.com/mikekelly/claude-sneakpeek ──────────────────────────────────────────────────────────────────────────── Created by Numman Ali • https://x.com/nummanali diff --git a/src/cli/utils/buildShareUrl.ts b/src/cli/utils/buildShareUrl.ts index e932583..cd01b5e 100644 --- a/src/cli/utils/buildShareUrl.ts +++ b/src/cli/utils/buildShareUrl.ts @@ -4,10 +4,10 @@ export function buildShareUrl(providerLabel: string, variant: string, mode?: 'minimal' | 'maximal'): string { const lines = [ - `Just set up ${providerLabel} with cc-mirror`, + `Just set up ${providerLabel} with claude-sneakpeek`, mode ? `Prompt pack: ${mode}` : 'Prompt pack: enabled', `CLI: ${variant}`, - 'Get yours: npx cc-mirror', + 'Get yours: npx claude-sneakpeek', '(Attach your TUI screenshot)', ]; const url = new URL('https://x.com/intent/tweet'); diff --git a/src/cli/utils/printSummary.ts b/src/cli/utils/printSummary.ts index 41755dd..edfcb79 100644 --- a/src/cli/utils/printSummary.ts +++ b/src/cli/utils/printSummary.ts @@ -42,7 +42,9 @@ export function printSummary(opts: PrintSummaryOptions): void { console.log(` dev-browser skill: ${meta.skillInstall ? 'on' : 'off'}`); } if (meta.teamModeEnabled !== undefined) { - const teamModeDescription = TEAM_MODE_SUPPORTED ? getTeamModeDescription() : 'unsupported (use cc-mirror 1.6.3)'; + const teamModeDescription = TEAM_MODE_SUPPORTED + ? getTeamModeDescription() + : 'unsupported (use claude-sneakpeek 1.6.3)'; console.log(` Team mode: ${teamModeDescription}`); } if (meta.shellEnv !== undefined && meta.provider === 'zai') { diff --git a/src/core/constants.ts b/src/core/constants.ts index ef1cf77..6ac396a 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -1,7 +1,7 @@ import os from 'node:os'; import path from 'node:path'; -export const DEFAULT_ROOT = path.join(os.homedir(), '.cc-mirror'); +export const DEFAULT_ROOT = path.join(os.homedir(), '.claude-sneakpeek'); export const DEFAULT_BIN_DIR = process.platform === 'win32' ? path.join(DEFAULT_ROOT, 'bin') : path.join(os.homedir(), '.local', 'bin'); export const TWEAKCC_VERSION = '3.2.2'; diff --git a/src/core/errors.ts b/src/core/errors.ts index 9535ceb..9de2048 100644 --- a/src/core/errors.ts +++ b/src/core/errors.ts @@ -1,10 +1,10 @@ const extractErrorHint = (text: string) => { const normalized = text.toLowerCase(); if (normalized.includes('could not extract js from native binary')) { - return 'tweakcc reported a native Claude Code binary. cc-mirror uses npm installs only; update or recreate the variant, or run with --no-tweak.'; + return 'tweakcc reported a native Claude Code binary. claude-sneakpeek uses npm installs only; update or recreate the variant, or run with --no-tweak.'; } if (normalized.includes('node-lief')) { - return 'tweakcc requires node-lief for native Claude Code binaries. cc-mirror uses npm installs only; update or recreate the variant, or run with --no-tweak.'; + return 'tweakcc requires node-lief for native Claude Code binaries. claude-sneakpeek uses npm installs only; update or recreate the variant, or run with --no-tweak.'; } return null; }; diff --git a/src/core/prompt-pack/targets.ts b/src/core/prompt-pack/targets.ts index 77810e7..4298c42 100644 --- a/src/core/prompt-pack/targets.ts +++ b/src/core/prompt-pack/targets.ts @@ -1,8 +1,8 @@ import type { OverlayKey } from './types.js'; export const OVERLAY_MARKERS = { - start: '', - end: '', + start: '', + end: '', }; export type OverlayTarget = { diff --git a/src/core/shell-env.ts b/src/core/shell-env.ts index 8f7778c..590962c 100644 --- a/src/core/shell-env.ts +++ b/src/core/shell-env.ts @@ -16,8 +16,8 @@ export interface ShellEnvResult { } const SETTINGS_FILE = 'settings.json'; -const BLOCK_START = '# cc-mirror: Z.ai env start'; -const BLOCK_END = '# cc-mirror: Z.ai env end'; +const BLOCK_START = '# claude-sneakpeek: Z.ai env start'; +const BLOCK_END = '# claude-sneakpeek: Z.ai env end'; const PLACEHOLDER_KEY = ''; const normalizeApiKey = (value?: string | null): string | null => { diff --git a/src/core/skills.ts b/src/core/skills.ts index df64fa0..2b130ee 100644 --- a/src/core/skills.ts +++ b/src/core/skills.ts @@ -16,7 +16,7 @@ export interface SkillInstallResult { const DEV_BROWSER_REPO = 'https://github.com/SawyerHood/dev-browser.git'; const DEV_BROWSER_ARCHIVE = 'https://github.com/SawyerHood/dev-browser/archive/refs/heads/main.tar.gz'; const SKILL_SUBDIR = path.join('skills', 'dev-browser'); -const MANAGED_MARKER = '.cc-mirror-managed'; +const MANAGED_MARKER = '.claude-sneakpeek-managed'; const ensureDir = (dir: string) => { fs.mkdirSync(dir, { recursive: true }); @@ -83,7 +83,7 @@ export const ensureDevBrowserSkill = (opts: { ensureDir(skillRoot); - const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cc-mirror-skill-')); + const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'claude-sneakpeek-skill-')); try { let fetchResult = cloneRepo(tmpDir); if (!fetchResult.ok) { @@ -104,7 +104,7 @@ export const ensureDevBrowserSkill = (opts: { copyDir(sourceDir, targetDir); fs.writeFileSync( markerPath, - JSON.stringify({ managedBy: 'cc-mirror', updatedAt: new Date().toISOString() }, null, 2) + JSON.stringify({ managedBy: 'claude-sneakpeek', updatedAt: new Date().toISOString() }, null, 2) ); return { status: exists ? 'updated' : 'installed', path: targetDir }; } catch (error) { @@ -116,7 +116,7 @@ export const ensureDevBrowserSkill = (opts: { }; // ============================================================================ -// Orchestration Skill (bundled with cc-mirror) +// Orchestration Skill (bundled with claude-sneakpeek) // ============================================================================ const ORCHESTRATOR_SKILL_NAME = 'orchestration'; @@ -138,7 +138,7 @@ const findBundledSkillDir = (): string | null => { const distPath = path.join(thisDir, 'skills', ORCHESTRATOR_SKILL_NAME); if (fs.existsSync(distPath)) return distPath; - // Try relative to dist/cc-mirror.mjs + // Try relative to dist/claude-sneakpeek.mjs const distPath2 = path.join(thisDir, '..', 'skills', ORCHESTRATOR_SKILL_NAME); if (fs.existsSync(distPath2)) return distPath2; @@ -180,7 +180,7 @@ export const installOrchestratorSkill = (configDir: string): OrchestratorSkillRe copyDir(sourceDir, targetDir); fs.writeFileSync( markerPath, - JSON.stringify({ managedBy: 'cc-mirror', updatedAt: new Date().toISOString() }, null, 2) + JSON.stringify({ managedBy: 'claude-sneakpeek', updatedAt: new Date().toISOString() }, null, 2) ); return { status: 'installed', path: targetDir }; @@ -218,7 +218,7 @@ export const removeOrchestratorSkill = (configDir: string): OrchestratorSkillRes }; // ============================================================================ -// Task Manager Skill (bundled with cc-mirror, for team mode) +// Task Manager Skill (bundled with claude-sneakpeek, for team mode) // ============================================================================ const TASK_MANAGER_SKILL_NAME = 'task-manager'; @@ -238,7 +238,7 @@ const findBundledTaskManagerSkillDir = (): string | null => { const distPath = path.join(thisDir, 'skills', TASK_MANAGER_SKILL_NAME); if (fs.existsSync(distPath)) return distPath; - // Try relative to dist/cc-mirror.mjs + // Try relative to dist/claude-sneakpeek.mjs const distPath2 = path.join(thisDir, '..', 'skills', TASK_MANAGER_SKILL_NAME); if (fs.existsSync(distPath2)) return distPath2; @@ -274,7 +274,7 @@ export const installTaskManagerSkill = (configDir: string): OrchestratorSkillRes copyDir(sourceDir, targetDir); fs.writeFileSync( markerPath, - JSON.stringify({ managedBy: 'cc-mirror', updatedAt: new Date().toISOString() }, null, 2) + JSON.stringify({ managedBy: 'claude-sneakpeek', updatedAt: new Date().toISOString() }, null, 2) ); return { status: 'installed', path: targetDir }; @@ -366,7 +366,7 @@ export const ensureDevBrowserSkillAsync = async (opts: { ensureDir(skillRoot); - const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cc-mirror-skill-')); + const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'claude-sneakpeek-skill-')); try { let fetchResult = await cloneRepoAsync(tmpDir); if (!fetchResult.ok) { @@ -387,7 +387,7 @@ export const ensureDevBrowserSkillAsync = async (opts: { copyDir(sourceDir, targetDir); fs.writeFileSync( markerPath, - JSON.stringify({ managedBy: 'cc-mirror', updatedAt: new Date().toISOString() }, null, 2) + JSON.stringify({ managedBy: 'claude-sneakpeek', updatedAt: new Date().toISOString() }, null, 2) ); return { status: exists ? 'updated' : 'installed', path: targetDir }; } catch (error) { diff --git a/src/core/tasks/resolve.ts b/src/core/tasks/resolve.ts index b0acf0e..10dcca9 100644 --- a/src/core/tasks/resolve.ts +++ b/src/core/tasks/resolve.ts @@ -11,8 +11,8 @@ import { listTeams, getTasksDir } from './store.js'; import type { ResolvedContext, TaskLocation } from './types.js'; /** - * Special variant name for vanilla Claude Code (no cc-mirror variant) - * Maps to ~/.claude/tasks// instead of ~/.cc-mirror/_default/config/tasks// + * Special variant name for vanilla Claude Code (no claude-sneakpeek variant) + * Maps to ~/.claude/tasks// instead of ~/.claude-sneakpeek/_default/config/tasks// */ export const DEFAULT_VARIANT = '_default'; @@ -32,15 +32,15 @@ export interface ResolveOptions { /** * Detect variant from CLAUDE_CONFIG_DIR environment variable - * CLAUDE_CONFIG_DIR format: ~/.cc-mirror//config + * CLAUDE_CONFIG_DIR format: ~/.claude-sneakpeek//config */ export function detectVariantFromEnv(): string | null { const configDir = process.env.CLAUDE_CONFIG_DIR; if (!configDir) return null; - // Extract variant name from path: ~/.cc-mirror//config + // Extract variant name from path: ~/.claude-sneakpeek//config const normalized = configDir.replace(/\\/g, '/'); - const match = normalized.match(/\.cc-mirror\/([^/]+)\/config/); + const match = normalized.match(/\.claude-sneakpeek\/([^/]+)\/config/); return match ? match[1] : null; } @@ -105,7 +105,7 @@ export function resolveTasksDir(rootDir: string, variant: string, team: string): // Vanilla Claude Code: ~/.claude/tasks// return path.join(DEFAULT_CLAUDE_CONFIG_DIR, 'tasks', team); } - // cc-mirror variant: ~/.cc-mirror//config/tasks// + // claude-sneakpeek variant: ~/.claude-sneakpeek//config/tasks// return getTasksDir(rootDir, variant, team); } @@ -140,7 +140,7 @@ export function resolveContext(opts: ResolveOptions): ResolvedContext { // Determine which variants to scan let variants: string[]; if (allVariants) { - // Include all cc-mirror variants that have tasks + // Include all claude-sneakpeek variants that have tasks variants = listVariantsWithTasks(rootDir); // Also include _default if it has tasks const defaultTeams = resolveTeams(rootDir, DEFAULT_VARIANT); diff --git a/src/core/variant-builder/update-steps/TeamModeUpdateStep.ts b/src/core/variant-builder/update-steps/TeamModeUpdateStep.ts index 811e8b2..9c2039d 100644 --- a/src/core/variant-builder/update-steps/TeamModeUpdateStep.ts +++ b/src/core/variant-builder/update-steps/TeamModeUpdateStep.ts @@ -244,7 +244,9 @@ export class TeamModeUpdateStep implements UpdateStep { return; } - state.notes.push('Team mode is not supported in this cc-mirror release; disabling and removing team assets.'); + state.notes.push( + 'Team mode is not supported in this claude-sneakpeek release; disabling and removing team assets.' + ); meta.teamModeEnabled = false; this.removeSkill(ctx); diff --git a/src/core/wrapper.ts b/src/core/wrapper.ts index 734cb5c..92ff9b3 100644 --- a/src/core/wrapper.ts +++ b/src/core/wrapper.ts @@ -167,7 +167,7 @@ const buildWindowsWrapperScript = (opts: { '};', 'loadSettingsEnv();', '', - "if ((process.env.CC_MIRROR_UNSET_AUTH_TOKEN || '0') !== '0') {", + "if ((process.env.CLAUDE_SNEAKPEEK_UNSET_AUTH_TOKEN || '0') !== '0') {", ' delete process.env.ANTHROPIC_AUTH_TOKEN;', '}', '', @@ -193,14 +193,14 @@ const buildWindowsWrapperScript = (opts: { ' }', '}', '', - "const splashEnabled = (process.env.CC_MIRROR_SPLASH || '0') !== '0';", + "const splashEnabled = (process.env.CLAUDE_SNEAKPEEK_SPLASH || '0') !== '0';", "const skipSplash = args.join(' ').includes('--output-format');", 'const shouldSplash = splashEnabled && Boolean(process.stdout.isTTY) && !skipSplash;', `const splashArt = ${splashJson};`, `const knownStyles = new Set(${stylesJson});`, 'if (shouldSplash) {', - " const style = process.env.CC_MIRROR_SPLASH_STYLE || 'default';", - " const label = process.env.CC_MIRROR_PROVIDER_LABEL || 'cc-mirror';", + " const style = process.env.CLAUDE_SNEAKPEEK_SPLASH_STYLE || 'default';", + " const label = process.env.CLAUDE_SNEAKPEEK_PROVIDER_LABEL || 'claude-sneakpeek';", " const resolvedStyle = knownStyles.has(style) ? style : 'default';", ' const art = splashArt[resolvedStyle] || [];', " process.stdout.write('\\n');", @@ -274,8 +274,8 @@ export const writeWrapper = ( const execLine = runtime === 'node' ? `exec node "${binaryPath}" "$@"` : `exec "${binaryPath}" "$@"`; const envLoader = [ 'if command -v node >/dev/null 2>&1; then', - ' __cc_mirror_env_file="$(mktemp)"', - ' node - <<\'NODE\' > "$__cc_mirror_env_file" || true', + ' __claude_sneakpeek_env_file="$(mktemp)"', + ' node - <<\'NODE\' > "$__claude_sneakpeek_env_file" || true', "const fs = require('fs');", "const path = require('path');", 'const dir = process.env.CLAUDE_CONFIG_DIR;', @@ -297,19 +297,19 @@ export const writeWrapper = ( ' // ignore malformed settings', '}', 'NODE', - ' if [[ -s "$__cc_mirror_env_file" ]]; then', + ' if [[ -s "$__claude_sneakpeek_env_file" ]]; then', ' # shellcheck disable=SC1090', - ' source "$__cc_mirror_env_file"', + ' source "$__claude_sneakpeek_env_file"', ' fi', - ' rm -f "$__cc_mirror_env_file" || true', + ' rm -f "$__claude_sneakpeek_env_file" || true', 'fi', ]; const splash = [ - 'if [[ "${CC_MIRROR_SPLASH:-0}" != "0" ]] && [[ -t 1 ]]; then', + 'if [[ "${CLAUDE_SNEAKPEEK_SPLASH:-0}" != "0" ]] && [[ -t 1 ]]; then', ' if [[ "$*" != *"--output-format"* ]]; then', - ' __cc_label="${CC_MIRROR_PROVIDER_LABEL:-cc-mirror}"', - ' __cc_style="${CC_MIRROR_SPLASH_STYLE:-default}"', + ' __cc_label="${CLAUDE_SNEAKPEEK_PROVIDER_LABEL:-claude-sneakpeek}"', + ' __cc_style="${CLAUDE_SNEAKPEEK_SPLASH_STYLE:-default}"', ' __cc_show_label="1"', ' printf "\\n"', ' case "$__cc_style" in', @@ -364,7 +364,7 @@ export const writeWrapper = ( `export CLAUDE_CONFIG_DIR="${configDir}"`, `export TWEAKCC_CONFIG_DIR="${tweakDir}"`, ...envLoader, - 'if [[ "${CC_MIRROR_UNSET_AUTH_TOKEN:-0}" != "0" ]]; then', + 'if [[ "${CLAUDE_SNEAKPEEK_UNSET_AUTH_TOKEN:-0}" != "0" ]]; then', ' unset ANTHROPIC_AUTH_TOKEN', 'fi', '# Dynamic team name: purely directory-based, with optional TEAM modifier', diff --git a/src/tui/app.tsx b/src/tui/app.tsx index ae5a952..7421f9d 100644 --- a/src/tui/app.tsx +++ b/src/tui/app.tsx @@ -452,7 +452,7 @@ export const App: React.FC = ({ // Can't launch tweakcc from within TUI (both are ink apps that conflict) // Show user the command to run instead setDoneLines([`To customize ${selectedVariant.name}, run:`]); - setCompletionSummary([`cc-mirror tweak ${selectedVariant.name}`]); + setCompletionSummary([`claude-sneakpeek tweak ${selectedVariant.name}`]); setCompletionNextSteps(['Exit this TUI first (press ESC or q)', 'Then run the command above in your terminal']); setCompletionHelp(['tweakcc lets you customize themes, overlays, and more']); setScreen('manage-tweak-done'); @@ -530,7 +530,7 @@ export const App: React.FC = ({ if (screen === 'exit') { return ( ); } @@ -1207,7 +1207,7 @@ export const App: React.FC = ({ 'Use "Create" to make a new variant', 'Run "List" to see remaining variants', ]); - setCompletionHelp(['Help: cc-mirror help', 'List: cc-mirror list']); + setCompletionHelp(['Help: claude-sneakpeek help', 'List: claude-sneakpeek list']); setDoneLines([`Removed ${selectedVariant.name}`]); } catch (error) { const message = error instanceof Error ? error.message : String(error); @@ -1279,7 +1279,7 @@ export const App: React.FC = ({ return ( ); }; diff --git a/src/tui/components/ui/Input.tsx b/src/tui/components/ui/Input.tsx index 263785d..3de334e 100644 --- a/src/tui/components/ui/Input.tsx +++ b/src/tui/components/ui/Input.tsx @@ -1,5 +1,5 @@ /** - * Input components for CC-MIRROR TUI + * Input components for CLAUDE-SNEAKPEEK TUI */ import React from 'react'; diff --git a/src/tui/components/ui/Layout.tsx b/src/tui/components/ui/Layout.tsx index 79f7487..7630bd1 100644 --- a/src/tui/components/ui/Layout.tsx +++ b/src/tui/components/ui/Layout.tsx @@ -1,5 +1,5 @@ /** - * Layout components for CC-MIRROR TUI + * Layout components for CLAUDE-SNEAKPEEK TUI * * Uses ink's built-in Box with borderStyle for clean layouts. */ diff --git a/src/tui/components/ui/Logo.tsx b/src/tui/components/ui/Logo.tsx index 2e5a166..600accf 100644 --- a/src/tui/components/ui/Logo.tsx +++ b/src/tui/components/ui/Logo.tsx @@ -1,5 +1,5 @@ /** - * ASCII Art Logo for CC-MIRROR + * ASCII Art Logo for CLAUDE-SNEAKPEEK * * Professional, memorable ASCII art with deep blue and gold theme. */ @@ -9,7 +9,7 @@ import { Box, Text } from 'ink'; import { colors } from './theme.js'; /** - * Main CC-MIRROR ASCII Art Banner + * Main CLAUDE-SNEAKPEEK ASCII Art Banner * Clean, readable design that fits within 68 characters */ export const LogoBanner: React.FC = () => ( diff --git a/src/tui/components/ui/Menu.tsx b/src/tui/components/ui/Menu.tsx index 5593c6f..1119f96 100644 --- a/src/tui/components/ui/Menu.tsx +++ b/src/tui/components/ui/Menu.tsx @@ -1,5 +1,5 @@ /** - * Menu components for CC-MIRROR TUI + * Menu components for CLAUDE-SNEAKPEEK TUI */ import React from 'react'; diff --git a/src/tui/components/ui/Progress.tsx b/src/tui/components/ui/Progress.tsx index 6c060ce..bafb4ad 100644 --- a/src/tui/components/ui/Progress.tsx +++ b/src/tui/components/ui/Progress.tsx @@ -1,5 +1,5 @@ /** - * Progress components for CC-MIRROR TUI + * Progress components for CLAUDE-SNEAKPEEK TUI */ import React, { useState, useEffect } from 'react'; diff --git a/src/tui/components/ui/Typography.tsx b/src/tui/components/ui/Typography.tsx index b10b8f0..057ec74 100644 --- a/src/tui/components/ui/Typography.tsx +++ b/src/tui/components/ui/Typography.tsx @@ -1,5 +1,5 @@ /** - * Typography components for CC-MIRROR TUI + * Typography components for CLAUDE-SNEAKPEEK TUI */ import React from 'react'; diff --git a/src/tui/components/ui/theme.ts b/src/tui/components/ui/theme.ts index 18d3f00..e839542 100644 --- a/src/tui/components/ui/theme.ts +++ b/src/tui/components/ui/theme.ts @@ -1,5 +1,5 @@ /** - * Theme constants for CC-MIRROR TUI + * Theme constants for CLAUDE-SNEAKPEEK TUI * * Professional deep blue and golden yellow color scheme. * Warm, inviting, and memorable. diff --git a/src/tui/components/ui/types.ts b/src/tui/components/ui/types.ts index 311c96e..5d24120 100644 --- a/src/tui/components/ui/types.ts +++ b/src/tui/components/ui/types.ts @@ -1,5 +1,5 @@ /** - * TypeScript types for CC-MIRROR TUI components + * TypeScript types for CLAUDE-SNEAKPEEK TUI components */ import type { ReactNode } from 'react'; diff --git a/src/tui/content/easter-eggs.ts b/src/tui/content/easter-eggs.ts index f623a22..4830ea3 100644 --- a/src/tui/content/easter-eggs.ts +++ b/src/tui/content/easter-eggs.ts @@ -44,16 +44,16 @@ export const LATE_NIGHT_MESSAGE = "Late night coding? Respect. Here's your varia * Creator acknowledgment trigger */ export const CREATOR_TRIGGER = 'numman'; -export const CREATOR_MESSAGE = 'Thanks for using CC-MIRROR!'; +export const CREATOR_MESSAGE = 'Thanks for using CLAUDE-SNEAKPEEK!'; /** * Random fun facts shown occasionally */ export const FUN_FACTS = [ - 'CC-MIRROR was built with Claude Code itself.', + 'CLAUDE-SNEAKPEEK was built with Claude Code itself.', 'The gold theme for Zai was inspired by sunrise.', 'Each variant is completely isolated—they never talk to each other.', - "You can run 'cc-mirror doctor' anytime to check your variants.", + "You can run 'claude-sneakpeek doctor' anytime to check your variants.", 'The haikus are original poetry, not generated.', ]; diff --git a/src/tui/content/education.ts b/src/tui/content/education.ts index 95ee842..2e5fadc 100644 --- a/src/tui/content/education.ts +++ b/src/tui/content/education.ts @@ -2,7 +2,7 @@ * Educational Content * * Conceptual explanations for users who want to understand - * what CC-MIRROR does and how it works under the hood. + * what CLAUDE-SNEAKPEEK does and how it works under the hood. */ import path from 'node:path'; @@ -14,10 +14,10 @@ const WRAPPER_HINT = getWrapperPath(DEFAULT_BIN_DIR, ''); export const EDUCATION = { whatIsCcMirror: { - title: 'What is CC-MIRROR?', + title: 'What is CLAUDE-SNEAKPEEK?', brief: 'Create isolated Claude Code variants with custom providers.', detailed: [ - 'CC-MIRROR creates isolated Claude Code installations that connect to', + 'CLAUDE-SNEAKPEEK creates isolated Claude Code installations that connect to', 'different AI providers. Each variant has its own configuration, theme,', 'and settings—completely independent from your main Claude Code.', '', diff --git a/src/tui/content/providers.ts b/src/tui/content/providers.ts index 62a129d..b76cc85 100644 --- a/src/tui/content/providers.ts +++ b/src/tui/content/providers.ts @@ -126,7 +126,7 @@ export const PROVIDER_EDUCATION: Record = { setupLinks: { subscribe: 'https://console.anthropic.com/settings/plans', apiKey: 'https://console.anthropic.com/settings/keys', - docs: 'https://github.com/numman-ali/cc-mirror/blob/main/docs/features/mirror-claude.md', + docs: 'https://github.com/mikekelly/claude-sneakpeek/blob/main/docs/features/mirror-claude.md', }, setupNote: 'Uses normal Claude authentication. Sign in via OAuth or set ANTHROPIC_API_KEY.', }, diff --git a/src/tui/hooks/useVariantCreate.ts b/src/tui/hooks/useVariantCreate.ts index 1353c66..8948b3a 100644 --- a/src/tui/hooks/useVariantCreate.ts +++ b/src/tui/hooks/useVariantCreate.ts @@ -83,8 +83,8 @@ export function buildCreateSummary(params: { export function buildCreateNextSteps(name: string, rootDir: string): string[] { return [ `Run: ${name}`, - `Update: cc-mirror update ${name}`, - `Tweak: cc-mirror tweak ${name}`, + `Update: claude-sneakpeek update ${name}`, + `Tweak: claude-sneakpeek tweak ${name}`, `Config: ${path.join(rootDir, name, 'config', 'settings.json')}`, ]; } @@ -93,7 +93,7 @@ export function buildCreateNextSteps(name: string, rootDir: string): string[] { * Build the help lines */ export function buildHelpLines(): string[] { - return ['Help: cc-mirror help', 'List: cc-mirror list', 'Doctor: cc-mirror doctor']; + return ['Help: claude-sneakpeek help', 'List: claude-sneakpeek list', 'Doctor: claude-sneakpeek doctor']; } /** diff --git a/src/tui/hooks/useVariantUpdate.ts b/src/tui/hooks/useVariantUpdate.ts index f4deb8c..e588a88 100644 --- a/src/tui/hooks/useVariantUpdate.ts +++ b/src/tui/hooks/useVariantUpdate.ts @@ -63,7 +63,7 @@ export function buildUpdateSummary( export function buildUpdateNextSteps(name: string, rootDir: string): string[] { return [ `Run: ${name}`, - `Tweak: cc-mirror tweak ${name}`, + `Tweak: claude-sneakpeek tweak ${name}`, `Config: ${path.join(rootDir, name, 'config', 'settings.json')}`, ]; } diff --git a/src/tui/screens/AboutScreen.tsx b/src/tui/screens/AboutScreen.tsx index c853be7..10f2b6c 100644 --- a/src/tui/screens/AboutScreen.tsx +++ b/src/tui/screens/AboutScreen.tsx @@ -1,7 +1,7 @@ /** * About Screen * - * Educational screen explaining what CC-MIRROR does and how it works. + * Educational screen explaining what CLAUDE-SNEAKPEEK does and how it works. * Features toggling between poem view and guide view. */ @@ -34,7 +34,7 @@ export const AboutScreen: React.FC = ({ onBack }) => { return ( @@ -44,7 +44,7 @@ export const AboutScreen: React.FC = ({ onBack }) => { ) : ( // Guide view - educational content <> - {/* What is CC-MIRROR */} + {/* What is CLAUDE-SNEAKPEEK */} diff --git a/src/tui/screens/FeedbackScreen.tsx b/src/tui/screens/FeedbackScreen.tsx index 17a686b..31016b2 100644 --- a/src/tui/screens/FeedbackScreen.tsx +++ b/src/tui/screens/FeedbackScreen.tsx @@ -19,10 +19,10 @@ export const FeedbackScreen: React.FC = ({ onBack }) => { }); return ( - + - CC-MIRROR is open source and welcomes contributions, bug reports, and feature requests. + CLAUDE-SNEAKPEEK is open source and welcomes contributions, bug reports, and feature requests. @@ -32,10 +32,10 @@ export const FeedbackScreen: React.FC = ({ onBack }) => { - GitHub: https://github.com/numman-ali/cc-mirror + GitHub: https://github.com/mikekelly/claude-sneakpeek - Issues: https://github.com/numman-ali/cc-mirror/issues + Issues: https://github.com/mikekelly/claude-sneakpeek/issues diff --git a/src/tui/screens/HomeScreen.tsx b/src/tui/screens/HomeScreen.tsx index 10064f1..ba4f67f 100644 --- a/src/tui/screens/HomeScreen.tsx +++ b/src/tui/screens/HomeScreen.tsx @@ -1,5 +1,5 @@ /** - * Home Screen - Main menu for CC-MIRROR + * Home Screen - Main menu for CLAUDE-SNEAKPEEK * * Features: * - Time-based greeting @@ -66,7 +66,7 @@ export const HomeScreen: React.FC = ({ onSelect }) => { { value: 'manage', label: 'Manage Variants', description: 'Update, remove, or inspect' }, { value: 'updateAll', label: 'Update All', description: 'Sync all variants to latest' }, { value: 'doctor', label: 'Diagnostics', description: 'Health check all variants' }, - { value: 'about', label: 'About', description: 'Learn how CC-MIRROR works' }, + { value: 'about', label: 'About', description: 'Learn how CLAUDE-SNEAKPEEK works' }, { value: 'feedback', label: 'Feedback', description: 'Links, issues, and contributions' }, { value: 'exit', label: 'Until next time', icon: 'exit' }, ]; @@ -76,7 +76,7 @@ export const HomeScreen: React.FC = ({ onSelect }) => { {/* ASCII Art Banner - Rainbow if easter egg active */} {showEasterEgg ? ( - {'CC-MIRROR'} + {'CLAUDE-SNEAKPEEK'} {'You found the secret! 🎮'} ) : ( diff --git a/src/tui/screens/ModelConfigScreen.tsx b/src/tui/screens/ModelConfigScreen.tsx index e38bd2f..907bab9 100644 --- a/src/tui/screens/ModelConfigScreen.tsx +++ b/src/tui/screens/ModelConfigScreen.tsx @@ -183,7 +183,9 @@ export const ModelConfigScreen: React.FC = ({ - {'⚠ Not all models work with Claude Code. If issues occur, use "cc-mirror update" to switch models.'} + { + '⚠ Not all models work with Claude Code. If issues occur, use "claude-sneakpeek update" to switch models.' + } diff --git a/src/tui/screens/index.ts b/src/tui/screens/index.ts index b348c88..4a00390 100644 --- a/src/tui/screens/index.ts +++ b/src/tui/screens/index.ts @@ -1,5 +1,5 @@ /** - * CC-MIRROR Screen Components + * CLAUDE-SNEAKPEEK Screen Components * * Clean, professional screens using the UI component library. */ diff --git a/test/claude-config.test.ts b/test/claude-config.test.ts index e3a46ef..3ee076f 100644 --- a/test/claude-config.test.ts +++ b/test/claude-config.test.ts @@ -5,7 +5,7 @@ import os from 'node:os'; import path from 'node:path'; import { ensureOnboardingState } from '../src/core/claude-config.js'; -const makeTempDir = () => fs.mkdtempSync(path.join(os.tmpdir(), 'cc-mirror-claude-config-')); +const makeTempDir = () => fs.mkdtempSync(path.join(os.tmpdir(), 'claude-sneakpeek-claude-config-')); test('ensureOnboardingState writes dark theme + onboarding flag', () => { const tempDir = makeTempDir(); diff --git a/test/cli/help.test.ts b/test/cli/help.test.ts index 786f70e..ccdbae0 100644 --- a/test/cli/help.test.ts +++ b/test/cli/help.test.ts @@ -26,7 +26,7 @@ test('printHelp outputs usage information', () => { const text = output[0]; // Check main commands are documented - assert.ok(text.includes('cc-mirror'), 'Should include tool name'); + assert.ok(text.includes('claude-sneakpeek'), 'Should include tool name'); assert.ok(text.includes('create'), 'Should include create command'); assert.ok(text.includes('quick'), 'Should include quick command'); assert.ok(text.includes('list'), 'Should include list command'); @@ -82,7 +82,7 @@ test('printHelp documents CLI sections', () => { const text = output[0]; // New format has clear sections - assert.ok(text.includes('WHAT IS CC-MIRROR') || text.includes('CC-MIRROR'), 'Should have intro'); + assert.ok(text.includes('WHAT IS CLAUDE-SNEAKPEEK') || text.includes('CLAUDE-SNEAKPEEK'), 'Should have intro'); assert.ok(text.includes('COMMANDS') || text.includes('create'), 'Should have commands section'); assert.ok(text.includes('OPTIONS') || text.includes('--'), 'Should have options section'); }); diff --git a/test/core.test.ts b/test/core.test.ts index 1b43218..6074e74 100644 --- a/test/core.test.ts +++ b/test/core.test.ts @@ -279,7 +279,7 @@ test('settingsOnly update preserves binary and only updates settings', () => { const npmDir = path.join(variantDir, 'npm'); const binaryPath = resolveNpmCliPath(npmDir, core.DEFAULT_NPM_PACKAGE); - const marker = '\n// cc-mirror-settings-only-test\n'; + const marker = '\n// claude-sneakpeek-settings-only-test\n'; fs.appendFileSync(binaryPath, marker); const beforeUpdate = readFile(binaryPath); @@ -296,7 +296,10 @@ test('settingsOnly update preserves binary and only updates settings', () => { const afterUpdate = readFile(binaryPath); assert.equal(afterUpdate, beforeUpdate, 'settingsOnly update should not reinstall npm package'); - assert.ok(afterUpdate.includes('cc-mirror-settings-only-test'), 'settingsOnly update should keep binary intact'); + assert.ok( + afterUpdate.includes('claude-sneakpeek-settings-only-test'), + 'settingsOnly update should keep binary intact' + ); // But settings should be updated with model overrides const configPath = path.join(variantDir, 'config', 'settings.json'); diff --git a/test/core/tasks/resolve.test.ts b/test/core/tasks/resolve.test.ts index 2041ebd..68e1ef0 100644 --- a/test/core/tasks/resolve.test.ts +++ b/test/core/tasks/resolve.test.ts @@ -58,13 +58,16 @@ test('Task Resolve', async (t) => { }); await st.test('extracts variant from CLAUDE_CONFIG_DIR path', () => { - setEnv('CLAUDE_CONFIG_DIR', path.join(path.sep, 'Users', 'test', '.cc-mirror', 'myvariant', 'config')); + setEnv('CLAUDE_CONFIG_DIR', path.join(path.sep, 'Users', 'test', '.claude-sneakpeek', 'myvariant', 'config')); const result = detectVariantFromEnv(); assert.equal(result, 'myvariant'); }); await st.test('handles variant names with hyphens', () => { - setEnv('CLAUDE_CONFIG_DIR', path.join(path.sep, 'home', 'user', '.cc-mirror', 'my-long-variant', 'config')); + setEnv( + 'CLAUDE_CONFIG_DIR', + path.join(path.sep, 'home', 'user', '.claude-sneakpeek', 'my-long-variant', 'config') + ); const result = detectVariantFromEnv(); assert.equal(result, 'my-long-variant'); }); @@ -207,17 +210,17 @@ test('Task Resolve', async (t) => { const tmpDir = makeTempDir(); createdDirs.push(tmpDir); - // Create variant with tasks - use .cc-mirror pattern for env detection - const ccMirrorDir = path.join(tmpDir, '.cc-mirror'); + // Create variant with tasks - use .claude-sneakpeek pattern for env detection + const ccMirrorDir = path.join(tmpDir, '.claude-sneakpeek'); const tasksDir = path.join(ccMirrorDir, 'detected', 'config', 'tasks', 'myteam'); fs.mkdirSync(tasksDir, { recursive: true }); fs.writeFileSync(path.join(ccMirrorDir, 'detected', 'variant.json'), '{"name":"detected"}'); - // Set env var with correct .cc-mirror pattern + // Set env var with correct .claude-sneakpeek pattern setEnv('CLAUDE_CONFIG_DIR', path.join(ccMirrorDir, 'detected', 'config')); const result = resolveContext({ - rootDir: ccMirrorDir, // Use .cc-mirror dir as rootDir + rootDir: ccMirrorDir, // Use .claude-sneakpeek dir as rootDir team: 'myteam', }); @@ -311,14 +314,14 @@ test('Task Resolve', async (t) => { }); await t.test('resolveTasksDir', async (st) => { - await st.test('returns cc-mirror path for regular variant', () => { - const rootDir = path.join(path.sep, 'root', '.cc-mirror'); + await st.test('returns claude-sneakpeek path for regular variant', () => { + const rootDir = path.join(path.sep, 'root', '.claude-sneakpeek'); const result = resolveTasksDir(rootDir, 'myvariant', 'myteam'); assert.equal(result, path.join(rootDir, 'myvariant', 'config', 'tasks', 'myteam')); }); await st.test('returns ~/.claude path for _default variant', () => { - const rootDir = path.join(path.sep, 'root', '.cc-mirror'); + const rootDir = path.join(path.sep, 'root', '.claude-sneakpeek'); const result = resolveTasksDir(rootDir, '_default', 'myteam'); assert.equal(result, path.join(os.homedir(), '.claude', 'tasks', 'myteam')); }); diff --git a/test/core/tasks/store.test.ts b/test/core/tasks/store.test.ts index bc38f71..10c8f65 100644 --- a/test/core/tasks/store.test.ts +++ b/test/core/tasks/store.test.ts @@ -32,7 +32,7 @@ test('Task Store', async (t) => { }); await t.test('getTasksDir returns correct path', () => { - const rootDir = path.join(path.sep, 'home', 'user', '.cc-mirror'); + const rootDir = path.join(path.sep, 'home', 'user', '.claude-sneakpeek'); const result = getTasksDir(rootDir, 'myvariant', 'myteam'); assert.equal(result, path.join(rootDir, 'myvariant', 'config', 'tasks', 'myteam')); }); diff --git a/test/core/wrapper.test.ts b/test/core/wrapper.test.ts index 1ac8ffd..f8e7a21 100644 --- a/test/core/wrapper.test.ts +++ b/test/core/wrapper.test.ts @@ -234,8 +234,8 @@ test('writeWrapper includes env loader', () => { if (isWindows) { assert.ok(content.includes('process.env[key]'), 'Should assign env vars from settings'); } else { - assert.ok(content.includes('__cc_mirror_env_file'), 'Should use temp env file'); - assert.ok(content.includes('source "$__cc_mirror_env_file"'), 'Should source env file'); + assert.ok(content.includes('__claude_sneakpeek_env_file'), 'Should use temp env file'); + assert.ok(content.includes('source "$__claude_sneakpeek_env_file"'), 'Should source env file'); } } finally { cleanup(tempDir); @@ -254,7 +254,7 @@ test('writeWrapper handles unset auth token option', () => { writeWrapper(wrapperPath, configDir, binaryPath); const content = fs.readFileSync(isWindows ? scriptPath : wrapperPath, 'utf8'); - assert.ok(content.includes('CC_MIRROR_UNSET_AUTH_TOKEN'), 'Should check unset auth token option'); + assert.ok(content.includes('CLAUDE_SNEAKPEEK_UNSET_AUTH_TOKEN'), 'Should check unset auth token option'); if (isWindows) { assert.ok(content.includes('delete process.env.ANTHROPIC_AUTH_TOKEN'), 'Should unset auth token when requested'); } else { diff --git a/test/e2e/creation.test.ts b/test/e2e/creation.test.ts index c5f9d58..6d1641e 100644 --- a/test/e2e/creation.test.ts +++ b/test/e2e/creation.test.ts @@ -120,10 +120,10 @@ test('E2E: Create variants for all providers', async (t) => { assert.ok(wrapperContent.includes('\x1b[0m'), `${provider.name} wrapper should contain color reset code`); } - // Verify CC_MIRROR_SPLASH_STYLE env var is read + // Verify CLAUDE_SNEAKPEEK_SPLASH_STYLE env var is read assert.ok( - wrapperContent.includes('CC_MIRROR_SPLASH_STYLE'), - `${provider.name} wrapper should reference CC_MIRROR_SPLASH_STYLE` + wrapperContent.includes('CLAUDE_SNEAKPEEK_SPLASH_STYLE'), + `${provider.name} wrapper should reference CLAUDE_SNEAKPEEK_SPLASH_STYLE` ); } }); diff --git a/test/e2e/team-mode.test.ts b/test/e2e/team-mode.test.ts index 96e6ac1..9b2912e 100644 --- a/test/e2e/team-mode.test.ts +++ b/test/e2e/team-mode.test.ts @@ -60,7 +60,7 @@ testTeamMode('E2E: Team Mode', async (t) => { assert.ok(fs.existsSync(path.join(skillPath, 'SKILL.md')), 'SKILL.md should exist'); // Verify marker file - const markerPath = path.join(skillPath, '.cc-mirror-managed'); + const markerPath = path.join(skillPath, '.claude-sneakpeek-managed'); assert.ok(fs.existsSync(markerPath), 'managed marker should exist'); // Verify variant.json has teamModeEnabled diff --git a/test/helpers/fs-helpers.ts b/test/helpers/fs-helpers.ts index c498557..a19b976 100644 --- a/test/helpers/fs-helpers.ts +++ b/test/helpers/fs-helpers.ts @@ -11,7 +11,7 @@ import path from 'node:path'; /** * Create a temporary directory for testing */ -export const makeTempDir = (prefix = 'cc-mirror-test-') => fs.mkdtempSync(path.join(os.tmpdir(), prefix)); +export const makeTempDir = (prefix = 'claude-sneakpeek-test-') => fs.mkdtempSync(path.join(os.tmpdir(), prefix)); /** * Write an executable file diff --git a/test/helpers/mock-core.ts b/test/helpers/mock-core.ts index 83eca95..912b9fb 100644 --- a/test/helpers/mock-core.ts +++ b/test/helpers/mock-core.ts @@ -22,8 +22,8 @@ export const makeCore = () => { }; const core = { - DEFAULT_ROOT: '/tmp/cc-mirror-test', - DEFAULT_BIN_DIR: '/tmp/cc-mirror-bin', + DEFAULT_ROOT: '/tmp/claude-sneakpeek-test', + DEFAULT_BIN_DIR: '/tmp/claude-sneakpeek-bin', DEFAULT_NPM_PACKAGE: '@anthropic-ai/claude-code', DEFAULT_NPM_VERSION: '2.1.12', TEAM_MODE_SUPPORTED: false, diff --git a/test/prompt-pack.test.ts b/test/prompt-pack.test.ts index e9e7b09..3b7b0a0 100644 --- a/test/prompt-pack.test.ts +++ b/test/prompt-pack.test.ts @@ -8,7 +8,7 @@ import { resolveOverlays } from '../src/core/prompt-pack/overlays.js'; import { sanitizeOverlayMap, sanitizeOverlayText } from '../src/core/prompt-pack/sanitize.js'; import { OVERLAY_MARKERS, PROMPT_PACK_TARGETS } from '../src/core/prompt-pack/targets.js'; -const makeTempDir = () => fs.mkdtempSync(path.join(os.tmpdir(), 'cc-mirror-prompt-pack-')); +const makeTempDir = () => fs.mkdtempSync(path.join(os.tmpdir(), 'claude-sneakpeek-prompt-pack-')); const cleanup = (dir: string) => { fs.rmSync(dir, { recursive: true, force: true }); diff --git a/test/shell-env.test.ts b/test/shell-env.test.ts index f747d80..9cb208c 100644 --- a/test/shell-env.test.ts +++ b/test/shell-env.test.ts @@ -7,7 +7,7 @@ import { ensureZaiShellEnv } from '../src/core/shell-env.js'; delete process.env.Z_AI_API_KEY; -const makeTempDir = () => fs.mkdtempSync(path.join(os.tmpdir(), 'cc-mirror-shell-env-')); +const makeTempDir = () => fs.mkdtempSync(path.join(os.tmpdir(), 'claude-sneakpeek-shell-env-')); const writeSettings = (configDir: string, apiKey: string) => { fs.mkdirSync(configDir, { recursive: true }); @@ -41,7 +41,7 @@ test('ensureZaiShellEnv skips when profile already has a key', () => { assert.ok(content.includes('existing-key')); }); -test('ensureZaiShellEnv writes a cc-mirror block when missing', () => { +test('ensureZaiShellEnv writes a claude-sneakpeek block when missing', () => { const tempDir = makeTempDir(); const configDir = path.join(tempDir, 'config'); const profilePath = path.join(tempDir, '.zshrc'); @@ -50,6 +50,6 @@ test('ensureZaiShellEnv writes a cc-mirror block when missing', () => { const result = ensureZaiShellEnv({ configDir, profilePath }); assert.equal(result.status, 'updated'); const content = fs.readFileSync(profilePath, 'utf8'); - assert.ok(content.includes('cc-mirror: Z.ai env start')); + assert.ok(content.includes('claude-sneakpeek: Z.ai env start')); assert.ok(content.includes('export Z_AI_API_KEY="abc123"')); }); diff --git a/test/skills.test.ts b/test/skills.test.ts index 6eadec3..1449a48 100644 --- a/test/skills.test.ts +++ b/test/skills.test.ts @@ -5,7 +5,7 @@ import os from 'node:os'; import path from 'node:path'; import { installOrchestratorSkill, removeOrchestratorSkill } from '../src/core/skills.js'; -const makeTempDir = () => fs.mkdtempSync(path.join(os.tmpdir(), 'cc-mirror-skills-')); +const makeTempDir = () => fs.mkdtempSync(path.join(os.tmpdir(), 'claude-sneakpeek-skills-')); test('installOrchestratorSkill installs skill to config directory', () => { const tempDir = makeTempDir(); @@ -21,7 +21,7 @@ test('installOrchestratorSkill installs skill to config directory', () => { assert.ok(fs.existsSync(skillDir), 'skill directory should exist'); assert.ok(fs.existsSync(path.join(skillDir, 'SKILL.md')), 'SKILL.md should exist'); assert.ok(fs.existsSync(path.join(skillDir, 'references')), 'references directory should exist'); - assert.ok(fs.existsSync(path.join(skillDir, '.cc-mirror-managed')), 'managed marker should exist'); + assert.ok(fs.existsSync(path.join(skillDir, '.claude-sneakpeek-managed')), 'managed marker should exist'); fs.rmSync(tempDir, { recursive: true, force: true }); }); diff --git a/test/tui/hooks.test.ts b/test/tui/hooks.test.ts index 05590a4..3442619 100644 --- a/test/tui/hooks.test.ts +++ b/test/tui/hooks.test.ts @@ -89,12 +89,12 @@ test('buildCreateSummary shows provider-specific prompt pack routing', () => { }); test('buildCreateNextSteps includes variant name and paths', () => { - const rootDir = path.join(path.sep, 'home', 'user', '.cc-mirror'); + const rootDir = path.join(path.sep, 'home', 'user', '.claude-sneakpeek'); const steps = buildCreateNextSteps('my-variant', rootDir); assert.ok(steps.some((line) => line.includes('Run: my-variant'))); - assert.ok(steps.some((line) => line.includes('Update: cc-mirror update my-variant'))); - assert.ok(steps.some((line) => line.includes('Tweak: cc-mirror tweak my-variant'))); + assert.ok(steps.some((line) => line.includes('Update: claude-sneakpeek update my-variant'))); + assert.ok(steps.some((line) => line.includes('Tweak: claude-sneakpeek tweak my-variant'))); assert.ok(steps.some((line) => line.includes('Config:'))); assert.ok(steps.some((line) => line.includes(rootDir))); }); @@ -103,9 +103,9 @@ test('buildHelpLines returns standard help commands', () => { const help = buildHelpLines(); assert.equal(help.length, 3); - assert.ok(help.some((line) => line.includes('cc-mirror help'))); - assert.ok(help.some((line) => line.includes('cc-mirror list'))); - assert.ok(help.some((line) => line.includes('cc-mirror doctor'))); + assert.ok(help.some((line) => line.includes('claude-sneakpeek help'))); + assert.ok(help.some((line) => line.includes('claude-sneakpeek list'))); + assert.ok(help.some((line) => line.includes('claude-sneakpeek doctor'))); }); // Helper to create a valid VariantMeta for testing @@ -174,10 +174,10 @@ test('buildUpdateSummary omits shell env for non-zai providers', () => { }); test('buildUpdateNextSteps includes variant operations', () => { - const rootDir = path.join(path.sep, 'home', 'user', '.cc-mirror'); + const rootDir = path.join(path.sep, 'home', 'user', '.claude-sneakpeek'); const steps = buildUpdateNextSteps('my-variant', rootDir); assert.ok(steps.some((line) => line.includes('Run: my-variant'))); - assert.ok(steps.some((line) => line.includes('Tweak: cc-mirror tweak my-variant'))); + assert.ok(steps.some((line) => line.includes('Tweak: claude-sneakpeek tweak my-variant'))); assert.ok(steps.some((line) => line.includes('Config:'))); }); From 10d37a4796e61a584033c0068781e9b1d631a8c7 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Fri, 23 Jan 2026 15:58:34 +0000 Subject: [PATCH 03/13] chore: remove lefthook git hooks Co-Authored-By: Claude Opus 4.5 --- lefthook.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 lefthook.yml diff --git a/lefthook.yml b/lefthook.yml deleted file mode 100644 index db42d5b..0000000 --- a/lefthook.yml +++ /dev/null @@ -1,18 +0,0 @@ -pre-commit: - parallel: true - commands: - format: - glob: "*.{ts,tsx,js,jsx,json}" - run: npx prettier --check {staged_files} - lint: - glob: "*.{ts,tsx}" - run: npx eslint {staged_files} - typecheck: - run: npm run typecheck - coverage: - run: npm run test:coverage - -pre-push: - commands: - test: - run: npm run test:coverage From d5a0f3b620f65c9255efa5e2e2ef504aefb71418 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Fri, 23 Jan 2026 17:13:15 +0000 Subject: [PATCH 04/13] docs: reframe as fork focused on feature-flagged capabilities - Add @realmikekelly scope to package name - Simplify README to focus on unlocking unreleased features - Move provider docs to docs/providers.md - Update description Co-Authored-By: Claude Opus 4.5 --- README.md | 134 ++++++++++------------------------------------ docs/providers.md | 65 ++++++++++++++++++++++ package.json | 4 +- 3 files changed, 94 insertions(+), 109 deletions(-) create mode 100644 docs/providers.md diff --git a/README.md b/README.md index 137cb16..a43d494 100644 --- a/README.md +++ b/README.md @@ -1,137 +1,57 @@ # claude-sneakpeek -Isolated Claude Code installations with custom providers and themes. +A fork of [cc-mirror](https://github.com/anthropics/cc-mirror) that unlocks feature-flagged capabilities in Claude Code. ## Install ```bash -npx claude-sneakpeek quick --provider mirror --name claudesp +npx @realmikekelly/claude-sneakpeek quick --provider mirror --name claudesp ``` -That's it. Now run `claudesp` to launch your isolated Claude Code. +Run `claudesp` to launch Claude Code with unreleased features enabled. ---- +## What does it do? -## What is claude-sneakpeek? +claude-sneakpeek installs Claude Code and patches it to enable features that are built but not yet publicly released. Currently this includes: -claude-sneakpeek creates isolated Claude Code installations. Each variant has its own config, sessions, MCP servers, and credentials. Your main Claude Code stays untouched. +- **Swarm mode** — Native multi-agent orchestration with the `TeammateTool` +- **Delegate mode** — Task tool can spawn agents in delegate mode +- **Team coordination** — Teammate mailbox/messaging and task ownership -``` -~/.claude-sneakpeek/ -├── claudesp/ ← Your variant -│ ├── npm/ Claude Code installation -│ ├── config/ API keys, sessions, MCP servers -│ ├── tweakcc/ Theme customization -│ └── variant.json Metadata -├── zai/ ← Another variant (optional) -└── minimax/ ← Another variant (optional) - -Wrapper: ~/.local/bin/claudesp -``` - -The wrapper command (`claudesp`) is added to `~/.local/bin` (macOS/Linux) or `~/.claude-sneakpeek/bin` (Windows). - ---- - -## Providers - -### Mirror (default) - -Uses the standard Anthropic API. Authenticate normally via OAuth or API key. +Your main Claude Code installation stays untouched. Each sneakpeek variant is fully isolated with its own config, sessions, and credentials. -```bash -npx claude-sneakpeek quick --provider mirror --name claudesp -``` - -### Alternative Providers - -Use different model providers: - -| Provider | Models | Auth | Best For | -| -------------- | ---------------------- | ---------- | ------------------------------- | -| **Z.ai** | GLM-4.7, GLM-4.5-Air | API Key | Heavy coding with GLM reasoning | -| **MiniMax** | MiniMax-M2.1 | API Key | Unified model experience | -| **OpenRouter** | 100+ models | Auth Token | Model flexibility, pay-per-use | -| **CCRouter** | Ollama, DeepSeek, etc. | Optional | Local-first development | +## Commands ```bash -# Z.ai (GLM Coding Plan) -npx claude-sneakpeek quick --provider zai --api-key "$Z_AI_API_KEY" - -# MiniMax (MiniMax-M2.1) -npx claude-sneakpeek quick --provider minimax --api-key "$MINIMAX_API_KEY" +npx @realmikekelly/claude-sneakpeek quick --provider mirror --name claudesp # Install +npx @realmikekelly/claude-sneakpeek update claudesp # Update to latest +npx @realmikekelly/claude-sneakpeek remove claudesp # Uninstall -# OpenRouter (100+ models) -npx claude-sneakpeek quick --provider openrouter --api-key "$OPENROUTER_API_KEY" \ - --model-sonnet "anthropic/claude-sonnet-4-20250514" - -# Claude Code Router (local LLMs) -npx claude-sneakpeek quick --provider ccrouter +claudesp # Run it ``` ---- - -## Commands +## How it works -```bash -npx claude-sneakpeek # Interactive TUI -npx claude-sneakpeek quick [options] # Fast setup -npx claude-sneakpeek list # List variants -npx claude-sneakpeek update [name] # Update variant(s) -npx claude-sneakpeek remove # Delete a variant -npx claude-sneakpeek doctor # Health check - -# Run your variant -claudesp ``` +~/.claude-sneakpeek/ +└── claudesp/ + ├── npm/ Claude Code installation (patched) + ├── config/ API keys, sessions, MCP servers + └── variant.json Metadata ---- - -## CLI Options - +~/.local/bin/claudesp Wrapper script ``` ---provider mirror | zai | minimax | openrouter | ccrouter | custom ---name Variant name (becomes the CLI command) ---api-key Provider API key ---base-url Custom API endpoint ---model-sonnet Map to sonnet model ---model-opus Map to opus model ---model-haiku Map to haiku model ---brand Theme: auto | zai | minimax | openrouter | ccrouter | mirror ---no-tweak Skip tweakcc theme ---no-prompt-pack Skip provider prompt pack ---verbose Show full tweakcc output during update -``` - ---- - -## Brand Themes - -Each provider includes a custom color theme via [tweakcc](https://github.com/Piebald-AI/tweakcc): - -| Brand | Style | -| -------------- | -------------------------------- | -| **mirror** | Silver/chrome with electric blue | -| **zai** | Dark carbon with gold accents | -| **minimax** | Coral/red/orange spectrum | -| **openrouter** | Teal/cyan gradient | -| **ccrouter** | Sky blue accents | - ---- - -## Documentation -- [Mirror Claude](docs/features/mirror-claude.md) — Using the mirror provider -- [Architecture](docs/architecture/overview.md) — How it works +The wrapper is added to `~/.local/bin` (macOS/Linux) or `~/.claude-sneakpeek/bin` (Windows). ---- +## Alternative providers -## Related Projects +claude-sneakpeek also supports alternative API providers (Z.ai, MiniMax, OpenRouter, etc.) inherited from cc-mirror. See [providers.md](docs/providers.md) for details. -- [tweakcc](https://github.com/Piebald-AI/tweakcc) — Theme and customize Claude Code -- [Claude Code Router](https://github.com/musistudio/claude-code-router) — Route Claude Code to any LLM +## Related ---- +- [cc-mirror](https://github.com/anthropics/cc-mirror) — The upstream project +- [tweakcc](https://github.com/Piebald-AI/tweakcc) — Theme customization for Claude Code ## License diff --git a/docs/providers.md b/docs/providers.md new file mode 100644 index 0000000..ae5e12e --- /dev/null +++ b/docs/providers.md @@ -0,0 +1,65 @@ +# Alternative Providers + +claude-sneakpeek supports multiple API providers inherited from cc-mirror. + +## Mirror (default) + +Uses the standard Anthropic API. Authenticate normally via OAuth or API key. + +```bash +npx @realmikekelly/claude-sneakpeek quick --provider mirror --name claudesp +``` + +## Provider Options + +| Provider | Models | Auth | Best For | +| -------------- | ---------------------- | ---------- | ------------------------------- | +| **mirror** | Claude (Anthropic) | OAuth/Key | Standard Claude Code experience | +| **Z.ai** | GLM-4.7, GLM-4.5-Air | API Key | Heavy coding with GLM reasoning | +| **MiniMax** | MiniMax-M2.1 | API Key | Unified model experience | +| **OpenRouter** | 100+ models | Auth Token | Model flexibility, pay-per-use | +| **CCRouter** | Ollama, DeepSeek, etc. | Optional | Local-first development | + +## Examples + +```bash +# Z.ai (GLM Coding Plan) +npx @realmikekelly/claude-sneakpeek quick --provider zai --api-key "$Z_AI_API_KEY" + +# MiniMax (MiniMax-M2.1) +npx @realmikekelly/claude-sneakpeek quick --provider minimax --api-key "$MINIMAX_API_KEY" + +# OpenRouter (100+ models) +npx @realmikekelly/claude-sneakpeek quick --provider openrouter --api-key "$OPENROUTER_API_KEY" \ + --model-sonnet "anthropic/claude-sonnet-4-20250514" + +# Claude Code Router (local LLMs) +npx @realmikekelly/claude-sneakpeek quick --provider ccrouter +``` + +## CLI Options + +``` +--provider mirror | zai | minimax | openrouter | ccrouter | custom +--name Variant name (becomes the CLI command) +--api-key Provider API key +--base-url Custom API endpoint +--model-sonnet Map to sonnet model +--model-opus Map to opus model +--model-haiku Map to haiku model +--brand Theme: auto | zai | minimax | openrouter | ccrouter | mirror +--no-tweak Skip tweakcc theme +--no-prompt-pack Skip provider prompt pack +``` + +## Brand Themes + +Each provider includes a custom color theme via [tweakcc](https://github.com/Piebald-AI/tweakcc): + +| Brand | Style | +| -------------- | -------------------------------- | +| **mirror** | Silver/chrome with electric blue | +| **zai** | Dark carbon with gold accents | +| **minimax** | Coral/red/orange spectrum | +| **openrouter** | Teal/cyan gradient | +| **ccrouter** | Sky blue accents | diff --git a/package.json b/package.json index f6afaf2..dbd2de6 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "claude-sneakpeek", + "name": "@realmikekelly/claude-sneakpeek", "version": "1.6.6", "type": "module", - "description": "Claude Code, Unshackled — Pre-configured variants with multi-agent orchestration, custom providers, and battle-tested enhancements", + "description": "Unlock feature-flagged capabilities in Claude Code", "author": "realmikekelly", "license": "MIT", "repository": { From 6b844de70d727aa1f3f87e20ddeec63157b8216a Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Fri, 23 Jan 2026 17:17:20 +0000 Subject: [PATCH 05/13] feat: default to mirror provider, simplify quick command - Change default provider from zai to mirror - Skip provider prompt in quick mode - Simplify install command in README (no --provider needed) Co-Authored-By: Claude Opus 4.5 --- README.md | 10 +++++----- src/cli/commands/create.ts | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a43d494..914438e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A fork of [cc-mirror](https://github.com/anthropics/cc-mirror) that unlocks feat ## Install ```bash -npx @realmikekelly/claude-sneakpeek quick --provider mirror --name claudesp +npx @realmikekelly/claude-sneakpeek quick --name claudesp ``` Run `claudesp` to launch Claude Code with unreleased features enabled. @@ -23,11 +23,11 @@ Your main Claude Code installation stays untouched. Each sneakpeek variant is fu ## Commands ```bash -npx @realmikekelly/claude-sneakpeek quick --provider mirror --name claudesp # Install -npx @realmikekelly/claude-sneakpeek update claudesp # Update to latest -npx @realmikekelly/claude-sneakpeek remove claudesp # Uninstall +npx @realmikekelly/claude-sneakpeek quick --name claudesp # Install +npx @realmikekelly/claude-sneakpeek update claudesp # Update to latest +npx @realmikekelly/claude-sneakpeek remove claudesp # Uninstall -claudesp # Run it +claudesp # Run it ``` ## How it works diff --git a/src/cli/commands/create.ts b/src/cli/commands/create.ts index 9256917..e1b5a69 100644 --- a/src/cli/commands/create.ts +++ b/src/cli/commands/create.ts @@ -40,15 +40,15 @@ interface CreateParams { /** * Prepare common parameters for create command */ -async function prepareCreateParams(opts: ParsedArgs): Promise { +async function prepareCreateParams(opts: ParsedArgs, quickMode = false): Promise { let providerKey = opts.provider as string | undefined; - if (!providerKey && !opts.yes) { + if (!providerKey && !opts.yes && !quickMode) { const providers = listProviders() .map((p) => p.key) .join(', '); - providerKey = await prompt(`Provider (${providers})`, 'zai'); + providerKey = await prompt(`Provider (${providers})`, 'mirror'); } - providerKey = providerKey || 'zai'; + providerKey = providerKey || 'mirror'; const provider = getProvider(providerKey); if (!provider) { @@ -307,7 +307,7 @@ async function handleNonInteractiveMode(opts: ParsedArgs, params: CreateParams): * Execute the create command */ export async function runCreateCommand({ opts, quickMode }: CreateCommandOptions): Promise { - const params = await prepareCreateParams(opts); + const params = await prepareCreateParams(opts, quickMode); if (!core.TEAM_MODE_SUPPORTED && (opts['enable-team-mode'] || opts['disable-team-mode'])) { console.log('Team mode flags are ignored in this release. Use claude-sneakpeek 1.6.3 for team mode support.'); } From efc4019796ec718196168b83f869feb6a1b83959 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Fri, 23 Jan 2026 17:27:35 +0000 Subject: [PATCH 06/13] docs: tighten README, add PATH instructions - Align with repo description - Clarify parallel isolated install upfront - Add ~/.local/bin PATH instructions for macOS/Linux - Credit upstream cc-mirror Co-Authored-By: Claude Opus 4.5 --- README.md | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 914438e..5875828 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # claude-sneakpeek -A fork of [cc-mirror](https://github.com/anthropics/cc-mirror) that unlocks feature-flagged capabilities in Claude Code. +Get a parallel build of Claude Code that unlocks feature-flagged capabilities like swarm mode. + +This installs a completely isolated instance of Claude Code—separate config, sessions, MCP servers, and credentials. Your existing Claude Code installation is untouched. ## Install @@ -8,50 +10,48 @@ A fork of [cc-mirror](https://github.com/anthropics/cc-mirror) that unlocks feat npx @realmikekelly/claude-sneakpeek quick --name claudesp ``` -Run `claudesp` to launch Claude Code with unreleased features enabled. +Add `~/.local/bin` to your PATH if not already (macOS/Linux): + +```bash +echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc +``` -## What does it do? +Then run `claudesp` to launch. -claude-sneakpeek installs Claude Code and patches it to enable features that are built but not yet publicly released. Currently this includes: +## What gets unlocked? -- **Swarm mode** — Native multi-agent orchestration with the `TeammateTool` -- **Delegate mode** — Task tool can spawn agents in delegate mode -- **Team coordination** — Teammate mailbox/messaging and task ownership +Features that are built into Claude Code but not yet publicly released: -Your main Claude Code installation stays untouched. Each sneakpeek variant is fully isolated with its own config, sessions, and credentials. +- **Swarm mode** — Native multi-agent orchestration with `TeammateTool` +- **Delegate mode** — Task tool can spawn background agents +- **Team coordination** — Teammate messaging and task ownership ## Commands ```bash npx @realmikekelly/claude-sneakpeek quick --name claudesp # Install -npx @realmikekelly/claude-sneakpeek update claudesp # Update to latest +npx @realmikekelly/claude-sneakpeek update claudesp # Update npx @realmikekelly/claude-sneakpeek remove claudesp # Uninstall - -claudesp # Run it ``` -## How it works +## Where things live ``` -~/.claude-sneakpeek/ -└── claudesp/ - ├── npm/ Claude Code installation (patched) - ├── config/ API keys, sessions, MCP servers - └── variant.json Metadata +~/.claude-sneakpeek/claudesp/ +├── npm/ # Patched Claude Code +├── config/ # Isolated config, sessions, MCP servers +└── variant.json -~/.local/bin/claudesp Wrapper script +~/.local/bin/claudesp # Wrapper script ``` -The wrapper is added to `~/.local/bin` (macOS/Linux) or `~/.claude-sneakpeek/bin` (Windows). - ## Alternative providers -claude-sneakpeek also supports alternative API providers (Z.ai, MiniMax, OpenRouter, etc.) inherited from cc-mirror. See [providers.md](docs/providers.md) for details. +Supports Z.ai, MiniMax, OpenRouter, and local models via cc-mirror. See [docs/providers.md](docs/providers.md). -## Related +## Credits -- [cc-mirror](https://github.com/anthropics/cc-mirror) — The upstream project -- [tweakcc](https://github.com/Piebald-AI/tweakcc) — Theme customization for Claude Code +Fork of [cc-mirror](https://github.com/numman-ali/cc-mirror) by Numman Ali. ## License From a1c5d0b451e4dd5ecfb4748bd594e242db7738aa Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Fri, 23 Jan 2026 19:54:47 +0000 Subject: [PATCH 07/13] 1.6.7 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6adf83e..c0d8cf2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cc-mirror", - "version": "1.6.6", + "version": "1.6.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cc-mirror", - "version": "1.6.6", + "version": "1.6.7", "license": "MIT", "dependencies": { "ink": "^6.6.0", diff --git a/package.json b/package.json index dbd2de6..96d2b5a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@realmikekelly/claude-sneakpeek", - "version": "1.6.6", + "version": "1.6.7", "type": "module", "description": "Unlock feature-flagged capabilities in Claude Code", "author": "realmikekelly", From 1196cf30a5409bc4a4c20b9da81fbc9c4da8c104 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Fri, 23 Jan 2026 19:59:32 +0000 Subject: [PATCH 08/13] fix: remove ./ prefix from bin path --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 96d2b5a..d62489e 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "llm" ], "bin": { - "claude-sneakpeek": "./dist/claude-sneakpeek.mjs" + "claude-sneakpeek": "dist/claude-sneakpeek.mjs" }, "files": [ "dist" From 78403671f44de799203910dbc3bde4acb2fad9c2 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Fri, 23 Jan 2026 19:59:33 +0000 Subject: [PATCH 09/13] 1.6.8 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c0d8cf2..94b41d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cc-mirror", - "version": "1.6.7", + "version": "1.6.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cc-mirror", - "version": "1.6.7", + "version": "1.6.8", "license": "MIT", "dependencies": { "ink": "^6.6.0", diff --git a/package.json b/package.json index d62489e..ce6be51 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@realmikekelly/claude-sneakpeek", - "version": "1.6.7", + "version": "1.6.8", "type": "module", "description": "Unlock feature-flagged capabilities in Claude Code", "author": "realmikekelly", From f4930b37a81869f00f4f7ceca6083ddca928c33e Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Sat, 24 Jan 2026 13:29:42 +0000 Subject: [PATCH 10/13] 1.6.9 Update to Claude Code 2.1.19 Co-Authored-By: Claude Opus 4.5 --- package-lock.json | 4 ++-- package.json | 2 +- src/core/constants.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 94b41d8..f5814cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cc-mirror", - "version": "1.6.8", + "version": "1.6.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cc-mirror", - "version": "1.6.8", + "version": "1.6.9", "license": "MIT", "dependencies": { "ink": "^6.6.0", diff --git a/package.json b/package.json index ce6be51..ae7d842 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@realmikekelly/claude-sneakpeek", - "version": "1.6.8", + "version": "1.6.9", "type": "module", "description": "Unlock feature-flagged capabilities in Claude Code", "author": "realmikekelly", diff --git a/src/core/constants.ts b/src/core/constants.ts index 6ac396a..f642a77 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -6,7 +6,7 @@ export const DEFAULT_BIN_DIR = process.platform === 'win32' ? path.join(DEFAULT_ROOT, 'bin') : path.join(os.homedir(), '.local', 'bin'); export const TWEAKCC_VERSION = '3.2.2'; export const DEFAULT_NPM_PACKAGE = '@anthropic-ai/claude-code'; -export const DEFAULT_NPM_VERSION = '2.1.17'; +export const DEFAULT_NPM_VERSION = '2.1.19'; // Native multi-agent features (swarms, teammates) are available in Claude Code 2.1.16+ // These are gated by statsig flag 'tengu_brass_pebble' and can be overridden with From c310f8bbc71ee950f792594750048fa3eb918d25 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Sat, 24 Jan 2026 14:38:54 +0000 Subject: [PATCH 11/13] add a link to the demo vid --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5875828..9945216 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Get a parallel build of Claude Code that unlocks feature-flagged capabilities like swarm mode. +Demo video of swarm mode in action: https://x.com/NicerInPerson/status/2014989679796347375 + This installs a completely isolated instance of Claude Code—separate config, sessions, MCP servers, and credentials. Your existing Claude Code installation is untouched. ## Install From 27ee1165f21f6073d02c16935f0356c14648347b Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Wed, 28 Jan 2026 10:54:02 +0000 Subject: [PATCH 12/13] bump claude code to 2.1.22 Co-Authored-By: Claude Opus 4.5 --- src/core/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/constants.ts b/src/core/constants.ts index f642a77..e310f49 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -6,7 +6,7 @@ export const DEFAULT_BIN_DIR = process.platform === 'win32' ? path.join(DEFAULT_ROOT, 'bin') : path.join(os.homedir(), '.local', 'bin'); export const TWEAKCC_VERSION = '3.2.2'; export const DEFAULT_NPM_PACKAGE = '@anthropic-ai/claude-code'; -export const DEFAULT_NPM_VERSION = '2.1.19'; +export const DEFAULT_NPM_VERSION = '2.1.22'; // Native multi-agent features (swarms, teammates) are available in Claude Code 2.1.16+ // These are gated by statsig flag 'tengu_brass_pebble' and can be overridden with From c1c57b1fb8c708ec4fb19cdf15ed749ca7803fb6 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Wed, 28 Jan 2026 10:54:07 +0000 Subject: [PATCH 13/13] 1.6.10 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f5814cb..d4c815d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cc-mirror", - "version": "1.6.9", + "version": "1.6.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cc-mirror", - "version": "1.6.9", + "version": "1.6.10", "license": "MIT", "dependencies": { "ink": "^6.6.0", diff --git a/package.json b/package.json index ae7d842..837ab99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@realmikekelly/claude-sneakpeek", - "version": "1.6.9", + "version": "1.6.10", "type": "module", "description": "Unlock feature-flagged capabilities in Claude Code", "author": "realmikekelly",