Skip to content

tomohiro-owada/devrag

MCP Developer Tools

A lightweight local RAG system that reduces Claude Code token usage by retrieving only relevant document chunks.

Go Latest v1.4.4 · 1mo ago Security brief →

Features

  • Simple Retrieval‑Augmented Generation for Claude Code
  • Markdown indexing with semantic search via natural language queries
  • Single binary executable, no Python required (models auto‑download)
  • Cross‑platform support (macOS, Linux, Windows) and GPU/CPU auto‑detection
  • CLI and MCP server modes for flexible integration

Recent releases

View all 9 releases →
v1.4.4 Bug fix

Fixed search crash with zero‑vector chunks and enabled CoreML GPU acceleration on Apple Silicon.

Full changelog

Bug Fixes

  • Fix search crash with zero-vector chunks (#22): vec_distance_cosine() returns NULL for zero vectors (stored as a fallback when chunk embedding fails). The scanner now handles NULL distances gracefully and skips those chunks instead of crashing.
  • Fix CoreML GPU acceleration on Apple Silicon (#21): The MLComputeUnits option value was CPU_AND_GPU (underscore) but ONNX Runtime expects CPUAndGPU (CamelCase). M1/M2/M3 Macs will now correctly use CoreML GPU acceleration instead of falling back to CPU.

Full Changelog: https://github.com/tomohiro-owada/devrag/compare/v1.4.3...v1.4.4

v1.4.2 Bug fix

Fixed consecutive space runs caused by Box Drawing characters in SanitizeForTokenizer, eliminating chunk failures.

Full changelog

Fix: SanitizeForTokenizer space counting with problematic Unicode runes (#18)

Bug: SanitizeForTokenizer() replaced Box Drawing characters (U+2500–U+257F etc.) with spaces but reset the consecutive-space counter, allowing long space runs to survive and trigger the sentencepiece normalizer panic in sugarme/tokenizer v0.3.0.

Fix: Unified the space and problematic-rune branches so both increment spaceCount. This ensures that sequences like " ─── " are properly collapsed instead of producing 9 consecutive spaces.

Impact: Eliminates the remaining 2 chunk failures reported in v1.4.1 testing (ASCII flowcharts and wide Markdown tables with Box Drawing borders).

Credit: @hrkzogw for the thorough root cause analysis and suggested fix.

v1.4.1 Bug fix

Fixed tokenizer panic caused by sequences of four or more consecutive spaces.

Full changelog

Bug Fixes

  • Fix tokenizer panic root cause (#18): The real crash trigger was runs of 4+ consecutive spaces (deep indentation), not Unicode characters. The sentencepiece normalizer in sugarme/tokenizer v0.3.0 has an off-by-one bug in byte offset tracking for long whitespace runs. SanitizeForTokenizer() now collapses runs of 4+ spaces to 3 before tokenization, eliminating the remaining zero-vector fallbacks.

    Thanks to @hrkzogw for the detailed root cause analysis.

v1.4.0 New feature
Notable features
  • Configurable global model cache directory with OS‑specific defaults and override hierarchy (CLI flag, env var DEVRAG_MODEL_DIR, config.json "model_dir")
Full changelog

New Features

  • Configurable global model cache directory (#16): The embedding model (~450MB) is now cached in an OS-appropriate location by default, avoiding redundant downloads per project.

    • macOS: ~/Library/Application Support/devrag/models
    • Linux: $XDG_DATA_HOME/devrag/models (fallback ~/.local/share/devrag/models)
    • Windows: %LOCALAPPDATA%\devrag\models

    Override with (highest to lowest precedence):

    1. --model-dir <path> CLI flag
    2. DEVRAG_MODEL_DIR environment variable
    3. "model_dir" field in config.json

Bug Fixes (from v1.3.2)

  • Fix tokenizer panic on Unicode-heavy markdown files (#18)
  • Fix startup hang on macOS Apple Silicon (#17)
v1.3.2 Bug fix

Fixed tokenizer panic on Unicode-heavy markdown files and startup hang on macOS Apple Silicon.

Full changelog

Bug Fixes

  • Fix tokenizer panic on Unicode-heavy markdown files (#18): Added Unicode sanitization for box drawing, block elements, geometric shapes, and braille characters before tokenization. Added panic recovery to all Tokenizer methods as defense-in-depth against sugarme/tokenizer v0.3.0 bugs.
  • Fix startup hang on macOS Apple Silicon (#17): Changed CoreML MLComputeUnits from ALL to CPU_AND_GPU to avoid Neural Engine compilation hangs. Added timeout-based session creation (60s for CoreML, 30s for CPU) with automatic CPU fallback when CoreML fails or times out.

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

About

Stars
59
Forks
14
Languages
Go Shell Rust

Install & Platforms

Install via
binary
Platforms
macos linux windows arm64

Beta — feedback welcome: [email protected]