Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/S1LV4/th0th/llms.txt

Use this file to discover all available pages before exploring further.

The th0th configuration CLI (th0th-config) provides a simple way to manage your configuration file, switch embedding providers, and customize settings.

Installation

The configuration CLI is included with the MCP client package:
npm install -g @th0th-ai/mcp-client
Or use directly with npx:
npx @th0th-ai/mcp-client --config-help

Configuration File

th0th stores its configuration in ~/.config/th0th/config.json. This file is automatically created on first run with sensible defaults.
The configuration file is shared across all th0th integrations (MCP server, REST API, CLI tools).

Quick Commands

Use these flags with the main th0th command for quick configuration tasks:
# Display current configuration
npx @th0th-ai/mcp-client --config-show

# Example output:
{
  "embedding": {
    "provider": "ollama",
    "model": "nomic-embed-text:latest",
    "baseURL": "http://localhost:11434",
    "dimensions": 768
  }
}

CLI Commands

The th0th-config binary provides advanced configuration management:

init

Initialize or reinitialize the configuration file.
# Initialize with Ollama (local, free)
th0th-config init

# Output: ✓ Configured for Ollama (local) embeddings
--ollama
boolean
default:"true"
Use Ollama for local embeddings (default)
--mistral
string
Use Mistral with the provided API key
--openai
string
Use OpenAI with the provided API key

use

Switch between embedding providers without reinitializing.
# Switch to Ollama
th0th-config use ollama --model nomic-embed-text:latest

# Output: ✓ Switched to ollama embeddings
#         Model: nomic-embed-text:latest
provider
string
required
Embedding provider: ollama, mistral, or openai
--api-key
string
API key (required for mistral and openai)
--model
string
Model name (optional, uses provider defaults)
--base-url
string
Base URL for Ollama (default: http://localhost:11434)

set

Set specific configuration values using dot notation.
# Change embedding dimensions
th0th-config set embedding.dimensions 1024

# Output: ✓ Set embedding.dimensions = 1024
key
string
required
Configuration key in dot notation (e.g., embedding.dimensions)
value
string
required
Value to set (auto-converts numbers)

show

Display the current configuration.
th0th-config show
If no config file exists, shows the default configuration.

path

Print the path to the configuration file.
th0th-config path

Embedding Providers

th0th supports three embedding providers:

Ollama

Free, local, private
  • Default: nomic-embed-text:latest (768d)
  • Alternative: bge-m3 (1024d)
  • Requires Ollama running locally

Mistral

API-based, cost-effective
  • Default: mistral-embed (1024d)
  • Alternative: codestral-embed
  • Requires API key

OpenAI

API-based, high quality
  • Default: text-embedding-3-small (1536d)
  • Alternative: text-embedding-3-large
  • Requires API key

Configuration Schema

The configuration file follows this schema:
{
  "embedding": {
    "provider": "ollama" | "mistral" | "openai",
    "model": string,
    "apiKey"?: string,           // Required for mistral/openai
    "baseURL"?: string,          // For ollama only
    "dimensions": number
  }
}
The dimensions field must match the output dimensions of the selected model. The CLI sets this automatically when using init or use commands.

Examples

Initial Setup with Ollama

# Install Ollama and pull the embedding model
./scripts/setup-local-first.sh

# Verify configuration
npx @th0th-ai/mcp-client --config-show

Switch to Cloud Provider

# Switch to Mistral for better code embeddings
th0th-config use mistral --api-key sk-xxx --model codestral-embed

# Verify the change
th0th-config show

Custom Ollama Configuration

# Use Ollama on a remote server
th0th-config use ollama \
  --model bge-m3 \
  --base-url http://gpu-server.local:11434

# Verify connection by indexing a project
th0th index /path/to/project

Fine-tune Settings

# Adjust embedding dimensions manually
th0th-config set embedding.dimensions 512

# Update model without changing provider
th0th-config set embedding.model text-embedding-3-large

Troubleshooting

If you see “No config file found”, run:
th0th-config init
This creates the default configuration at ~/.config/th0th/config.json.
Ensure Ollama is running:
ollama serve
Or update the base URL if Ollama is on a different host:
th0th-config use ollama --base-url http://your-host:11434
Update your API key:
th0th-config use mistral --api-key your-new-key
Or use the set command:
th0th-config set embedding.apiKey your-new-key
Reinitialize the configuration:
th0th-config init
This overwrites your existing config with Ollama defaults.

Source Reference

The configuration CLI implementation can be found at:
  • CLI source: apps/mcp-client/src/config-cli.ts:1
  • Binary name: th0th-config (defined in apps/mcp-client/package.json:10)
  • Configuration utilities: @th0th-ai/shared/config

Quick Start

Get started with th0th in minutes

REST API

Use th0th via HTTP endpoints

MCP Integration

Integrate with AI coding assistants

Development Guide

Build and contribute to th0th

Build docs developers (and LLMs) love