NC

neuralnotwerk/cgg

Developer tools

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

47 stars 品質 72 トレンド 20NOASSERTION

Rustのオフラインマルチ言語コールグラフジェネレータ — 任意のフォルダにポイントし、グラフを取得します.

概要

cgg はソースコードからコールグラフを生成します。 ディレクトリにそれを置き、人魚図を取得します。 言語サーバー、ビルドステップなし、設定なし - 1つのバイナリ、インスタント結果。 主出力は — エージェントをコーディングするフォーマット (Copilot, Claude, Cursor, Aiderなど) は、コードベースを渡る関数が互いに呼び出す方法を理解するために、コンテキストで直接読み込むことができます。 エージェントが「この関数を呼び出しているのか」や「この関数が依存しているのか」を知る必要がある場合、cggはエージェントが既に理解している形式で回答します。 (クロードコード、キロ、クライン、ロオコード、OpenCode、カーザー、エイダー、コピロット、続き、ウインドサーフィン、グース、...):ジャンプする。 スキルに基づく3つのバンドルされたスキル/は、cggの使用、インストール、拡張方法を教えます。スクリプト/install-skill.shは、設定にドロップします.

概要(AI 翻訳)

[cgg はソースコードからコールグラフを生成します。 ディレクトリにそれを置きます, 人魚図を取得します。 言語サーバー無し、造りのステップ無し 構成 — 1つのバイナリ、即刻の結果。

主出力は人魚フローチャートです。 エージェント(コピロット、クロード、カーソル、エイダーなど)は、直接読み込むことができます。 コンテキストは、コードベースで互いに関数が呼ばれる方法を理解する。 エージェントが「この関数を呼び出しているのか」や「何をすべきか」を知らなければならないとき この関数は依存していますか? [cgg] は、既にエージェントのフォーマットで応答します お問い合わせ

このファイルを読むエージェント(クロードコード、キロ、クライン、ロオコード、 OpenCode、Cursor、Aider、Copilot、 Continue、Windsurf、Goose、…: コーディングエージェントのためににジャンプします。 [skills/の下の3つのバンドルされたスキルは、使用方法、インストールおよび [cgg を継承します。[scripts/install-skill.sh]]] は、設定にドロップします。

なぜ人魚?

人魚図は:

-エージェントで読みやすく — プレーンテキスト、バイナリ形式なし、プロンプトで収まる

  • 人間によってレンダリング可能 — GitHub、GitLab、VSコード、およびすべての主要な markdownビューアはインラインをレンダリングします -Filterable — [--filter + [[-n]] 正確に抽出することができます 特定のタスクのエージェントのニーズをサブグラフ

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

README

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

cgg — Call Graph Generator

cgg generates call graphs from source code. Point it at a directory, get a mermaid diagram. No language server, no build step, no configuration — one binary, instant results.

The primary output is mermaid flowcharts — a format that coding agents (Copilot, Claude, Cursor, Aider, etc.) can read directly in context to understand how functions call each other across a codebase. When an agent needs to know “what calls this function?” or “what does this function depend on?”, cgg answers in a format the agent already understands.

Agents reading this file (Claude Code, Kiro, Cline, Roo Code, OpenCode, Cursor, Aider, Copilot, Continue, Windsurf, Goose, …): jump to For coding agents — read this. Three bundled skills under skills/ teach you how to use, install and extend cgg; scripts/install-skill.sh drops them into your config.

Why mermaid?

Mermaid diagrams are:

  • Readable by agents — plain text, no binary formats, fits in a prompt
  • Renderable by humans — GitHub, GitLab, VS Code, and every major markdown viewer renders them inline
  • Filterable — --filter + -n lets you extract exactly the subgraph an agent needs for a specific task
  • Diffable — text output means call graph changes show up in PRs

Other formats (JSON, DOT, GraphML) are available for toolchain integration, but mermaid is the default because it works everywhere with zero setup.

Quick start

cargo install cgg                 # from crates.io
cargo install --path crates/cgg   # or from a clone
cgg ./src -o graph.mmd

That’s it. graph.mmd is a mermaid flowchart you can paste into any markdown file, feed to an agent, or render in a viewer.

Prebuilt binaries, pip, npm and building from source are all covered in INSTALL.md, with the exact package list each one needs — verified by installing into bare containers.

Give an agent context about a module

# "Here's how the auth module works"
cgg ./src --filter 'auth::' -n 1 -o auth-graph.mmd

Trace all paths through a function

# "Show me every call chain that passes through process_order"
cgg ./src --filter 'process_order' -n 0 -o paths.mmd

Full project graph as structured JSON

cgg ./src -t json -o graph.json

Review the call surface of a PR

# Every entry-to-exit path passing through anything you changed
# in this branch — perfect for "what could this PR break?" reviews.
cgg ./src --since main..HEAD -n 0 -o pr-surface.mmd

# Or a 2-hop neighborhood around your last 5 commits.
cgg ./src --since HEAD~5 -n 2 -o recent.mmd

--since shells out to git diff and turns every callable whose body overlaps a changed line range into a --filter seed. It adds to any explicit --filter you also pass. Files that changed but produced no seeds (deletions, comment-only edits, non-source

GitHub で README 全文を見る

推奨ツール

別のキーワードを試すか、フィルタを外してください。

インストール

npx skillfish add neuralnotwerk/cgg
MCP 初心者?mcpskill.org のガイドから始めましょう →