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 / providers、concurrency、uiBatchConcurrency、batchConcurrency、batchSize、maxBatchChars 和 docs[].addFrontmatter)。调用 LLM 的翻译命令需要在环境中提供当前提供商的 API 密钥或 .env(Ollama 除外)——参见提供商与 API 密钥。

主要选项: -t / --template, -o / --output, -P / --provider, --with-translate-ignore

-P / --provider 选择要搭建的内置预设(省略时为 openrouter)。必须是以下之一:openrouter, openai, anthropic, gemini, deepseek, cerebras, groq, mistral, xai, nvidia, alibaba, apifun, ollama。

模板(-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。


help ​

概要: ai-i18n-tools help [command]

显示子命令的帮助信息(输出与 ai-i18n-tools <command> --help 相同)。

基于 MIT 许可证发布。