Metadata-Version: 2.4
Name: vibe-rag
Version: 0.0.9
Summary: Semantic code search and persistent memory MCP server for Mistral Vibe
Project-URL: Homepage, https://github.com/jasencarroll/vibe-rag
Project-URL: Repository, https://github.com/jasencarroll/vibe-rag
Project-URL: Issues, https://github.com/jasencarroll/vibe-rag/issues
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: asyncpg>=0.29
Requires-Dist: click>=8.1
Requires-Dist: httpx>=0.27
Requires-Dist: mcp>=1.0
Requires-Dist: sqlite-vec>=0.1
Requires-Dist: tree-sitter-languages>=1.10
Requires-Dist: tree-sitter>=0.22
Provides-Extra: dev
Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# vibe-rag

Local semantic code search and persistent memory for [Mistral Vibe](https://docs.mistral.ai/mistral-vibe/). An MCP server that gives Vibe the ability to understand your codebase by meaning, remember things across sessions, and search your docs — all stored in a single local sqlite file. No external database. No cloud. Fully local.

## v0.0.9 Highlights

- **🔒 Security:** API keys never stored in config files
- **🚀 Performance:** 5-10x faster file collection on large projects  
- **🐛 Reliability:** Fixed race conditions and error handling
- **📚 Language Support:** Complete mappings for all file types
- **🧠 Vibe E2E:** Source-run and installed-package MCP flows verified through Mistral Vibe

## Install

```bash
# Latest stable release (v0.0.9)
uv tool install vibe-rag

# Or install specific version
uv tool install vibe-rag@0.0.9
```

Requires Python 3.12+ and a [Mistral API key](https://console.mistral.ai/api-keys).

## Quick start

```bash
# Create a new project
vibe-rag init my-project
cd my-project

# Launch Vibe
vibe
```

Inside Vibe:

```
index this project
search the code for authentication handling
search docs for deployment instructions
remember we decided to use JWT for auth
```

The generated scaffold includes:

- an `AGENTS.md` that explains the memory-first workflow
- a `.vibe/skills/semantic-repo-search` skill that steers Vibe toward `memory_index_project`,
  `memory_search_code`, `memory_search_docs`, and `memory_search_memory` before exact-match tools

## Features

### Local semantic code search
- Index your entire codebase by meaning, not just text
- Search across all files using natural language
- Find relevant code chunks with context

### Persistent memory
- Remember decisions, insights, and context across sessions
- Search your memories semantically
- Hybrid storage: sqlite for local, pgvector for cross-repo (optional)

### Language support
- Python, JavaScript, TypeScript, Rust, Go, Java, C++, C, Ruby, PHP
- Swift, Kotlin, Scala, Bash, SQL, TOML, YAML, JSON
- Smart chunking with tree-sitter for supported languages

### Security
- `vibe-rag init` does not write credentials into generated config
- Credentials can be inherited from the launch shell or set explicitly in Vibe MCP config
- Local-only by default (pgvector optional)

## Configuration

`vibe-rag init` generates a credential-free `.vibe/config.toml`:

```toml
# .vibe/config.toml
active_model = "devstral-2"
skill_paths = [".vibe/skills"]

[[mcp_servers]]
name = "memory"
transport = "stdio"
command = "vibe-rag"
args = ["serve"]
```

For Vibe itself, there are two supported ways to provide credentials.

Option 1: export them before launching `vibe`:

```bash
export MISTRAL_API_KEY=your_api_key_here
export DATABASE_URL=postgresql://user:pass@localhost:5432/vibe_rag
vibe
```

Option 2: add them to the MCP server `env` block in your project-local `.vibe/config.toml` or global `~/.vibe/config.toml`. This is the most reliable option if Vibe is launched from different shells or GUI sessions:

```toml
[[mcp_servers]]
name = "memory"
transport = "stdio"
command = "vibe-rag"
args = ["serve"]
env = {
  MISTRAL_API_KEY = "your_api_key_here",
  DATABASE_URL = "postgresql://user:pass@localhost:5432/vibe_rag"
}
```

Notes:

- `MISTRAL_API_KEY` is required for indexing, code search, docs search, and memory embeddings.
- `DATABASE_URL` is optional and only enables cross-repo memory via pgvector.
- Use `.vibe/config.toml` for project-specific credentials and `~/.vibe/config.toml` for a global setup.
- For normal use, prefer the installed package entrypoint above.
- If you want Vibe to test the working tree instead of an installed release, point `command` at your repo venv, for example:

```toml
[[mcp_servers]]
name = "memory"
transport = "stdio"
command = "/absolute/path/to/repo/.venv/bin/python"
args = ["-m", "vibe_rag.cli", "serve"]
env = {
  PYTHONPATH = "/absolute/path/to/repo/src",
  MISTRAL_API_KEY = "your_api_key_here",
  DATABASE_URL = "postgresql://user:pass@localhost:5432/vibe_rag"
}
```

Vibe only loads project skills and project MCP config from trusted folders. If the repo is not trusted yet, trust it first, then restart Vibe and run `index this project`.

## Architecture

- **Local-first**: SQLite vector database for code search
- **Hybrid option**: PostgreSQL pgvector for cross-repo memories
- **Modular**: Separate components for db, indexing, tools
- **MCP protocol**: Standard Mistral Vibe agent communication

## Development

```bash
# Install dependencies
uv sync

# Run tests
uv run pytest

# Build package
uv build
```

## Changelog

See [CHANGELOG.md](CHANGELOG.md) for detailed release notes.

## License

MIT © 2026 Jasen Carroll

## Support

- Issues: [GitHub Issues](https://github.com/jasencarroll/vibe-rag/issues)
- Discussions: [GitHub Discussions](https://github.com/jasencarroll/vibe-rag/discussions)
- Source: [GitHub Repository](https://github.com/jasencarroll/vibe-rag)
