git404hub

what is sloc fr?

bybrooklyn/sloc — explained in plain English

Analysis updated 2026-05-18

0RustAudience · developerComplexity · 2/5Setup · easy

tl;dr

A fast command line tool for counting lines of code across projects, built in Rust on top of the tokei library, with a memory of previously checked projects.

vibe map

mindmap
  root((sloc))
    What it does
      Counts lines of code
      Uses tokei library
      Remembers projects
    Tech stack
      Rust
      Cargo
      tokei
    Use cases
      Check project size
      Compare multiple projects
      Remove saved projects
    Audience
      Developers
      CLI users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Count lines of code across one or more project folders from the command line.

VIBE 2

Save a list of projects so you can re-check their line counts without retyping paths.

VIBE 3

Quickly compare code size across several personal or work projects.

VIBE 4

Disable colored output in scripts or non-interactive terminals using NO_COLOR.

what's the stack?

Rusttokei

how it stacks up fr

bybrooklyn/sloc04amanrajj/netwatch0xr10t/pulsefi
Stars000
LanguageRustRustRust
Setup difficultyeasymoderatehard
Complexity2/53/54/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

Requires Rust and Cargo installed to build, then adding the binary to your shell PATH.

in plain english

This is a small command line tool called sloc that counts lines of code in your programming projects. Instead of writing its own counting logic, it uses an existing library called tokei to do the actual counting work, and focuses on making the everyday experience of checking project sizes quick and pleasant. Once installed, you run the sloc command followed by one or more folder paths, and it reports how many lines of code are in each project, with project names shown in blue, the counts in white, and separate colors for code versus Markdown documentation. If your terminal does not support colors, or you simply prefer plain text, you can turn the colors off by setting an environment variable called NO_COLOR. A notable feature is that sloc remembers the projects you have pointed it at. After you add a project once, running sloc by itself with no arguments will report on every project it has saved, so you do not need to retype paths each time. You can remove a saved project from this list with a remove command followed by its path. To install it, you build the tool with Cargo, the standard Rust build tool, then run its own install command to place the compiled program somewhere on your system path so you can call it from any folder. The README is intentionally short and only documents the command line usage shown above. There is no mention of a license, and the readme humorously notes it was written by an AI system in a matter of minutes, so this appears to be a small personal utility rather than a maintained open source project with broader ambitions.

prompts (copy fr)

prompt 1
Show me how to install and run this sloc tool on my own Rust projects using the steps in this README.
prompt 2
Explain how the saved project registry in this tool works, based on what the README describes.
prompt 3
Help me write a shell alias that runs sloc on a few of my most used project folders.
prompt 4
Compare what this tool adds on top of the tokei library it is built on.

Frequently asked questions

what is sloc fr?

A fast command line tool for counting lines of code across projects, built in Rust on top of the tokei library, with a memory of previously checked projects.

What language is sloc written in?

Mainly Rust. The stack also includes Rust, tokei.

How hard is sloc to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is sloc for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.