RAGit
CommandsConfig

config set

Update a single RAGit config value

What It Does

config set updates one key in .ragit/config.toml using the repository-aware config loader and writer.

When To Use / When Not To Use

When to use it

  • You want to change output, ingest, storage, or embedding settings.
  • You want a scriptable way to change config without editing TOML by hand.

When not to use it

  • You only want to inspect current values. Use status.
  • You want to initialize missing defaults. Use init.

Syntax

pnpm ragit config set <key> <value> [--cwd <path>]

Arguments And Options

  • <key>: The dotted config key to update.
  • <value>: The value to store.
  • --cwd <path>: Run against another repository.

Input And Output Contract

  • Input is positional only.
  • Output is a plain stdout confirmation message. This command does not currently expose a JSON envelope.

Examples

Human terminal flow:

pnpm ragit config set output.format markdown

Agent-oriented flow:

pnpm ragit config set ingest.supported_types '["adr","spec"]'

Embedding Provider Setup

RAGit recognizes exactly these provider/model profiles:

ProviderModelDimensions
openaitext-embedding-3-small1536
openaitext-embedding-3-large3072
ollamanomic-embed-text768
ollamamxbai-embed-large1024

Recognition does not make a profile evidence-backed or production-supported. The deterministic local-placeholder/placeholder-v1 profile has 64 dimensions and is for offline development/regression only; its benchmark reports are developmentOnly: true, not production-quality evidence.

For this release, only loopback Ollama nomic-embed-text is production-supported. The OpenAI profiles are recognized and mock-contract-tested, but remain opt-in integration targets without authorized live evidence and are not production-supported by this release.

For OpenAI, make OPENAI_API_KEY available in the command environment before ingest or migration. It is environment-only: RAGit has no API-key config key or CLI argument, and credentials must not be committed or persisted. Configure the initial OpenAI target as follows:

pnpm ragit config set embedding.provider openai
pnpm ragit config set embedding.model text-embedding-3-small

The credential-free default OpenAI provider root is https://api.openai.com; RAGit appends /v1/embeddings. A compatible custom gateway can set embedding.base_url, but this value is a provider root, not the final embeddings endpoint. It must be an absolute http or https URL with no username, password, query, or fragment; trailing slashes are normalized away. Never put a credential in embedding.base_url.

For loopback Ollama, first make the exact model available locally:

ollama pull nomic-embed-text
pnpm ragit config set embedding.provider ollama
pnpm ragit config set embedding.model nomic-embed-text
pnpm ragit config set embedding.base_url http://127.0.0.1:11434

RAGit appends /api/embed for Ollama. Only localhost, 127.0.0.1, and ::1 roots are reported as ollama-local; any non-loopback root is reported as custom.

Failures And Cautions

  • Invalid keys or invalid values fail before the config file is written.
  • For real providers, use embedding.provider, embedding.model, embedding.base_url, embedding.timeout_ms, embedding.cache_enabled, and embedding.cache_dir as the supported knobs. embedding.dimensions and embedding.version are legacy-only and only remain meaningful for local-placeholder.
  • Changing the target embedding provider does not rewrite the persisted store contract by itself. Follow up with migrate embeddings when status reports embedding.needsMigration=true.
  • A requested provider never silently falls back to local-placeholder. Inspect status, then follow the migration preview/apply flow after changing provider or model.
  • embedding.cache_dir must stay inside the repository root. If it points outside the repo, cache writes are disabled and doctor reports the config as invalid.
  • Because output is text-only, agents should validate follow-up state with status.