Submit a product

Sloc

Command-line tool that counts lines of source code by language

ToolWindowsOpen source

Sloc is a command-line tool for counting source lines of code. It reads files one at a time and separates code lines from comment lines and blank lines, then totals the results for each programming language. It suits developers who want a quick size measure of a codebase from a terminal.

It is built on .NET and installed as a global dotnet tool. The source code is public under the MIT License, so it can be read, modified and reused. Based on the listing data, it runs on Windows.

Alternatives to Sloc

Products that do a similar job in Developer Tools.

All alternatives

tokei

command-line tool that counts lines of code by language

ToolDeveloper Tools··Open source·15k

scc

command-line code counter with complexity and COCOMO estimates

ToolDeveloper Tools··Open source·8.9k

fzf

Command-line fuzzy finder for lists of files, history and any text

ToolDeveloper Tools··Open source·85k

lazygit

Terminal UI for running git commands with keyboard shortcuts

ToolDeveloper Tools··Open source·84k

ripgrep

command-line search tool that finds regex matches across directory trees

ToolDeveloper Tools··Open source·71k

Alacritty

GPU-accelerated terminal emulator for Linux, macOS, Windows and BSD

ToolDeveloper Tools··Open source·66k

bat

command-line file viewer with syntax highlighting and git integration

ToolDeveloper Tools··Open source·62k

GitHub CLI

Command line tool for working with GitHub from the terminal

ToolDeveloper Tools··Open source·47k