he config¶
Manage Hyper-Extract configuration for LLM and embedder settings.
Synopsis¶
Commands¶
| Command | Description |
|---|---|
init |
Initialize configuration (uses provider preset to auto-fill model and URL) |
show |
Display current configuration |
llm |
Configure LLM settings |
embedder |
Configure embedder settings |
he config init¶
Initialize configuration. This is the lazy one-step setup — if you pass -p and -k, it skips all prompts and uses built-in presets:
- OpenAI preset:
gpt-4o-mini+text-embedding-3-small - Bailian preset:
qwen3.6-plus+text-embedding-v4
Options¶
| Option | Short | Description |
|---|---|---|
--provider |
-p |
Provider preset (openai / bailian / vllm) |
--api-key |
-k |
API key for both LLM and embedder |
--base-url |
-u |
Custom API base URL (optional) |
Examples¶
Lazy one-step setup (recommended)¶
# OpenAI
he config init -p openai -k sk-your-api-key-here
# Bailian (Alibaba Cloud)
he config init -p bailian -k sk-your-api-key-here
This saves the preset's default model and API URL automatically.
With custom base URL¶
Interactive setup¶
he config show¶
Display current configuration.
Output:
┌──────────────────────────────────────────────────────────────────┐
│ Hyper-Extract Configuration │
├──────────┬──────────┬─────────────────────┬──────────┬───────────┤
│ Service │ Provider │ Model │ API Key │ Base URL │
├──────────┼──────────┼─────────────────────┼──────────┼───────────┤
│ LLM │ bailian │ qwen3.6-plus │ sk-xx... │ dashsc... │
│ Embedder │ bailian │ text-embedding-v4 │ sk-xx... │ dashsc... │
└──────────┴──────────┴─────────────────────┴──────────┴───────────┘
he config llm¶
Configure LLM settings individually.
Options¶
| Option | Short | Description |
|---|---|---|
--api-key |
-k |
LLM API key |
--model |
-m |
LLM model name |
--base-url |
-u |
Custom API base URL |
--show |
— | Show current LLM configuration |
--unset |
— | Clear LLM configuration |
Examples¶
# View LLM config
he config llm --show
# Update LLM model (OpenAI)
he config llm -p openai --model gpt-4o
# Update LLM model (Bailian)
he config llm -p bailian --model qwen-plus
# Configure local vLLM
he config llm -p vllm \
--api-key dummy \
--base-url http://localhost:8000/v1 \
--model Qwen/Qwen3.5-9B
# Reset LLM config
he config llm --unset
he config embedder¶
Configure embedder settings individually.
Options¶
| Option | Short | Description |
|---|---|---|
--api-key |
-k |
Embedder API key |
--model |
-m |
Embedder model name |
--base-url |
-u |
Custom API base URL |
--show |
— | Show current embedder configuration |
--unset |
— | Clear embedder configuration |
Examples¶
# View embedder config
he config embedder --show
# Use a larger OpenAI embedding model
he config embedder -p openai --model text-embedding-3-large
# Configure local vLLM embedder
he config embedder -p vllm \
--api-key dummy \
--base-url http://localhost:8001/v1 \
--model BAAI/bge-m3
# Reset embedder config
he config embedder --unset
Configuration File¶
Configuration is stored at:
- Linux/macOS:
~/.he/config.toml - Windows:
%USERPROFILE%\.he\config.toml
Examples¶
Environment Variables¶
| Variable | Description |
|---|---|
OPENAI_API_KEY |
API key fallback for LLM and embedder |
OPENAI_BASE_URL |
Custom API base URL fallback |
Priority (highest first): command-line flags → environment variables → config file → defaults.
Troubleshooting¶
"API key not found"¶
Or:
"Configuration file not found"¶
See Also¶
- Configuration Reference — Detailed configuration options
- Installation Guide — Initial setup