scripts/test-auth.ts
- Entity ID:
ent-20260420-b01a00000017 - Type:
file - Scope:
shared - Status:
active - Aliases: auth smoke test, api key verifier
Description
Minimal Bun-runnable verification script that instantiates the Anthropic SDK with the configured ANTHROPIC_API_KEY and sends a tiny messages.create() call (50 tokens, 'Say hello and nothing else'). Prints a success marker on 2xx or a clear error and exit-1 on failure. Pattern for isolating auth config errors from the rest of the CLI during rebuild.
Key claims
- Test scripts pattern: preload shims then dynamic-import the subsystem
Relations
- scripts/test-auth.ts --[verifies]--> Auth Backend Selection Matrix