Skip to content

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: true

Configuration Sections

models

KeyTypeDefaultDescription
providerslist[]List of model provider configurations
default_modelstringDefault model name for agent sessions
routing.faststringModel for quick edits and completions
routing.codestringModel for code generation
routing.reasoningstringModel for complex tasks and architecture

models.providers[]

KeyTypeRequiredDescription
namestringYesProvider identifier
endpointstringYesAPI endpoint URL
typestringNoProvider type (ollama, openai, anthropic, google, lmstudio)
api_key_envstringNoEnvironment variable containing the API key
api_keystringNoAPI key (prefer api_key_env for security)

agent

KeyTypeDefaultDescription
memoryboolfalseEnable persistent memory across sessions
checkpoint_autobooltrueAuto-create checkpoints before file changes
max_iterationsint50Max tool-use iterations per task
swarm_max_fanoutint5Max concurrent sub-agents in swarm mode
swarm_child_timeoutint120Timeout (seconds) per sub-agent

tools

KeyTypeDefaultDescription
enabledbooltrueEnable tool use
allow_shellbooltrueAllow shell command execution
allow_webbooltrueAllow web search and fetch

sync

KeyTypeDefaultDescription
enabledboolfalseEnable encrypted sync (requires Pro tier)
auto_syncbooltrueSync automatically on changes

Precedence

Configuration is resolved in this order (highest priority first):

  1. Command-line flags--model, --verbose, etc.
  2. Environment variablesNEXUS_MODEL, NEXUS_VERBOSE, etc.
  3. Project-level config.nexuscore/config.yaml in the current workspace
  4. User-level config~/.nexuscore/config.yaml
  5. 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.

Released under the MIT License.