5. Configuration

Config home directory

Rayu resolves a single config home directory used for settings, providers, sessions, skills, projects, etc. Resolution order:

  1. RAYU_CONFIG_DIR — explicit override.
  2. ~/.rayu — if it exists (Rayu's own config).
  3. ~/.rayu — default for fresh installs.

Force a different directory with the env var:

RAYU_CONFIG_DIR=/tmp/rayu-test rayu  # isolated/throwaway config

Files & locations

Within the config home (e.g. ~/.rayu/):

PathPurposeNotes
providers.jsonRayu providers: id, kind, apiKey, baseURL, default/fetched models, context overridesmode 0600 (secrets)
settings.jsonUser settings, incl. the selected model
diagnostics.jsonlRecorded bugs/issues/vulnerabilitiesappend-only JSONL
projects/Per-project session transcripts
skills/, agents/, …Skills/agents/etc.

When RAYU_CONFIG_DIR is set, all config files live inside that directory instead of the default ~/.rayu.

providers.json schema

{
  "activeProvider": "nvidia",
  "providers": [
    {
      "id": "nvidia",
      "kind": "openai-compatible",
      "apiKey": "nvapi-xxxxx",
      "baseURL": "https://integrate.api.nvidia.com/v1",
      "defaultModel": "meta/llama-3.3-70b-instruct",
      "smallFastModel": "meta/llama-3.3-70b-instruct",
      "models": ["my/custom-model"],
      "fetchedModels": ["...catalog from /v1/models..."],
      "contextWindow": 131072,
      "modelContextWindows": { "deepseek-ai/deepseek-v4-flash": 1000000 }
    },
    { "id": "anthropic", "kind": "anthropic", "apiKey": "sk-ant-xxxxx" }
  ]
}
FieldMeaning
activeProviderid of the provider currently in use
kindanthropic or openai-compatible
apiKeyprovider API key (secret)
baseURLendpoint base (openai-compatible)
defaultModelmodel used until you switch / fallback
smallFastModelmodel for cheap requests (titles, etc.); defaults to defaultModel
modelsuser-pinned model ids (shown in /model)
fetchedModelscached catalog from GET {baseURL}/models
contextWindowprovider-wide context default (tokens)
modelContextWindowsper-model context overrides (tokens)

You can edit this file by hand; restart Rayu to pick up changes.

Environment variables

Config & providers

VariableEffect
RAYU_CONFIG_DIROverride config home dir
RAYU_OPENAI_COMPATIBLE=1Force the OpenAI-compatible client path
RAYU_OPENAI_BASE_URLBase URL for the OpenAI-compatible endpoint
RAYU_OPENAI_API_KEYAPI key for the OpenAI-compatible endpoint
ANTHROPIC_API_KEYAnthropic API key
NVIDIA_API_KEY, DEEPSEEK_API_KEY, KIMI_FOR_CODE_API_KEY, DOUBLE_WORD_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEYAuto-imported into providers.json on startup

Models & context

VariableEffect
RAYU_CONTEXT_TOKENSForce the context window (tokens) for the active model
ANTHROPIC_MODELDefault model id (Anthropic-style precedence)
ANTHROPIC_SMALL_FAST_MODELOverride the small/fast model

Diagnostics & privacy

VariableEffect
RAYU_DIAGNOSTICS=1Also echo diagnostics to stderr
RAYU_DIAGNOSTICS_NO_FILE=1Don't persist diagnostics to disk
RAYU_TELEMETRY=1Opt back into telemetry (off by default)
DISABLE_TELEMETRYForce telemetry off (no-telemetry)

See Diagnostics & Privacy for the privacy model.

Project settings & memory

Rayu reads project files when present:

  • RAYU.md, .rayu/RAYU.md, .rayu/rules/*.md — project memory/instructions.
  • .rayu/settings.json, .rayu/settings.local.json — project/local settings.
  • .mcp.json — project MCP servers.

Next: CLI Reference →