SherlockIO
⚡ Fast and accurate language detection CLI tool that analyzes your codebase while automatically filtering out dependencies, build artifacts, and cache files.
How It Works
Sherlock uses a two-stage intelligent filtering system:
-
Smart Filtering: Automatically skips non-source files using sophisticated pattern matching
- Dependencies:
node_modules/,venv/,vendor/,target/ - Build artifacts:
dist/,build/,__pycache__/,.classfiles - IDE/Editor files:
.vscode/,.idea/,.git/ - 25+ language ecosystems with deep knowledge of their tooling
- Dependencies:
-
Language Detection: Identifies programming languages using multiple methods
- File extensions (
.py,.js,.rs, etc.) - Content analysis (shebangs, syntax patterns)
- Special files (
Dockerfile,Makefile,package.json) - 100+ supported languages with accurate classification
- File extensions (
Result: Analyze only your actual source code, not the noise!
Installation
# Install from crates.io (recommended)
# Or build from source
Usage
# Analyze current directory
# Analyze specific directory
# Set depth limit
# Output formats
# Options
Example Output
Language Detection Report
Total Files: 127 (filtered from 50,000+ files)
Total Size: 2.3 MB
Language Files Percentage Size Bar
──────────────────────────────────────────────────────────────────────
Rust 45 35.4% 1.2 MB ███████████████░░░░░ 35.4%
JavaScript 32 25.2% 654.2 KB ██████████░░░░░░░░░░ 25.2%
TypeScript 18 14.2% 423.1 KB █████░░░░░░░░░░░░░░░ 14.2%
JSON 12 9.4% 89.4 KB ███░░░░░░░░░░░░░░░░░ 9.4%
Markdown 8 6.3% 45.2 KB ██░░░░░░░░░░░░░░░░░░ 6.3%
Notice: Only source files analyzed - dependencies, build artifacts, and cache files automatically filtered out!
What Gets Filtered Out
SherlockIO automatically ignores these non-source files:
Dependencies & Packages
node_modules/,venv/,vendor/,target/,deps/__pycache__/,.pytest_cache/,.gradle/,.m2/
Build Artifacts
dist/,build/,out/,bin/,*.class,*.o,*.so.next/,.nuxt/,coverage/,*.min.js
IDE & Editor Files
.vscode/,.idea/,.git/,.DS_Store- Lock files:
package-lock.json,yarn.lock,Cargo.lock
Supported Languages (100+)
- Programming: Rust, Python, JavaScript, TypeScript, Go, Java, C/C++, C#, PHP, Ruby, Swift, Kotlin, Scala, Haskell, Elixir, Clojure, and more
- Web: HTML, CSS, SCSS, Vue, React (JSX/TSX), Svelte
- Data: JSON, YAML, TOML, XML, SQL, GraphQL
- Config: Dockerfile, Makefile, CMake, Gradle
- Documentation: Markdown, reStructuredText, AsciiDoc
License
MIT License