Drive an installed LaRuche App through its declared actions, never its files.
中文简介正在准备中。当前显示原文说明。
Measure a codebase: lines of code, language mix, and symbol lookups.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using pygount. Run all commands via shell_exec.
Counting tells you the shape of a repository. To understand a specific symbol, use lsp,
which asks the real language server instead of guessing from text.
lsp requires all four arguments: operation, file, line and character. There is
no default position, and an approximate one returns an answer about the wrong symbol.
goToDefinition: where this symbol is actually defined.findReferences: every call site, which is what you need before changing a signature.hover: the resolved type and documentation.Locate the symbol first with file_search or grep, take the exact line and column from
that result, then call lsp. Supported servers are rust-analyzer and
typescript-language-server; on a project in another language, fall back to text search.
pip install --break-system-packages pygount 2>/dev/null || pip install pygount
cd /path/to/repo && pygount --format=summary \
--folders-to-skip=".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,.next,.tox,.eggs,vendor,third_party" \
.
CRITICAL: Always pass --folders-to-skip. Without it, pygount crawls dependency/build directories and can hang for minutes on large repos.
Project-type additions to --folders-to-skip:
.mypy_cache,.tox,.eggs.turbo,coverage# Python only
pygount --suffix=py --format=summary .
# Python + YAML
pygount --suffix=py,yaml,yml --format=summary .
Use --suffix on large monorepos to avoid scanning irrelevant file types.
# Per-file breakdown (default format, no --format flag)
pygount --folders-to-skip=".git,node_modules,venv" .
# Top 20 files by code lines (Linux/macOS)
pygount --folders-to-skip=".git,node_modules,venv" . | sort -t$'\t' -k1 -nr | head -20
On Windows, skip the sort pipe - use JSON output and post-process instead (see §4).
pygount --format=json --folders-to-skip=".git,node_modules,venv" . > loc_report.json
Then use execute_code (Python) to parse and aggregate, or file_write to save and pass downstream. Example aggregation:
import json, collections
data = json.load(open("loc_report.json"))
by_lang = collections.defaultdict(lambda: {"files": 0, "code": 0, "comment": 0})
for entry in data:
lang = entry.get("language", "__unknown__")
by_lang[lang]["files"] += 1
by_lang[lang]["code"] += entry.get("code", 0)
by_lang[lang]["comment"] += entry.get("documentation", 0)
for lang, stats in sorted(by_lang.items(), key=lambda x: -x[1]["code"])[:10]:
print(f"{lang}: {stats['code']} code, {stats['comment']} comment ({stats['files']} files)")
| Column | Meaning |
|---|---|
| Language | Detected language |
| Files | File count |
| Code | Executable/declarative lines |
| Comment | Comment/doc lines |
| % | Share of total |
Special pseudo-languages: __empty__, __binary__, __generated__, __duplicate__, __unknown__.
--folders-to-skip - crawls node_modules/venv and hangs. Always include it.wc -l for raw line counts.--suffix to avoid scanning everything.pygount --version.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Drive an installed LaRuche App through its declared actions, never its files.
中文简介正在准备中。当前显示原文说明。
Find academic papers on arXiv, with citation counts and BibTeX.
中文简介正在准备中。当前显示原文说明。
Render text or an image as ASCII art for terminal-friendly output.
中文简介正在准备中。当前显示原文说明。
Track RSS/Atom feeds and blogs via blogwatcher-cli.
中文简介正在准备中。当前显示原文说明。
Drive a real web browser: navigate, read, find, click, fill, screenshot
中文简介正在准备中。当前显示原文说明。
Store, find and curate lasting facts in the cognitive memory map.
中文简介正在准备中。当前显示原文说明。