Skip to content

Add file-based API key support for server mode#36

Merged
caol64 merged 2 commits into
caol64:mainfrom
walker1211:feat/serve-api-key-file
Jul 12, 2026
Merged

Add file-based API key support for server mode#36
caol64 merged 2 commits into
caol64:mainfrom
walker1211:feat/serve-api-key-file

Conversation

@walker1211

Copy link
Copy Markdown
Contributor

Summary

  • add serve --api-key-file <path> for file-mounted secrets
  • fail closed when the key file is unreadable or empty, and reject using it together with --api-key
  • document the recommended Docker secret mount pattern

Why

Passing an API key with --api-key exposes the secret in the process command line. File-based loading allows Docker and other secret mounts to keep it out of argv while preserving the existing option for compatibility.

Compatibility

Existing --api-key behavior and unauthenticated server mode remain unchanged.

Test plan

  • pnpm test (37/37)
  • pnpm typecheck
  • pnpm build
  • pnpm exec eslint . (no errors; two pre-existing warnings)

@caol64 caol64 merged commit 91d84d5 into caol64:main Jul 12, 2026
@walker1211 walker1211 deleted the feat/serve-api-key-file branch July 13, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants