← 返回
未分类 中文

Semantic Code Search

Semantic search engine for codebases that understands intent and finds functionally similar code. Use when searching code by meaning rather than text, findin...
语义搜索引擎,用于代码库,理解意图并找出功能相似的代码,适用于按含义而非文本搜索代码的场景。
evezart
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 259
下载
💾 0
安装
1
版本
#latest

概述

Semantic Code Search

Find code by meaning, not just text. Search across codebases using natural language intent.

Quick Start

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")

How It Works

  1. Parse — Walk codebase, extract functions/classes with AST
  2. Embed — Generate vector embeddings from code + docstrings
  3. Index — Store in vector index with metadata (file, line, type)
  4. Search — Query by intent or find similar code

Search Types

  • Intent search: "find error handling patterns" → returns matching code
  • Similarity search: Given a function, find others doing the same thing
  • Structural search: Find all functions matching a call pattern
  • Duplicate detection: Find code doing the same thing differently

CLI

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 个版本

  • v1.0.0 当前
    2026-05-13 07:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Cross Domain Engine

evezart
利用EVEZ OODA循环架构发现不同研究领域的隐藏关联,用于寻找跨领域新关联、检测...
★ 0 📥 301

Evez Skill Vetter

evezart
在安装前对OpenClaw技能进行安全审查。用于评估第三方技能的安全性、检查权限范围、检测可疑行为。
★ 0 📥 293

Agent Memory Layer

evezart
可扩展的AI代理记忆系统,支持短期、长期和情景记忆,用于构建代理记忆持久化和对话上下文管理。
★ 0 📥 356