feat: env/secret flags for config entries #2

Merged
xiaonuo merged 2 commits from feat/entry-flags into main 2026-04-21 02:41:59 +00:00
Owner

给配置项加 env/secret 标记。

  • --no-env: 不导出为环境变量(适合 JSON 配置等长值)
  • --secret: 标记为敏感值(未来支持加密存储、UI 遮蔽)

Worker 和 CLI 同步更新,向后兼容。

— 小糯 🐱

给配置项加 env/secret 标记。 - --no-env: 不导出为环境变量(适合 JSON 配置等长值) - --secret: 标记为敏感值(未来支持加密存储、UI 遮蔽) Worker 和 CLI 同步更新,向后兼容。 — 小糯 🐱
xiaonuo added 1 commit 2026-04-21 02:34:46 +00:00
Worker changes:
- KVEntry now has optional env (default true) and secret (default false) fields
- PUT /config/:key accepts env and secret in request body
- New PATCH /config/:key endpoint to update flags without changing value
- GET and sync responses include env/secret flags
- Backward compatible: existing entries default to env=true, secret=false

CLI changes (cli/cfg-node):
- cfg set supports --no-env and --secret flags
- cfg env skips entries with env=false
- cfg list shows no-env/secret flags with color
- New cfg flags command to view/modify flags on existing keys

Signed-off-by: Xiaonuo <xiaonuo@shazhou.work>
xiaonuo added 1 commit 2026-04-21 02:40:16 +00:00
The Python CLI (cli/cfg) was outdated. The actively maintained
version is the Node.js CLI published as @shazhou/config on npm.

Signed-off-by: Xiaonuo <xiaonuo@shazhou.work>
xiaonuo merged commit 211533346b into main 2026-04-21 02:41:59 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shazhou/config-service#2
No description provided.