Skip to main content

A poor man's vector database for Python. Zero dependencies, JSONL storage.

Project description

Cicada Vector 🦗

A lightweight semantic search engine for developers.

Cicada Vector is a simple, zero-dependency semantic search engine and RAG database. It explores a different approach to code intelligence: maximizing semantic awareness while minimizing complexity and dependencies.

Why this exists?

The original Cicada is powerful because it deeply understands code structure (SCIP, ASTs). However, that power often requires heavy dependencies and longer setup times.

Cicada Vector takes a complementary path: It focuses on Semantic Awareness and ease of use. By combining local LLM embeddings (via Ollama) with a hybrid database, it provides robust search capabilities with a minimal footprint.

Features

  • Lightweight: Minimal Python codebase. Zero dependencies (Standard Library only) for the core engine.
  • Instant Install: No waiting for heavy ML libraries to compile.
  • Semantic Intelligence: Understands intent. Searching for "auth" finds login logic, even if the word "auth" isn't present.
  • Hybrid Search: Combines Vector semantic search with Keyword exact matching. It won't miss specific identifiers like UserAuth_v2.
  • Simple RAG: A "Search Broad -> Scan Specific" pipeline that pinpoints relevant code snippets.
  • MCP Ready: Built-in Model Context Protocol server for immediate use with AI assistants.

Tools

1. cigrep (Zero-config Semantic Search)

The fastest way to search your code semantically. No setup needed.

cigrep "how do I handle authentication"

It automatically indexes changed files in the background and searches instantly.

MCP Server

AI assistants can use your local knowledge base directly:

Using uvx (Recommended):

# Start the server (stdio mode)
export CICADA_HYBRID_DIR=./my_db
uvx --from cicada-vector cicada-vec-server

Using pip:

pip install 'cicada-vector[server]'
export CICADA_HYBRID_HYBRID_DIR=./my_db
cicada-vec-server

Tools: search_vectors, search_hybrid, search_code_context, index_directory.

Quick Start

from cicada_vector import HybridDB

# Initialize
db = HybridDB("./my_knowledge_base")

# Add data (get vector from Ollama/OpenAI)
db.add(id="auth.py", vector=[...], text="def login()...", meta={"path": "..."})

# Search with confidence scores
results = db.search(query_text="login", query_vector=[...], k=5)
for id, score, meta in results:
    print(f"[{score:.4f}] Found {id}")

The Stack

  • Brains: Ollama (Recommended: nomic-embed-text)
  • Storage: JSONL (Human-readable, append-only)
  • Engine: Pure Python (with optional Numpy acceleration)

Part of the Cicada suite. Simple, effective code intelligence.

Project details


Download files

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

Source Distribution

cicada_vector-0.1.1.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

cicada_vector-0.1.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file cicada_vector-0.1.1.tar.gz.

File metadata

  • Download URL: cicada_vector-0.1.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cicada_vector-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f8306a70a669ff3365e7a2ed7dafb95534feb46b03624420cd37eb614b789ac6
MD5 6792722c0c0419594200e9ec7ac79e01
BLAKE2b-256 f897926899aa7c9df31d68cbd928a1406c529fa523cd30fd11946d3744be8557

See more details on using hashes here.

File details

Details for the file cicada_vector-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cicada_vector-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cicada_vector-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 81442da25389d6596e01bccfb7932c3903dd4a6eb671c49ff2d5945eb121ef3d
MD5 10f639dd46566c1241869c65eef2465f
BLAKE2b-256 a5275e2c0d5c610e4f765692046e85a25281fa1686f1ebe7429b3e66688d627c

See more details on using hashes here.

Supported by

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