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.0.tar.gz (15.1 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.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cicada_vector-0.1.0.tar.gz
  • Upload date:
  • Size: 15.1 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.0.tar.gz
Algorithm Hash digest
SHA256 ab57d2bc6b9cc1a0b03afb89a164cf180a7156427076ede3a0d1fd065afc210f
MD5 d48a578587eaa667dbc5aeef117fd44a
BLAKE2b-256 6061177302d8aa590852078b650c3f28b760b90daa40d744b48fcf6ab6fd8c60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cicada_vector-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d80254f02bb6a0b3ab77dea3c93a2ea0bb031590c8c9ab6e90ccc01ea801ba0d
MD5 8baae179ad76297e8abafb48f2af10d5
BLAKE2b-256 6978828135a651504bf40a83ae319ae270da2c3f9450c9565bb8fd0ca0132709

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