Skip to main content

vector-rag-tool logo

vector-rag-tool

Python Version License: MIT Code style: ruff Type checked: mypy Built with Claude Code

A CLI that provides local RAG with Ollama embeddings and FAISS vector search.

Features

  • Semantic search using vector embeddings
  • Multiple file types: Python, Markdown, YAML, JSON
  • Document support: PDF, Word, Excel, PowerPoint via markitdown
  • Fast local search with FAISS (~100ms queries)
  • Optional S3 Vectors backend for cloud scale
  • Incremental indexing with file hash tracking
  • Configurable chunk size and overlap

Installation

Prerequisites:

  • Python 3.13+
  • Ollama with an embedding model
# Install Ollama and pull embedding model
brew install ollama
ollama pull embeddinggemma

# Install vector-rag-tool
git clone https://github.com/dnvriend/vector-rag-tool.git
cd vector-rag-tool
uv tool install .

Usage

# Preview what would be indexed (dry-run is default)
vector-rag-tool index "**/*.py" --store my-project

# Index files
vector-rag-tool index "**/*.py" --store my-project --no-dry-run

# Index multiple file types
vector-rag-tool index "**/*.py" "**/*.md" --store my-project --no-dry-run

# Query for relevant code
vector-rag-tool query "how does authentication work" --store my-project

# Get full chunk content for RAG grounding
vector-rag-tool query "database connection" --store my-project --full

# JSON output for piping
vector-rag-tool query "logging" --store my-project --json

# Force reindex all files
vector-rag-tool index "**/*.py" --store my-project --force --no-dry-run

# Index documents (PDF, Word, Excel)
vector-rag-tool index "docs/**/*.pdf" --store my-docs --no-dry-run

# Use S3 Vectors backend
vector-rag-tool index "**/*.py" --store my-store \
    --bucket my-vectors-bucket --profile aws-profile --no-dry-run

Store Management

vector-rag-tool store list              # List all stores
vector-rag-tool store create my-store   # Create empty store
vector-rag-tool store delete my-store --force  # Delete store

Options

Index Command

Option Description
--store Store name (required)
--chunk-size Characters per chunk (default: 1500)
--chunk-overlap Overlap between chunks (default: 200)
--force Reindex all files, ignore cache
--no-dry-run Actually index files
--bucket S3 bucket for S3 Vectors backend
--profile AWS profile for S3 backend

Query Command

Option Description
--store Store name (required)
--top-k Number of results (default: 5)
--full Return full chunk content
--snippet-length Characters per snippet (default: 300)
--json JSON output
--stdin Read query from stdin

Global Options

Option Description
-v INFO level logging
-vv DEBUG level logging
-vvv TRACE level (library internals)

Development

make install        # Install dependencies
make test           # Run tests
make lint           # Run linting
make typecheck      # Type checking
make check          # All checks
make pipeline       # Full pipeline

License

MIT

Author

Dennis Vriend

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vector_rag_tool-0.1.0.tar.gz (235.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vector_rag_tool-0.1.0-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file vector_rag_tool-0.1.0.tar.gz.

File metadata

  • Download URL: vector_rag_tool-0.1.0.tar.gz
  • Upload date:
  • Size: 235.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vector_rag_tool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 efb7cdead414ee0c35272c4aabb463014b25b20e5462c060c38cfd170e1aaa41
MD5 37aa08a94f171c8a88af221163b4ffb6
BLAKE2b-256 1726889e92d566856a6aa91ea7befd32d8e8415718573e28b1c7852c7103b08b

See more details on using hashes here.

Provenance

The following attestation bundles were made for vector_rag_tool-0.1.0.tar.gz:

Publisher: publish.yml on dnvriend/vector-rag-tool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vector_rag_tool-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vector_rag_tool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b79aaf93b01e22e310315a04d75c32b9f9dccc6d82e015a59db50126497a8f28
MD5 95cd075210c3dccffe35864db3146694
BLAKE2b-256 28fffedfb3a1eef7cccea54972e5c383d615f2f1c0c4c831271aa3361a61a5f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for vector_rag_tool-0.1.0-py3-none-any.whl:

Publisher: publish.yml on dnvriend/vector-rag-tool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page