Skip to content

Bug: squad link and squad init --mode remote are not wired up in CLI entry point #222

Closed

Description

@EmmittJ

Summary

Both squad link and squad init --mode remote return "Unknown command" / are silently ignored, despite being:

  1. Fully implemented in source files
  2. Documented across the repo
  3. Covered by tests

Details

squad link

  • Implementation exists at packages/squad-cli/src/cli/commands/link.ts — exports runLink(projectDir, teamRepoPath)
  • Tests exist at test/cli/remote-mode.test.ts (9 tests passing)
  • Documented in:
    • CHANGELOG.md (lines 10, 32)
    • README.md (line 74)
    • docs/whatsnew.md (line 17)
    • docs/reference/cli.md (line 38)
    • docs/blog/019-shaynes-remote-mode.md (lines 34, 67)
    • docs/get-started/migration.md (line 519)
  • Not wired up in packages/squad-cli/src/cli-entry.ts — there is no if (cmd === 'link') branch, so it falls through to fatal("Unknown command: link")

squad init --mode remote

  • Implementation exists at packages/squad-cli/src/cli/commands/init-remote.ts — exports writeRemoteConfig(projectDir, teamRepoPath)
  • Tests exist at test/cli/remote-mode.test.ts
  • Documented in:
    • CHANGELOG.md (lines 11, 33)
    • README.md (line 68)
    • docs/whatsnew.md (line 18)
    • docs/reference/cli.md (lines 32, 61, 64)
    • docs/blog/019-shaynes-remote-mode.md (lines 36, 67)
    • docs/blog/022-welcome-to-the-new-squad.md (line 185)
    • docs/internal/getting-started-journey.md (line 455)
    • docs/get-started/migration.md (line 519)
  • Not wired up in packages/squad-cli/src/cli-entry.ts — the init handler ignores --mode entirely:
    if (cmd === 'init') {
      const dest = hasGlobal ? resolveGlobalSquadPath() : process.cwd();
      runInit(dest).catch(err => {
        fatal(err.message);
      });
      return;
    }

Root Cause

The command routing in packages/squad-cli/src/cli-entry.ts was never updated to include these two features. The implementations and tests were added (likely from PR #131) but the entry point wasn't wired up.

Expected Fix

Add routing in cli-entry.ts:

  1. A if (cmd === 'link') branch that imports and calls runLink
  2. --mode remote handling inside the existing init branch that imports and calls writeRemoteConfig

Repro

npx squad link ../some-team-repo
# => ✗ Unknown command: link

npx squad init --mode remote ../some-team-repo
# => runs normal init, ignores --mode remote entirely

Activity

  1. added a commit that references this issue on Mar 6, 2026
    ed9c21d
  2. bradygaster commented on Mar 7, 2026

    @bradygaster
    Collaborator

    ✅ Fixed by PR #230 (merged commit 6d0bd56) — link and init commands now properly wired.

    Closed as part of v0.8.21 release wave cleanup.

  3. added a commit that references this issue on Mar 9, 2026
    726d6dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionTest regression or broken featurerelease:nextTargeted for next release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions