Find code by meaning, not just text. Search across codebases using natural language intent.
from code_search import CodeIndex, SemanticSearch
index = CodeIndex("/path/to/codebase")
index.build() # Parse AST, generate embeddings
search = SemanticSearch(index)
results = search.query("how is authentication handled?")
results = search.similar_to("src/auth/login.py:validate_token")
python3 scripts/search.py index /path/to/codebase
python3 scripts/search.py query "database connection setup"
python3 scripts/search.py similar src/db/connect.py:10
python3 scripts/search.py duplicates
共 1 个版本