> ## Documentation Index
> Fetch the complete documentation index at: https://hyperlocalise.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 快速入门

> 在大约 10 分钟内端到端运行 hyperlocalise。

## 目标

创建一个 `i18n.yml`，安全地运行翻译规划，生成输出，并检查状态。

## 1. 初始化配置

```bash theme={null}
hyperlocalise init
```

这会将`i18n.yml`写入你当前的目录。

## 2. 配置提供商凭据

`hyperlocalise` 会自动从当前项目目录中的 `.env` 和 `.env.local` 读取凭据。导出的 shell 变量仍然优先生效。

示例：

<CodeGroup>
  ```bash Export theme={null}
  export OPENAI_API_KEY="your-openai-api-key"
  ```

  ```bash .env.local theme={null}
  OPENAI_API_KEY="your-openai-api-key"
  ```
</CodeGroup>

OpenAI:

<CodeGroup>
  ```bash Export theme={null}
  export OPENAI_API_KEY="your-openai-api-key"
  ```

  ```bash .env.local theme={null}
  OPENAI_API_KEY="your-openai-api-key"
  ```
</CodeGroup>

Azure OpenAI：

<CodeGroup>
  ```bash Export theme={null}
  # Example: https://<resource>.openai.azure.com/openai/v1
  export AZURE_OPENAI_BASE_URL="https://<resource>.openai.azure.com/openai/v1"
  export AZURE_OPENAI_API_KEY="your-azure-openai-api-key"
  ```

  ```bash .env.local theme={null}
  # Example: https://<resource>.openai.azure.com/openai/v1
  AZURE_OPENAI_BASE_URL="https://<resource>.openai.azure.com/openai/v1"
  AZURE_OPENAI_API_KEY="your-azure-openai-api-key"
  ```
</CodeGroup>

Gemini：

<CodeGroup>
  ```bash Export theme={null}
  export GEMINI_BASE_URL="https://generativelanguage.googleapis.com/v1beta/openai"
  export GEMINI_API_KEY="your-gemini-api-key"
  ```

  ```bash .env.local theme={null}
  GEMINI_BASE_URL="https://generativelanguage.googleapis.com/v1beta/openai"
  GEMINI_API_KEY="your-gemini-api-key"
  ```
</CodeGroup>

Anthropic：

<CodeGroup>
  ```bash Export theme={null}
  export ANTHROPIC_BASE_URL="https://api.anthropic.com/v1"
  export ANTHROPIC_API_KEY="your-anthropic-api-key"
  ```

  ```bash .env.local theme={null}
  ANTHROPIC_BASE_URL="https://api.anthropic.com/v1"
  ANTHROPIC_API_KEY="your-anthropic-api-key"
  ```
</CodeGroup>

LM Studio：

<CodeGroup>
  ```bash Export theme={null}
  export LM_STUDIO_BASE_URL="http://127.0.0.1:1234/v1"
  export LM_STUDIO_API_KEY="lm-studio"
  ```

  ```bash .env.local theme={null}
  LM_STUDIO_BASE_URL="http://127.0.0.1:1234/v1"
  LM_STUDIO_API_KEY="lm-studio"
  ```
</CodeGroup>

Ollama:

<CodeGroup>
  ```bash Export theme={null}
  export OLLAMA_BASE_URL="http://127.0.0.1:11434/v1"
  export OLLAMA_API_KEY="ollama"
  ```

  ```bash .env.local theme={null}
  OLLAMA_BASE_URL="http://127.0.0.1:11434/v1"
  OLLAMA_API_KEY="ollama"
  ```
</CodeGroup>

Groq：

<CodeGroup>
  ```bash Export theme={null}
  export GROQ_BASE_URL="https://api.groq.com/openai/v1"
  export GROQ_API_KEY="your-groq-api-key"
  ```

  ```bash .env.local theme={null}
  GROQ_BASE_URL="https://api.groq.com/openai/v1"
  GROQ_API_KEY="your-groq-api-key"
  ```
</CodeGroup>

## 3. 先进行试运行

```bash theme={null}
hyperlocalise run --dry-run
```

检查`planned_total`、`executable_total`以及列出的`tasks`。

## 4. 执行生成

```bash theme={null}
hyperlocalise run
```

这会写入翻译并更新`.hyperlocalise.lock.json`。有关详细信息，请参阅 [锁定文件契约](/reference/lockfile-contract)。

## 5. 审核状态

```bash theme={null}
hyperlocalise status --output csv
```

使用 `needs_review` 行来识别仍需要人工整理的条目。

## 6. 在需要时评估翻译质量

```bash theme={null}
hyperlocalise eval run --eval-set ./eval-set.json --output ./eval-report.json
```

在比较提示词/配置文件/提供方选项时，或在推广大规模翻译更新之前使用此项。

## 下一步

* 在 [i18n config](/configuration/i18n-config) 中调整配置。
* 使用 [sync push](/commands/sync-push) 和 [sync pull](/commands/sync-pull) 与您的 TMS 同步。
* 查看 [稳定性矩阵](/reference/stability-matrix) 中的成熟度预期。
