CLI Configuration
NexusCore CLI is configured through a YAML config file and environment variables.
Config File Location
The default config file is ~/.nexuscore/config.yaml. Override with --config or the NEXUS_CONFIG environment variable.
Project-level overrides can be placed in .nexuscore/config.yaml in your workspace root.
Example Configuration
yaml
# Model providers
models:
providers:
- name: ollama
endpoint: http://localhost:11434
type: ollama
- name: openai
endpoint: https://api.openai.com/v1
type: openai
api_key_env: OPENAI_API_KEY
default_model: llama3.1:8b
routing:
fast: llama3.1:8b
code: codellama:13b
reasoning: gpt-4o
# Agent behavior
agent:
memory: true
checkpoint_auto: true
max_iterations: 50
swarm_max_fanout: 5
swarm_child_timeout: 120
# Tool permissions
tools:
enabled: true
allow_shell: true
allow_web: true
# Encrypted sync (Pro tier)
sync:
enabled: true
auto_sync: trueConfiguration Sections
models
| Key | Type | Default | Description |
|---|---|---|---|
providers | list | [] | List of model provider configurations |
default_model | string | — | Default model name for agent sessions |
routing.fast | string | — | Model for quick edits and completions |
routing.code | string | — | Model for code generation |
routing.reasoning | string | — | Model for complex tasks and architecture |
models.providers[]
| Key | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Provider identifier |
endpoint | string | Yes | API endpoint URL |
type | string | No | Provider type (ollama, openai, anthropic, google, lmstudio) |
api_key_env | string | No | Environment variable containing the API key |
api_key | string | No | API key (prefer api_key_env for security) |
agent
| Key | Type | Default | Description |
|---|---|---|---|
memory | bool | false | Enable persistent memory across sessions |
checkpoint_auto | bool | true | Auto-create checkpoints before file changes |
max_iterations | int | 50 | Max tool-use iterations per task |
swarm_max_fanout | int | 5 | Max concurrent sub-agents in swarm mode |
swarm_child_timeout | int | 120 | Timeout (seconds) per sub-agent |
tools
| Key | Type | Default | Description |
|---|---|---|---|
enabled | bool | true | Enable tool use |
allow_shell | bool | true | Allow shell command execution |
allow_web | bool | true | Allow web search and fetch |
sync
| Key | Type | Default | Description |
|---|---|---|---|
enabled | bool | false | Enable encrypted sync (requires Pro tier) |
auto_sync | bool | true | Sync automatically on changes |
Precedence
Configuration is resolved in this order (highest priority first):
- Command-line flags —
--model,--verbose, etc. - Environment variables —
NEXUS_MODEL,NEXUS_VERBOSE, etc. - Project-level config —
.nexuscore/config.yamlin the current workspace - User-level config —
~/.nexuscore/config.yaml - Built-in defaults
Shared Configuration
The config file at ~/.nexuscore/config.yaml is shared between NexusCore CLI and NexusIDE. Providers configured in one surface are available in the other.
Project-level config (.nexuscore/config.yaml in your workspace) overrides user-level settings for that project only.