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.2.tar.gz (14.9 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.2-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cicada_vector-0.1.2.tar.gz
  • Upload date:
  • Size: 14.9 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":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cicada_vector-0.1.2.tar.gz
Algorithm Hash digest
SHA256 98fa9473e7fededce82741002bbd51d870e69f1f249d6ea26bd29f1037216d32
MD5 a1f3db8b638f83b977e559f108cd1554
BLAKE2b-256 b1c55803493ac96b5630ede82985788491ef77207675c916ad3647b893ccb307

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cicada_vector-0.1.2-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":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cicada_vector-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dbe247ff4f8e7094448d9fdebdd1ea57ae21d69fc263391ba81887faed7566af
MD5 efafb0b3be13ba814f8fa72ab4e29828
BLAKE2b-256 4404c8fe94295ad7ba53189c65d7a47c91a20396de44fd8ab0658044a06285aa

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