CLI Guide¶
The Hyper-Extract CLI (he) provides a powerful, easy-to-use interface for knowledge extraction directly from your terminal.
Installation¶
Verify installation:
Quick Command Reference¶
| Command | Purpose | Common Flags |
|---|---|---|
he parse |
Extract knowledge from documents | -t template, -o output, -l language, --source attribution |
he show |
Visualize knowledge graph | β |
he export obsidian |
Export to an Obsidian vault | -o output, --name, -f force |
he export graphml |
Export a pairwise graph to GraphML | -o output file |
he export csv |
Export nodes/edges as CSV tables | -o directory, -f force |
he search |
Semantic search in knowledge abstract | -n top-k results, --source, --tag |
he talk |
Chat with knowledge abstract | -i interactive, -q query |
he feed |
Add documents incrementally | --source attribution |
he info |
Show knowledge abstract statistics | β |
he build-index |
Build/rebuild search index | -f force rebuild |
he clean |
Remove a KA's index (or the whole KA) | -a all, -y yes |
he remove |
Delete nodes/edges by key, or soft-remove a single fact | --node, --edge, --edit-node, --fact, --dry-run, --document, --strategy |
he tag |
Manage source tags | --source, --add, --remove, --list |
he list |
List templates and methods | template or method |
he template validate |
Validate a template YAML file | --json, --all |
he config |
Manage configuration | init, show, llm, embedder |
Complete Workflow¶
The typical workflow for extracting and interacting with knowledge:
flowchart TB
subgraph Create ["π Create"]
D[π Document] -->|he parse| KA[(π‘ Knowledge Abstract)]
end
subgraph Enhance ["β¨ Enhance (Optional)"]
KA -->|he feed| KA
KA -->|he build-index| IDX[(π Index)]
end
subgraph Explore ["π Explore"]
KA -->|he show| VIS[ποΈ Visualize]
IDX -->|he search| SRCH[π Search]
IDX -->|he talk| CHAT[π¬ Chat]
end
subgraph Save ["πΎ Save"]
KA -->|he dump| DISK[πΎ Disk]
end
- Create β Extract knowledge from documents (
he parse) - Enhance β Add documents incrementally (
he feed), build index (he build-index) - Explore β Visualize (
he show), search (he search), chat (he talk) - Save β Persist to disk (
he dump)
β Detailed Workflow Walkthrough
Getting Started¶
1. Configure API Key¶
Anthropic provides LLM only β pair with an OpenAI-compatible embedder:
First install vLLM and start both services:
# Start LLM service (~8GB VRAM)
vllm serve Qwen/Qwen3.5-9B --port 8000 --api-key dummy
# Start Embedding service (~2GB VRAM)
vllm serve BAAI/bge-m3 --task embed --port 8001
Then configure Hyper-Extract:
he config llm -p vllm \
-u http://localhost:8000/v1 \
-k dummy \
-m Qwen/Qwen3.5-9B
he config embedder -p vllm \
-u http://localhost:8001/v1 \
-k dummy \
-m BAAI/bge-m3
Full deployment options (quantization, Docker, etc.) see Provider System.
2. Extract Knowledge¶
3. Visualize¶
Commands in Detail¶
Knowledge Extraction¶
he parseβ Extract knowledge from documentshe feedβ Add documents to existing knowledge abstract
Exploration¶
he showβ Visualize knowledge graphhe searchβ Semantic searchhe talkβ Chat with knowledge abstracthe infoβ View knowledge abstract statisticshe export obsidianβ Export to an Obsidian vaulthe export graphmlβ Export a pairwise graph to GraphMLhe export csvβ Export nodes/edges as CSV tables
Management¶
he build-indexβ Build search indexhe cleanβ Remove a KA's index, or the whole KAhe removeβ Delete nodes/edges by key, or soft-remove a single facthe listβ List available templates/methodshe template validateβ Validate a template YAML filehe configβ Configuration management
Configuration¶
The CLI stores configuration in ~/.he/config.toml.
Template vs Method¶
Hyper-Extract offers two ways to extract knowledge:
Templates (Recommended for Most Users)¶
Domain-specific, ready-to-use configurations:
Methods (Advanced)¶
Underlying extraction algorithms:
Language Support¶
Templates support multiple languages:
# English
he parse doc.md -t general/biography_graph -l en
# Chinese
he parse doc.md -t general/biography_graph -l zh
Method templates always use English prompts.
Examples by Use Case¶
Research¶
# Extract from a research paper
he parse paper.md -t general/concept_graph -o ./paper_kb/ -l en
# Ask questions about it
he talk ./paper_kb/ -q "What are the main contributions?"
Biography Analysis¶
# Extract from a biography
he parse biography.md -t general/biography_graph -o ./bio_kb/ -l en
# Visualize life events
he show ./bio_kb/
Legal Document Analysis¶
# Extract contract obligations
he parse contract.md -t legal/contract_obligation -o ./contract_kb/ -l en
# Search for specific clauses
he search ./contract_kb/ "termination conditions"
Tips and Best Practices¶
- Use templates for domain-specific tasks β They're optimized for specific use cases
- Build the index β Required for search and chat functionality
- Feed incrementally β Add documents over time without reprocessing
- Choose the right language β Improves extraction quality for non-English documents
Getting Help¶
- View help for any command:
he <command> --help - List all templates:
he list template - List all methods:
he list method - FAQ
- Troubleshooting