While dogfooding the CLI (1.5.0, agent-driven) against a second Clerk platform environment, we hit a wall on auth: CLERK_PLATFORM_API_URL cleanly redirects requests, but the credential store only holds one OAuth token and clerk auth login has no notion of which host a token belongs to. Logging into the alternate environment would clobber the production login, so the only safe path is minting a platform API key for the second environment and threading CLERK_PLATFORM_API_KEY through every call.
That workaround is fine for CI but makes non-production work second-class for interactive use. A per-host credential store (key tokens by platform API URL) or an explicit --profile on auth login/api/config would make switching environments first-class. Bonus: clerk doctor could report which environment the stored token belongs to.
While dogfooding the CLI (1.5.0, agent-driven) against a second Clerk platform environment, we hit a wall on auth:
CLERK_PLATFORM_API_URLcleanly redirects requests, but the credential store only holds one OAuth token andclerk auth loginhas no notion of which host a token belongs to. Logging into the alternate environment would clobber the production login, so the only safe path is minting a platform API key for the second environment and threadingCLERK_PLATFORM_API_KEYthrough every call.That workaround is fine for CI but makes non-production work second-class for interactive use. A per-host credential store (key tokens by platform API URL) or an explicit
--profileonauth login/api/configwould make switching environments first-class. Bonus:clerk doctorcould report which environment the stored token belongs to.