--- id: pygount version: "3.2.0" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # pygount — count source lines of code (SLOC) using pygments License: permissive · Maintenance: active · Downloads: 719.8K/mo ## What it is and what it does Pygount is a command-line tool that scans directories or remote git repositories to count source lines of code (SLOC) across any programming language supported by pygments. It works similarly to sloccount and cloc but leverages pygments' language detection to analyze a wide range of file types without needing language-specific parsers. You run it from the shell to get per-file line counts, language summaries with percentages, or export results in cloc-compatible XML format for integration with CI/CD systems like Jenkins. It can analyze local folders, filter by file suffix, and even check out specific git revisions directly from remote URLs without cloning. Use it for: - Generate SLOC reports for code review or project metrics in CI/CD pipelines. - Compare code volume across multiple programming languages in a single repository. - Export metrics in cloc XML format for ingestion by Jenkins or other build tools. - Analyze remote git repositories directly without downloading the full clone. - Filter analysis to specific file types (e.g., only .py and .yml files) for focused metrics. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Pygount counts source lines of code (SLOC) across multiple programming languages by scanning folders or remote git repositories, using pygments for language detection. Yes. Pygount is a stable, actively maintained tool with low install friction, no known vulnerabilities, and permissive licensing. Install it if you need to measure code volume across multiple languages or integrate SLOC reporting into your build pipeline. ## Install pip install pygount uv add pygount poetry add pygount ## Installing pygount Before you install: Low friction install with a pure Python wheel. Actively maintained with a recent release (128 days ago) and an active repository; supports current Python versions (3.10–3.14). License in practice: BSD-3-Clause is permissive; you can use, modify, and distribute pygount freely in commercial and private projects with minimal restrictions. Quickstart: pip install pygount pygount ~/projects/example pygount --format=summary ~/projects/example ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 719.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags count lines of code, source code metrics, SLOC analysis tool, code line counter, pygments-based code analysis, repository code statistics, multi-language line counter, code-metrics, cli-tool [View on SkillFed](https://skillfed.io/packages/pygount) · [View on PyPI](https://pypi.org/project/pygount/)