

Display directory tree in one shot with file sizes, gitignore support, and commit history. Also supports MCP. Can be pasted directly into AI. Installable from npm and other package managers.
Automatically translated from Japanese by AI
Dirlens is a command-line tool that displays a directory tree with file sizes and operates without external dependencies.
It is also useful for reducing tokens when explaining directory contents to AI chats or when AI agents create file maps.
It also supports the Model Context Protocol.
It can be installed via npm or pip.
Update on 7/13: Migrated from Python to Rust. Not only has parsing accuracy improved, but behavior on Windows has become more stable.
Going forward, only the Rust version will be updated as a general rule. Please use the Rust version rather than installing from pip.
The Rust version is available from GitHub Releases, npm, crates.io, and other sources.
npm (Rust version)
npm install -g dirlens
pip (Python version - requires Python 3.8+)
pip install dirlens
⚠️ Caution
"Dirlens" is a CLI tool. It is not a desktop application. Please be careful not to confuse it with apps or tools with the same or similar names.
Reactions & commentsFeedback
Share your thoughts, bug reports, or suggestions directly with the developer
Log in to share your feedback
Log in to leave feedback