RAG tool with local FAISS and remote S3 Vectors backends, using Ollama embeddings
Project description
vector-rag-tool
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
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efb7cdead414ee0c35272c4aabb463014b25b20e5462c060c38cfd170e1aaa41
|
|
| MD5 |
37aa08a94f171c8a88af221163b4ffb6
|
|
| BLAKE2b-256 |
1726889e92d566856a6aa91ea7befd32d8e8415718573e28b1c7852c7103b08b
|
Provenance
The following attestation bundles were made for vector_rag_tool-0.1.0.tar.gz:
Publisher:
publish.yml on dnvriend/vector-rag-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vector_rag_tool-0.1.0.tar.gz -
Subject digest:
efb7cdead414ee0c35272c4aabb463014b25b20e5462c060c38cfd170e1aaa41 - Sigstore transparency entry: 742662564
- Sigstore integration time:
-
Permalink:
dnvriend/vector-rag-tool@79403daba947b3176cd394122f17f681ba7780d8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/dnvriend
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@79403daba947b3176cd394122f17f681ba7780d8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vector_rag_tool-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vector_rag_tool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 46.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b79aaf93b01e22e310315a04d75c32b9f9dccc6d82e015a59db50126497a8f28
|
|
| MD5 |
95cd075210c3dccffe35864db3146694
|
|
| BLAKE2b-256 |
28fffedfb3a1eef7cccea54972e5c383d615f2f1c0c4c831271aa3361a61a5f0
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vector_rag_tool-0.1.0-py3-none-any.whl -
Subject digest:
b79aaf93b01e22e310315a04d75c32b9f9dccc6d82e015a59db50126497a8f28 - Sigstore transparency entry: 742662566
- Sigstore integration time:
-
Permalink:
dnvriend/vector-rag-tool@79403daba947b3176cd394122f17f681ba7780d8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/dnvriend
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@79403daba947b3176cd394122f17f681ba7780d8 -
Trigger Event:
push
-
Statement type: