W
AI-Wiki

AI · 源文件

入库前的原始上传文件存档。点击左侧文件名可预览文件内容。

CLI Configuration Reference.md2.5 KBit/ai/CLI Configuration Reference.md
---
title: "CLI Configuration Reference"
source_url: "https://yifanfeng97.github.io/Hyper-Extract/latest/cli/configuration/"
source_site: "yifanfeng97.github.io"
clipped_at: "2026-08-10T12:44:42.740745+00:00"
clipper: "aiwiki-url-ingest"
extractor: "readability_rendered"
source_strategy: "normal_web_clip"
source_strategy_label: "普通网页抓取"
---

# CLI Configuration Reference

Configuration guide for Hyper\-Extract CLI, supporting **OpenAI**, **Anthropic**, **DeepSeek**, **Alibaba Cloud Bailian**, and **Local vLLM** deployments.

---

## Quick Start

Choose your deployment method and follow the steps.

---

## Verify Configuration

---

## CLI Command Reference

### Command Overview

### Common Usage Examples

**Interactive initialization (recommended for first\-time users):**

```
he config init
# Follow prompts to select provider, enter model name and API key

```

**View LLM configuration:**

**Clear configuration (reset to defaults):**

```
he config llm --unset
he config embedder --unset

```

---

## Per\-Platform Configuration Examples

---

## Configuration File Details

Running `he config init` automatically creates `~/.he/config.toml`.

### File Location

- **Linux/macOS**: `~/.he/config.toml`
- **Windows**: `%USERPROFILE%\.he\config.toml`

### Configuration Format

### Configuration Options

> See the [Provider System](../../concepts/provider-system/) compatibility table for default models per provider.

---

## Environment Variables

The following environment variables can be used as configuration fallback:

**Priority Note:** Environment variables take precedence over config file, but are overridden by command\-line flags.

**Use Cases:**
\- Temporarily switch API keys
\- Inject secrets in CI/CD environments
\- Avoid hardcoding keys in config files

---

## Troubleshooting

**"API key not found"**

```
he config init -p bailian -k YOUR_API_KEY

```

**"The model does not exist" / 404**

Check that the configured model name is available on the platform. See available models in [Provider System](../../concepts/provider-system/).

**"Failed to connect to API"**

```
# Check configuration
he config llm --show

# Reset base_url
he config llm --base-url https://dashscope.aliyuncs.com/compatible-mode/v1

```

**"Connection refused"**

vLLM service is not running or has stopped:

```
# Check if services are running
curl http://localhost:8000/v1/models
curl http://localhost:8001/v1/models

# Restart services

```

**"CUDA out of memory"**

Lower `--gpu-memory-utilization` or use a smaller model / quantized version.

---

## See Also