Skip to main content

Configuration

The config and setup commands manage CLI configuration.

Setup Wizard

First-time configuration wizard that guides you through LLM provider setup for entity extraction and chat.

chaoscypher setup
OptionDescription
--provider, -p {ollama,openai,anthropic,gemini}LLM provider (skip selection prompt)
--vram INTEGERVRAM size in GB for Ollama presets
--non-interactiveNon-interactive mode (for CI/scripts)
--test/--no-testTest provider connectivity (default: --test)
--force, -fReconfigure even if already configured

Example: Interactive Setup with Ollama

chaoscypher setup
╭──────────────────────────────────────────╮
│ Configure LLM for entity extraction │
╰──────────────────────────────────────────╯

Choose LLM Provider:

[1] Ollama Local LLM - Free, private, no API key required
[2] OpenAI GPT-4o - Cloud-based, requires API key
[3] Anthropic Claude - Cloud-based, requires API key
[4] Google Gemini Gemini Pro - Cloud-based, requires API key

Select provider [1/2/3/4/q] (1): 1
Ollama URL (http://localhost:11434):
Testing connection... Connected successfully

How much GPU VRAM do you have?

[1] 16GB (RTX 4080, 5080) → qwen3:8b
[2] 20GB (RTX 5080 Super) → qwen3:14b
[3] 24GB (RTX 4090, 3090) → qwen3:30b
[4] 32GB (A100, dual GPUs) → qwen3:32b
[5] 48GB (A6000, 2x 4090) → qwen3:70b
[6] 96GB (H100) → qwen3:70b
[7] 128GB (Multi-H100) → qwen3:405b
[8] Custom I'll specify models manually

Select VRAM tier [1/2/3/4/5/6/7/8] (3): 3
Applying 24GB VRAM preset...
Chat model: qwen3:30b
Extraction model: qwen3:30b-instruct
Context window: 32768

╭─ ✓ Configuration Complete ───────────────╮
│ Provider ollama │
│ URL http://localhost:11434 │
│ Chat Model qwen3:30b │
│ Extraction qwen3:30b-instruct │
│ Context Window 32768 │
│ Config File ~/.config/chaoscypher/... │
╰──────────────────────────────────────────╯

Next steps:
chaoscypher source add document.pdf # Process a document
chaoscypher chat # Start interactive chat
Embeddings

The default embedding provider runs locally on the CPU using sentence-transformers and does not require API keys. Alternative providers (Ollama, OpenAI, Gemini) are also available. The embedding model is configured via embedding.model in settings.yaml.

Quick Setup Examples

# Ollama with 24GB VRAM preset (skip menus)
chaoscypher setup --provider ollama --vram 24

# OpenAI (reads OPENAI_API_KEY from environment)
chaoscypher setup --provider openai

# Non-interactive for CI (auto-detects provider from env vars)
chaoscypher setup --non-interactive

# Re-run setup after initial configuration
chaoscypher setup --force

Providers

ProviderRequirements
OllamaLocal installation, no API key needed
OpenAIOPENAI_API_KEY environment variable
AnthropicANTHROPIC_API_KEY environment variable
GeminiGEMINI_API_KEY environment variable

Ollama VRAM Presets

When using Ollama, specify --vram to auto-configure optimal models for your hardware.

VRAMGPUsChat Model
16 GBRTX 4080, 5080phi4:14b
20 GBRTX A4000, A4500phi4:14b
24 GBRTX 4090, 3090qwen3:30b
32 GBRTX 5090qwen3:30b
48 GBA6000, 2x 4090qwen3:30b
96 GBRTX 6000 Progpt-oss:120b
128 GBDGX Sparkgpt-oss:120b

Config Commands

Show Configuration

Displays all current settings including defaults, config file values, and environment overrides.

chaoscypher config show
OptionDescription
--format, -f {tree,json,yaml}Output format (default: tree)

Tree format (default)

chaoscypher config show
Configuration
├── lexicon
│ ├── url: http://localhost:3001
│ ├── timeout: 30
│ └── max_retries: 4
├── paths
│ ├── data_dir: /home/user/.local/share/chaoscypher
│ ├── config_dir: /home/user/.config/chaoscypher
│ └── cache_dir: /home/user/.cache/chaoscypher
├── ui
│ ├── color: True
│ ├── output_format: table
│ └── paging: True
└── llm
├── provider: ollama
├── ollama_url: http://localhost:11434
└── ollama_chat_model: qwen3:30b

Config file: /home/user/.config/chaoscypher/cli.yaml
Status: exists

JSON format

chaoscypher config show --format json
{
"lexicon": {
"url": "http://localhost:3001",
"timeout": 30,
"max_retries": 4
},
"paths": {
"data_dir": "/home/user/.local/share/chaoscypher",
"config_dir": "/home/user/.config/chaoscypher",
"cache_dir": "/home/user/.cache/chaoscypher"
},
"ui": {
"color": true,
"output_format": "table",
"paging": true
},
"llm": {
"provider": "ollama",
"ollama_url": "http://localhost:11434",
"ollama_chat_model": "qwen3:30b"
}
}

YAML format

chaoscypher config show --format yaml
lexicon:
url: http://localhost:3001
timeout: 30
max_retries: 4
paths:
data_dir: /home/user/.local/share/chaoscypher
config_dir: /home/user/.config/chaoscypher
cache_dir: /home/user/.cache/chaoscypher
ui:
color: true
output_format: table
paging: true
llm:
provider: ollama
ollama_url: http://localhost:11434
ollama_chat_model: qwen3:30b
note

YAML output requires PyYAML. If not installed, the command falls back to JSON format automatically.

Get a Value

Retrieve a specific configuration value using dot-separated paths.

chaoscypher config get KEY

Use dot-separated paths for nested values (e.g., lexicon.url, llm.provider, paths.data_dir).

chaoscypher config get llm.provider
ollama

chaoscypher config get lexicon.url
http://localhost:3001

chaoscypher config get paths.data_dir
/home/user/.local/share/chaoscypher

When the key points to a group, the full subtree is returned as JSON:

chaoscypher config get llm
{
"provider": "ollama",
"ollama_url": "http://localhost:11434",
"ollama_chat_model": "qwen3:30b"
}

If the key does not exist:

chaoscypher config get nonexistent.key
Key not found: nonexistent.key

Set a Value

Set a configuration value and save it to the config file.

chaoscypher config set KEY VALUE

Values are automatically converted to the appropriate type (boolean, integer, float, or string):

chaoscypher config set lexicon.timeout 60
Set lexicon.timeout = 60
Saved to: /home/user/.config/chaoscypher/cli.yaml

Type conversion happens automatically:

InputConverted TypeConverted Value
"true", "yes", "on", "1"boolTrue
"false", "no", "off", "0"boolFalse
"42"int42
"3.14"float3.14
"qwen3:30b"str"qwen3:30b"
chaoscypher config set ui.color false
Set ui.color = False
Saved to: /home/user/.config/chaoscypher/cli.yaml

chaoscypher config set llm.ollama_chat_model "qwen3:14b"
Set llm.ollama_chat_model = qwen3:14b
Saved to: /home/user/.config/chaoscypher/cli.yaml
warning

The set command requires PyYAML. If not installed, the command will print an error with install instructions.

Edit Config File

Open the config file in your default editor. Creates the file with commented defaults if it does not exist.

chaoscypher config edit

Uses $EDITOR or $VISUAL environment variable. Falls back to nano on Linux/macOS and notepad on Windows.

Show Config Path

Display the path to the CLI configuration file.

chaoscypher config path
chaoscypher config path
/home/user/.config/chaoscypher/cli.yaml
Status: exists

If the config file has not been created yet:

chaoscypher config path
/home/user/.config/chaoscypher/cli.yaml
Status: not created yet

Reset to Defaults

Remove the config file to restore all default settings.

chaoscypher config reset
OptionDescription
--force, -fSkip confirmation prompt
chaoscypher config reset
Delete /home/user/.config/chaoscypher/cli.yaml? [y/N]: y
Configuration reset to defaults.

Config File Location

PlatformPath
Linux~/.config/chaoscypher/cli.yaml
macOS~/.config/chaoscypher/cli.yaml
Windows%APPDATA%\chaoscypher\cli.yaml

The location can be overridden with the CHAOSCYPHER_CONFIG_DIR environment variable.

Configuration Hierarchy

Settings are resolved in the following order (later sources override earlier ones):

  1. Built-in defaults -- hardcoded in the CLI
  2. Config file -- cli.yaml (if it exists)
  3. Environment variables -- CHAOSCYPHER_* prefixed variables

Environment Variables

All settings can be overridden via environment variables:

VariableOverrides
LEXICON_URLlexicon.url
CHAOSCYPHER_LEXICON_TIMEOUTlexicon.timeout
CHAOSCYPHER_DATA_DIRpaths.data_dir
CHAOSCYPHER_CONFIG_DIRpaths.config_dir
CHAOSCYPHER_CACHE_DIRpaths.cache_dir
CHAOSCYPHER_OUTPUT_FORMATui.output_format
CHAOSCYPHER_NO_COLOR / NO_COLORui.color (set to disable)
CHAOSCYPHER_LLM_PROVIDERllm.provider
CHAOSCYPHER_OLLAMA_URLllm.ollama_url
CHAOSCYPHER_OLLAMA_CHAT_MODELllm.ollama_chat_model
CHAOSCYPHER_OLLAMA_EXTRACTION_MODELllm.ollama_extraction_model
OPENAI_API_KEYllm.openai_api_key
ANTHROPIC_API_KEYllm.anthropic_api_key
GEMINI_API_KEYllm.gemini_api_key
CHAOSCYPHER_DATABASEdatabase.current