Lines 1-26javascript
2 * CLAUDE.md deployment, CLAUDE.local.md generation, and session start.
3 * Mirrors the patterns in dev-tools/worktree-cli/src/operations.ts.
5import { chmodSync, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from 'fs';
6import { basename, join } from 'path';
7import { execSync, spawn, spawnSync } from 'child_process';
8import { homedir } from 'os';
HighChild Process
Package source references child process execution.
dist/lib/claude.jsView on unpkg · L6 9import chalk from 'chalk';
10import { BOOTSTRAP_SETTINGS_JSON } from './templates.js';
11import { removeLock, updateChildPid } from './leader-lock.js';
12// ── Logging helpers ───────────────────────────────────────────────────
13export function logSuccess(msg) {
14 console.log(chalk.green(' ✓ ' + msg));
16export function logWarning(msg) {
17 console.log(chalk.yellow(' ⚠ ' + msg));
19export function logDim(msg) {
20 console.log(chalk.dim(' ' + msg));
22// Base hooks that are deployed to every worktree regardless of project
23const BASE_HOOK_NAMES = ['auto-checkpoint.sh', 'reload-checkpoint.sh'];
24// CI validation hooks — intercept git push and run package validators.
25// Deployed by syncClaudeConfig; also reconciled by deployBaseHooks via the
26// global cache so that worktrees that missed a syncClaudeConfig run still