Skip to content

CLI — 設定

version

概要: ai-i18n-tools version

印出 CLI 版本與建置時間戳記(與根程式上的 -V / --version 資訊相同)。


init

概要: ai-i18n-tools init [-t <template>] [-o <path>] [-P <provider>] [--with-translate-ignore]

撰寫一個入門設定檔(包含 provider / providersconcurrencybatchConcurrencybatchSizemaxBatchCharsdocs[].addFrontmatter)。呼叫 LLM 的翻譯指令需要在環境變數或 .env 中提供目前供應商的 API 金鑰(Ollama 除外)——請參閱供應商與 API 金鑰

主要選項: -t / --template, -o / --output, -P / --provider, --with-translate-ignore

-P / --provider 選取要搭建的 內建預設組openrouter 表示省略時)。必須為以下其中之一:openrouteropenaianthropicgeminideepseekcerebrasgroqmistralxainvidiaalibabaapifunollama

範本(-t):

建構內容
ui-markdownMarkdown UI 字串工作流程
ui-docusaurusDocusaurus UI + 文件
ui-starlightStarlight 文件
ui-vitepressVitePress 文件(docsOutput.style: "vitepress")加上主題字串的 vitepressThemeCatalog
ui-nextraNextra 文件(docsOutput.style: "nextra")加上主題字典的 nextraDictionaryPath(側邊欄 _meta.ts 會自動收集)
ui-fumadocsFumadocs 文件(docsOutput.style: "fumadocs")加上 UI 覆寫的 fumadocsUiCatalog(側邊欄 meta.json 會自動收集)
ui-astro-websiteAstro 網站 UI 字串
ui-json-bundlesJSON(僅 json[]

--with-translate-ignore 建立初始 .translate-ignore

以 MIT 授權發布。