BC

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

1080 stars 23 forks 品質 76 トレンド 43MIT

codespelunker - コード構造を理解し、関連性で結果をランク付けするCLIコード検索ツール。CLI、TUI、MCP、HTTP対応によりインデックス作成は不要です。

概要

CSパワー searchcode.com — AIエージェント向けに構築された、あらゆるリポジトリ上の構造化されたコードインテリジェンスです。 authenticateで検索して、設定ファイルやコメント、テストスタブから200件も結果が出て、実際の実装を見つけることはありませんか?CSがそれを解決します。 これはCLIツールの高速さと、通常はSourcegraphやZoektのような重度インデックス検索エンジンに限られる関連性ランキングを組み合わせていますが、インデックスの管理を必要としません。 [//]: # ([![asciicast](https://asciinema.org/a/589640.svg)](https://asciinema.org/a/589640)) https://github.com/user-attachments/assets/3b7f4bb2-d542-406d-9c53-29c0430dd60a ほとんどの検索ツールはコードをプレーンテキストとして扱います。CSはそうではありません。 すべてのファイルをリアルタイムで解析し、コメント、文字列、コードの区別を行い、その構造を使って関連性で順位付けします。単に発生順にリストアップするのではなく。 インタラクティブ探索用のTUIモードとHTTPモードが付属しています。

概要(AI 翻訳)

CSは searchcode.com 力を発揮します — AIエージェント向けに構築された、あらゆるリポジトリの上に構造化されたコードインテリジェンスです。

コード構造を理解し、関連性で結果をランク付けするCLIコード検索ツール。インデックス作成は不要です

authenticateを検索して、設定ファイルやコメント、テストスタブから200件の結果が出てから実際の実装を見つけたことはありますか?csはそれを解決します。

これはCLIツールの高速さと、通常は重度インデックス検索エンジンに限られる関連性ランキングを組み合わせています SourcegraphやZoektのように、インデックスを管理する必要はありません。

MITのライセンスを受けています。

[//]: # ([

CS TUIデモ

ピッチ:なぜCSを使うの?

ほとんどの検索ツールはコードをプレーンテキストとして扱います。csはそうではありません。

すべてのファイルをリアルタイムで解析し、コメント、文字列、コードの区別を行います そしてその構造を使って、単に発生順に並べるのではなく、関連性で順位付けします。

インタラクティブ探索用のTUIモードとHTTPモードが付属しています。

リップグレップやグレップと何が違うの?

ripgrepは高速テキストマッチャーです。行を見つけて印刷します。この技術は最高です。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

codespelunker (cs)

cs powers searchcode.com — structured code intelligence over any repo, built for AI agents.

CLI code search tool that understands code structure and ranks results by relevance. No indexing required

Ever searched for authenticate and gotten 200 results from config files, comments, and test stubs before finding the actual implementation? cs fixes that.

It combines the speed of CLI tools with the relevance ranking usually reserved for heavy indexed search engines like Sourcegraph or Zoekt, but without needing to maintain an index.

cs "authenticate" --gravity=brain           # Find the complex implementation, not the interface
cs "FIXME OR TODO OR HACK" --only-comments  # Search only in comments, not code or strings
cs "error" --only-strings                   # Find where error messages are defined
cs "handleRequest" --only-declarations      # Jump straight to where it's defined
cs "handleRequest" --only-usages            # Find every call site, skip the definition
cs "error" --dedup                          # Collapse duplicated matches into one result

Licensed under MIT.

cs TUI demo

Pitch: Why use cs?

Most search tools treat code as plain text. cs doesn’t.

It parses every file on the fly to understand what is a comment, what is a string, and what is code then uses that structure to rank by relevance, not just list them by occurrence.

cs "authenticate"                    # BM25-ranked variant results, best match first
cs "authenticate" --gravity=brain    # Boost complex implementations over interfaces
cs "TODO" --only-comments            # Only matches inside comments
cs "error" --only-strings            # Only matches inside string literals
cs "config OR setup" lang:go         # Boolean queries with language filters
cs "handleRequest" --only-declarations  # Jump to definitions (func, class, def, etc.)
cs "config" --dedup                     # Collapse byte-identical matches

It comes with a TUI and HTTP mode for Interactive Exploration.

cs      # enter TUI mode from this location
cs -d   # enter HTTP mode on port 8080 by default

What makes it different from ripgrep or grep?

ripgrep is a fast text matcher. It finds lines and prints them. It’s the best at what it does.

cs is a search engine. It finds files, ranks by relevance, extracts the best snippet, and shows the most relevant results. Think Sourcegraph-quality ranked search as a CLI tool, no index required.

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "codespelunker": { "command": "/path/to/cs", "args": ["--mcp", "--dir", "/path/to/codebase"] } } }