AptLynx

Command-line tool

loc

brew/loc

Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev

Count lines of code quickly

At a glance

Type
Command-line tool
Install on
macOS, Linux
Last checked
25 Oct 2026, 21:09 UTC

Install it

macOS

brew install loc

Linux

brew install loc

Print lines of code in the current directory

loc

Print lines of code in the target directory

loc path/to/directory

Print lines of code with stats for individual files

loc --files

Related command-line tools

Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents