Installation
The CLI is included with the Struktur package:bun:
Commands
Strukt provides four main commands:extract-file: Extract structured data (default command)verify: Validate artifact JSON formatauth: Manage provider API tokensmodels: List available models
extract-file command
The default command for running extractions.Basic usage
Input options
Strukt accepts multiple input formats:Schema options
Model selection
provider/model-name
Examples:
openai/gpt-4o-minianthropic/claude-3-5-haiku-20241022google/gemini-1.5-flashopenrouter/anthropic/claude-3.5-sonnetopencode/gpt-5-nano
Strategy selection
simple: Single-pass extraction (default)parallel: Concurrent batches with LLM mergesequential: Sequential batches with contextparallelAutoMerge: Parallel with schema-aware mergesequentialAutoMerge: Sequential with schema-aware mergedoublePass: Parallel then sequential refinementdoublePassAutoMerge: Auto-merge then sequential refinement
Output options
Chunk size configuration
For strategies that support chunking:- Model context window size
- Document complexity
- Cost vs. accuracy tradeoffs
Complete example
auth command
Manage API tokens for AI providers.auth set
Store a provider token:
Storage options:
openaianthropicgoogleopencodeopenrouter
auth default
Set or update your default model:auth get
Retrieve a stored token:auth list
List all configured providers:auth delete
Remove a provider token:models command
Query available models from providers.List all providers
List specific provider
verify command
Validate artifact JSON format.Progress indicators
The CLI shows automatic progress bars when running in a TTY:- Output is redirected to a file
- Piping to another command
- Running in non-interactive mode