Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Vibe Analyzer uses a JSON5 configuration file. JSON5 is an extended version of JSON with support for comments, trailing commas, and other convenient features.

Location

~/.vibe-analyzer/config.json5

The file is created automatically with default settings the first time any CLI command is run.

Configuration Structure

The configuration consists of these sections: version, log_level, opensearch, mcp, analyze, export, cluster, and sources.

Full Example with Comments

{
  // Configuration version (do not modify)
  "version": "0.0.5",

  // Log level: cli, error, warn, info, debug, trace
  "log_level": "cli",

  // OpenSearch connection
  "opensearch": {
    "host": "http://localhost:9200"
  },

  // MCP server
  "mcp": {
    "host": "127.0.0.1",
    "port": 9020,
    "protocol": "latest"
  },

  // Analysis settings
  "analyze": {
    "max_chunk_chars": 3000,
    "include": {
      "meta": false,
      "debt": false,
      "advice": false,
      "errors": false
    }
  },

  // Default export settings
  "export": {
    "format": "json",
    "output_dir": "/Users/keygenqt/Downloads",
    "types": {
      "code": true,
      "markdown": true,
      "text": true,
      "binary": true
    },
    "include": {
      "imports": true,
      "functions": true,
      "variables": true,
      "enums": true,
      "interfaces": true,
      "classes": true,
      "structs": true,
      "comments": true,
      "header_comments": true,
      "headings": true,
      "links": true,
      "code_blocks": true,
      "markers": false,
      "warnings": false,
      "body": false
    }
  },

  // LLM cluster nodes (local and cloud models)
  "cluster": [
    {
      "provider": "ollama",
      "host": "http://localhost:11434",
      "model": "qwen2.5-coder:3b-instruct",
      "timeout_secs": 60,
      "temperature": 0.1,
      "seed": 42,
      "num_ctx": 4096,
      "num_predict": 2048,
      "parallel": 1
    },
    {
      "provider": "deepseek",
      "host": "https://api.deepseek.com/v1",
      "model": "deepseek-v4-flash",
      "api_key": "sk-...",
      "timeout_secs": 120,
      "temperature": 0.1,
      "seed": 42,
      "num_ctx": 4096,
      "num_predict": 2048,
      "parallel": 2
    }
  ],

  // Knowledge sources for indexing
  "sources": ["/Users/keygenqt/Documents/Gitcode/Projects/vibe-analyzer"]
}

Sections in Detail

version

{
  "version": "0.0.5"
}

Configuration file version. Do not modify manually — updated automatically during config migration between versions.

log_level

{
  "log_level": "cli"
}

Application log level. Supported values: cli, error, warn, info, debug, trace. The cli level disables tracing output for clean command-line output.

opensearch

{
  "opensearch": {
    "host": "http://localhost:9200"
  }
}
ParameterTypeDefaultDescription
hoststringhttp://localhost:9200OpenSearch server URL. Can point to a local or remote server

mcp

{
  "mcp": {
    "host": "127.0.0.1",
    "port": 9020,
    "protocol": "latest"
  }
}
ParameterTypeDefaultDescription
hoststring127.0.0.1Server bind address. 0.0.0.0 — accessible externally (Docker, remote clients), 127.0.0.1 — local only
portinteger9020MCP server port
protocolstringlatestMCP protocol version: 2024-11-05, 2025-03-26, 2025-06-18, or latest

analyze

{
  "analyze": {
    "max_chunk_chars": 3000,
    "include": {
      "meta": false,
      "debt": false,
      "advice": false,
      "errors": false
    }
  }
}
ParameterTypeDefaultDescription
max_chunk_charsinteger3000Maximum characters per LLM request batch

Enrichment features:

FeatureDescription
metaGenerate summary and search tags for the file
debtDetect technical debt: TODO markers, magic numbers
adviceSuggest refactoring, naming, and test improvements
errorsFind bugs: unsafe calls, swallowed errors, spelling mistakes

When all features are disabled, only AST data is returned.

export

{
  "export": {
    "format": "json",
    "output_dir": "/Users/keygenqt/Downloads",
    "types": {
      "code": true,
      "markdown": true,
      "text": true,
      "binary": true
    },
    "include": {
      "imports": true,
      "functions": true,
      "variables": true,
      "markers": false,
      "warnings": false,
      "body": false
    }
  }
}
ParameterTypeDefaultDescription
formatstringjsonDefault export format: json, json5, toml, toon, xml, yaml
output_dirstring~/DownloadsDefault output directory for exported files

File types (types):

TypeDescription
codeSource code files (Rust, Python, etc.)
markdownMarkdown documentation files
textText files without AST parser (configs)
binaryBinary files (images, archives)

AST elements (include):

ElementDescription
importsImport statements
functionsFunction signatures
variablesVariable declarations
enumsEnum declarations
interfacesInterface/trait declarations
classesClass declarations
structsStruct declarations
commentsDocumentation comments
header_commentsFile header comments
headingsMarkdown headings
linksMarkdown links
code_blocksMarkdown code blocks
markersStatic analysis markers (TODO, FIXME, HACK)
warningsStatic analysis warnings (unwrap, panic)
bodyBody content (functions, classes, headings)

cluster

{
  "cluster": [
    {
      "provider": "ollama",
      "host": "http://localhost:11434",
      "model": "qwen2.5-coder:3b-instruct",
      "timeout_secs": 60,
      "temperature": 0.1,
      "seed": 42,
      "num_ctx": 4096,
      "num_predict": 2048,
      "parallel": 1
    }
  ]
}
ParameterTypeDefaultDescription
providerstringollamaProvider type: ollama, deepseek, qwen
hoststringhttp://localhost:11434API endpoint URL
modelstringqwen2.5-coder:3b-instructModel name. Ollama: pre-loaded via ollama pull
timeout_secsinteger60Request timeout in seconds
temperaturefloat0.1Generation temperature (0.0 — deterministic, 1.0 — creative)
seedinteger42Random seed for reproducible results
num_ctxinteger4096Context window size in tokens
num_predictinteger2048Maximum tokens in response
api_keystring(none)API key for cloud providers (not needed for Ollama)
parallelinteger1Number of parallel workers for this provider

Multiple nodes can be specified for load distribution across local and cloud models.

sources

{
  "sources": ["/Users/keygenqt/Documents/Gitcode/Projects/vibe-analyzer"]
}
ParameterTypeDefaultDescription
sourcesarray of strings[]List of absolute paths to sources

Managing sources via CLI:

vibe-analyzer source add /path/to/project
vibe-analyzer source remove --target /path/to/project
vibe-analyzer source list

Configuration Validation

Vibe Analyzer validates the configuration at startup and applies safe defaults if parameters are missing or invalid:

  • max_chunk_chars → minimum 1000, maximum 100000
  • Invalid paths → normalized to absolute form
  • Missing sections → created with default values

Overriding the Configuration File

vibe-analyzer --config /custom/path/config.json5 source list

Default is ~/.vibe-analyzer/config.json5.