LENS — 03 / SOURCE TREE INVENTORY
Lens
Understand your project.Before you change it.
A fast, offline command-line tool.Point it at a directory and readits files, languages, sizes and shape.
- PURPOSE
- A Rust CLI for inspecting source trees, files, directories, languages, sizes, and project structure.
- STACK
- RUST
- CLAP
- SERDE
- JSON
- STATUS
- WORKING CLI · v0.1.0
- Cargo.lock11.60 KB
- LICENSE11.09 KB
- README.md5.48 KB
- src/output/terminal.rs3.07 KB
- src/output/files.rs2.50 KB
- src/scanner/walker.rs2.35 KB
- src/output/dirs.rs2.17 KB
- src/search.rs1.79 KB
DATA: lens files --format json ON THE LENS REPOSITORY (v0.1.0)
01 / THE PROBLEM
Unfamiliar code arrives without a map.
Before changing a project you need to know what is in it: how big it is, which languages it uses, where the largest files are, how it is laid out, and what state its Git history is in.
02 / THE IDEA
One command. A compact inventory.
Run lens in a directory and get a summary of files, directories, size, lines, extensions, languages, largest files, Rust package details and Git state — with sorting, a tree view, search, and JSON output for scripts.
03 / THE BUILD
Rust, clap, and a respectful walker.
Lens is a Rust 2024 crate. A scanner walks the tree while honouring ignore rules, analyzers read languages, Rust manifests and Git, and output renders to the terminal or JSON. Unit tests cover sorting, line counting and size formatting.
IN USE / REAL OUTPUT
One command, a compact inventory.
Project Summary
===============
Name lens
Files 27
Directories 5
Size 52.89 KB
Lines 2159
Languages
---------
Rust 21 files 1079 lines
Markdown 1 file 403 lines
TOML 1 file 14 lines
Rust Project
============
Package lens
Version 0.1.0
Edition 2024lensproject summarylens files --sort size --reversefiles by sizelens dirs --sort linesdirectories by lineslens treeproject treelens search Cargo --format jsoncase-insensitive search as JSONlens gitbranch, status, commits, remote
REPOSITORY STATUS
WORKING CLI · v0.1.0
Builds from source with cargo. Commands: summary, files, dirs, largest, tree, search, languages, rust and git. JSON output for files, dirs and search.
GITHUB.COM / METHUOS / LENS