원클릭으로
cli-wiring
Checklist and patterns for wiring new CLI commands into cli-entry.ts
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Checklist and patterns for wiring new CLI commands into cli-entry.ts
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
{what this skill teaches agents}
{what this skill teaches agents}
{what this skill teaches agents}
{what this skill teaches agents}
Team initialization flow (Phase 1 proposal + Phase 2 creation)
Squad's command catalog and interactive menu. Invoke via /squad (slash command) or natural language ("squad commands", "what can squad do", "show me squad options"). Presents categorized operations (Install & Upgrade, Team Management, Issues & PRs, Plugins & Skills, Model & Cost, Sessions & State) as an interactive picker. Routes to the right squad CLI command or the Squad coordinator agent.
| name | cli-wiring |
| description | Checklist and patterns for wiring new CLI commands into cli-entry.ts |
| domain | cli |
| confidence | high |
| source | extracted |
Bug class: Commands implemented in packages/squad-cli/src/cli/commands/ but never routed in cli-entry.ts.
Create command file in packages/squad-cli/src/cli/commands/<name>.ts
run<Name>(cwd, options) async function (or class with static methods for utility modules)Add routing block in packages/squad-cli/src/cli-entry.ts inside main():
if (cmd === '<name>') {
const { run<Name> } = await import('./cli/commands/<name>.js');
// parse args, call function
await run<Name>(process.cwd(), options);
return;
}
Add help text in the help section of cli-entry.ts (search for Commands:):
console.log(` ${BOLD}<name>${RESET} <description>`);
console.log(` Usage: <name> [flags]`);
Verify both exist — the recurring bug is doing step 1 but missing steps 2-3.
| Type | Example | How to wire |
|---|---|---|
| Standard command | export.ts, build.ts | run*() function, parse flags from args |
| Placeholder command | loop, cast (alias: hire) | Inline in cli-entry.ts, prints pending message |
| Utility/check module | rc-tunnel.ts, copilot-bridge.ts | Wire as diagnostic check (e.g., isDevtunnelAvailable()) |
| Subcommand of another | init-remote.ts | Already used inside parent + standalone alias |
import { BOLD, RESET, DIM, RED, GREEN, YELLOW } from './cli/core/output.js';
Use dynamic await import() for command modules to keep startup fast (lazy loading).