code-info

Code Statistics

/_next/static/media/img.0lb3sarjwo9sz.png

code-info is a small CLI that analyzes a codebase and prints a short, colored summary of its files and languages. Everything runs locally, and no data is sent anywhere.

What it does

  • Counts files, total lines, code lines, blank lines, and size for a project.
  • Breaks the results down per language in a table.
  • Skips folders or glob patterns with --exclude.
  • Limits the scan to certain file extensions with --ext.
  • Can include files with unknown extensions using --unknown.
  • Works as code-info or the shorter cinfo, or without installing through npx.

Usage

npm install -g code-info
code-info src --cwd . --exclude node_modules .git --ext ts --ext js