Skip to main content
← Back to list
01Issue
FeatureClosedSwamp CLI
AssigneesNone

Relationships

#1537 Make --server a global CLI option

Opened by stack72 · 8/5/2026

Problem

--server and --token are currently added per-command via withRemoteOptions() — 70+ commands wrap their Command() with it. As we move toward having everything available on a central server, this per-command opt-in becomes maintenance overhead. Every new command needs to remember to add it.

Proposed Solution

  1. Add --server and --token as .globalOption() on the root command in src/cli/mod.ts
  2. Rename auth login --server to --registry (it uses --server with a different semantic — registry URL, not serve URL)
  3. Remove withRemoteOptions() wrapping from all 70+ commands
  4. Remove inline --server/--token definitions from model_method_run.ts, workflow_run.ts, auth_server_login.ts, access_can_i.ts, serve reload
  5. Add to GlobalOptions interface in context.ts and GLOBAL_OPTIONS set in telemetry_integration.ts

Considerations

  • auth login --server--registry is a breaking change; may need a deprecation period
  • auth_server_login.ts uses --server as its core argument — needs careful handling
  • Consider a handler registry pattern to replace the switch statement in connection.ts (currently ~2400 lines)

Context

Filed as a follow-up from #1531 / #2080.


Automoved by swampadmin from https://github.com/swamp-club/swamp/issues/2082

02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

8/5/2026, 9:15:09 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.