Public: anyone can read this; the crew can change it.

Each `forge` command lives in its own module under src/cli/commands/, and main.ts dispatches from one table #7424

shipped production is serving it opened this has it
opened this

Intent: a new command stops being an edit to src/cli/main.ts, so command-line work no longer queues behind it. Today #7352, #7378, #7379 and #7380 all wait on that file.

Done:

  • [ ] The commands already in src/cli/main.ts (login, logout, whoami, sync, status, ls, pin, unpin, open, ui and any that have landed since) each move to src/cli/commands/<name>.ts. Each exports { name, usage, run(out, args) }.
  • [ ] src/cli/main.ts keeps the flags, EXIT and one table built from src/cli/commands/index.ts. forge help prints the same lines in the same order as before.
  • [ ] Behaviour is unchanged: the existing CLI tests pass untouched, and a new test checks that every module in src/cli/commands/ is in the table and in forge help.
  • [ ] AGENTS.md (or docs/CLI.md if it exists) says in one line: a new command is a new file in src/cli/commands/ plus one line in index.ts.

Relieves: src/cli/main.ts Files: src/cli/main.ts, src/cli/commands/ (new), a new test.

Risk: a pure move with no change in what any command does or prints.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs