← 返回
未分类 中文

Semanticfs

Search your local filesystem and codebase semantically. Use instead of grep/find/ls/cat chains when looking for files, functions, symbols, or code patterns....
语义搜索本地文件系统和代码库,用于查找文件、函数、符号或代码模式,替代 grep/find/ls/cat 等命令链。
navneeth08k navneeth08k 来源
未分类 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 616
下载
💾 0
安装
1
版本
#filesystem#hybrid-search#latest#mcp#semantic-search

概述

SemanticFS Skill

SemanticFS provides semantic search over your local filesystem. Instead of running multiple grep/find/ls/cat commands to locate code or files, ask SemanticFS once and get back exact paths and line ranges.

When to use

Use this skill whenever you need to:

  • Find a file, function, class, or symbol by name or description
  • Locate where a concept is implemented (e.g. "authentication logic", "error handling for uploads")
  • Navigate an unfamiliar codebase without reading every file
  • Replace a chain of grep, find, ls, or cat commands

Do not use this skill if:

  • The directory hasn't been indexed yet (run semanticfs index build first)
  • You need to write or modify files (SemanticFS is read-only)

Prerequisites

SemanticFS must be installed and the target directory must be indexed:

# Install (Linux/macOS)
curl -sSfL https://raw.githubusercontent.com/Navneeth08k/semanticFS/main/scripts/install.sh | bash

# Index your workspace
semanticfs --config ~/semanticfs.toml index build

Starting the server

SemanticFS must be running before you can search:

# Start HTTP server (runs in background)
semanticfs --config ~/semanticfs.toml serve mcp &

# Check it's up
curl -s http://localhost:9464/health/live && echo "SemanticFS is running"

If you get a connection refused error, the server is not running. Start it with the command above.

Searching the codebase

Replace grep -r "pattern" . with:

curl -s -X POST http://localhost:9464/search \
  -H "Content-Type: application/json" \
  -d '{"query": "YOUR QUERY HERE", "limit": 10}' \
  | python3 -c "
import sys, json
data = json.load(sys.stdin)
for r in data.get('hits', []):
    print(f\"{r['path']}:{r['start_line']}-{r['end_line']}  {r.get('snippet','')[:100]}\")
"

Example queries:

  • "Python function signature extraction"
  • "CLI argument parsing entry point"
  • "database connection pool"
  • "error handling file upload"
  • "AuthService login method"

Getting a directory map

Replace ls -la src/ or tree src/ with:

curl -s "http://localhost:9464/map?path=src" \
  | python3 -c "import sys, json; print(json.dumps(json.load(sys.stdin), indent=2))"

Use path=. for the workspace root.

Output format

Search results are returned as:

path/to/file.py:40-95  extract_signatures_python — extracts function signatures from...

Each result includes:

  • path: file path relative to workspace root
  • start_line / end_line: exact line range containing the relevant code
  • snippet: short excerpt of the matching content

Always read the specific lines from the file to verify before acting on them.

Guardrails

  • SemanticFS is read-only — it never modifies files
  • Only searches directories that have been indexed (semanticfs index build)
  • If results look wrong, re-run semanticfs index build to refresh
  • Index automatically includes only source files (excludes node_modules, .venv, target/, .git, etc.)

Troubleshooting

No results returned:

  • Check the index was built: semanticfs --config ~/semanticfs.toml health
  • Try a broader query (e.g. "authentication" instead of "JWT token refresh logic")

Connection refused:

  • Start the server: semanticfs --config ~/semanticfs.toml serve mcp &

Stale results after code changes:

  • Re-index: semanticfs --config ~/semanticfs.toml index build
  • Or run incremental update: semanticfs --config ~/semanticfs.toml index update

Diagnose the full setup:

semanticfs --config ~/semanticfs.toml doctor

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-02 03:58 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 679 📥 327,930
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 182,002
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,721