配置文件
flu-cli 的配置文件说明。
配置文件位置
~/.flu-cli/config.json配置格式
json
{
"authorName": "Your Name",
"defaultTemplate": {
"type": "builtin",
"idOrName": "modular"
},
"customTemplates": [
{
"id": "custom-1",
"name": "My Template",
"type": "git",
"repo": "https://github.com/yourorg/template.git",
"branch": "main",
"lastUsedAt": 1699999999999
}
]
}配置项说明
authorName
作者名称,用于生成代码时的占位符替换。
defaultTemplate
默认模板配置:
type:builtin或customidOrName: 模板 ID 或名称
customTemplates
自定义模板列表:
id: 唯一标识name: 显示名称type:local或gitrepo: Git 仓库地址(Git 类型)branch: 分支名称(Git 类型)path: 本地路径(本地类型)lastUsedAt: 最后使用时间
手动编辑
bash
# macOS/Linux
nano ~/.flu-cli/config.json
# Windows
notepad %USERPROFILE%\.flu-cli\config.json重置配置
bash
rm ~/.flu-cli/config.json