Repository navigation
v0.4.0 — cce add: create env from templates
cce v0.4.0 — cce add: 从模板创建 env / create an env from a template
新增 cce add 子命令:照一份模板快速生成一套 env —— 固定项(接口地址、模型等)已填好,你只需补上自己的几项(通常是 API Key),即可写入 config.json。
A new cce add subcommand scaffolds an env from a template: the fixed parts (base URL, model, …) are pre-filled, you supply only your own fields (usually an API key), and it writes the env into config.json.
用法 / Usage
cce add # 选模板 → 填字段 → 起名 → 写入 / pick → fill → name → write
cce add deepseek # 直接用某模板 / use a template by name
cce add deepseek ds # 预设 env 名 / preset the env name
cce add --list # 只列出可用模板 / just list available templates
cce add --templates ./team.json # 本次挂载外部模板文件 / mount an external file for this run内容 / What's in it
- 内置模板 / Built-in templates: DeepSeek、Kimi K2.5、GLM,开箱即用 / usable out of the box.
- 模板解析链 / Resolution chain: 内置 →
~/.claude/cce/templates.json→--templates <path>,后者按模板名覆盖前者 / later overrides earlier by name. - 多语言描述 / Multilingual descriptions: 模板的
description与待填项说明可写成{ "en": …, "zh-CN": … },按当前界面语言显示(回退 en → 第一个非空值)/ shown in the current UI language with fallbacks. - 安全 / Safety: env 名按 schema 规则校验;重名时二选一「覆盖 / 重命名」;交互需 TTY,非交互场景给全参数即可 / schema-validated names, overwrite-or-rename on collision, TTY-gated with a non-interactive path.
文档(README / 使用指南 / 设计文档,中英双语)已同步。/ Docs (README / usage / design, both languages) updated.
升级 / Upgrade: cce update 或 / or npm i -g @xiaofuzhou/cce@latest
Full changelog: v0.3.0...v0.4.0