Transform any project directory into a beautiful markdown overview. Perfect for documentation, onboarding new team members, or simply understanding how a codebase is organised.
Quick Start
Get stunning project overviews in seconds with these simple prompts:
Can you give me an overview of this project structure? C:/my-react-app
Use houtini-lm to count files and analyse the structure of C:/my-project with comprehensive analysis
Please generate a directory tree with architectural insights for C:/enterprise-app
Instant Visual Impact
Perfect for README files, documentation, and giving stakeholders a clear picture of your project's organisation.
What It Does
count_files
is like having an intelligent assistant walk through your entire project and create beautiful documentation about its structure. It goes far beyond a simple directory listing - it provides architectural insights and organisation recommendations.
Here's what makes it special:
- Beautiful markdown trees - Perfect for pasting into README files
- File statistics - Total counts, largest files, technology detection
- Architecture insights - Pattern recognition and structural analysis
- Technology identification - Automatically detects frameworks, languages, and tools
- Organisation recommendations - Suggestions for improving project structure
Whether you're onboarding new developers, preparing documentation, or trying to understand a complex codebase, this function creates the perfect starting point for exploring any project.
Parameters
Customise your project analysis to get exactly the insights you need:
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
projectPath |
string | Yes | - |
Path to the project directory you want analysed Example:
"C:/my-react-app" or "/home/user/projects/api" |
maxDepth |
number | No | 3 |
How many directory levels deep to analyse (1-5) Start with 3, increase to 4-5 for large projects
|
analysisType |
string | No | "comprehensive" |
Focus: "structure", "counts", "comprehensive" "comprehensive" gives you architectural insights and recommendations
|
analysisDepth |
string | No | "detailed" |
Analysis detail level: "basic", "detailed", "comprehensive" "detailed" perfect for most projects, "comprehensive" for large codebases
|
Real-World Examples
Here's how to use count_files for different types of projects:
React Application Overview
houtini-lm:count_files with:
- projectPath: "C:/my-react-app"
- maxDepth: 3
- analysisType: "comprehensive"
Large Enterprise Project
houtini-lm:count_files with:
- projectPath: "C:/enterprise-platform"
- maxDepth: 4
- analysisDepth: "comprehensive"
- analysisType: "comprehensive"
Quick Structure Check
houtini-lm:count_files with:
- projectPath: "C:/new-project"
- maxDepth: 2
- analysisDepth: "basic"
Documentation Generation
houtini-lm:count_files with:
- projectPath: "C:/open-source-lib"
- maxDepth: 3
- analysisType: "structure"
What You Get Back
The analysis creates beautiful, informative output that's perfect for documentation:
📁 Beautiful Directory Trees
📁 my-react-app/
├── 📁 src/ (45 files)
│ ├── 📁 components/ (12 files)
│ │ ├── 📄 Header.tsx
│ │ ├── 📄 UserCard.tsx
│ │ └── 📄 Navigation.tsx
│ ├── 📁 hooks/ (8 files)
│ ├── 📁 utils/ (5 files)
│ └── 📄 App.tsx
├── 📁 public/ (3 files)
├── 📁 tests/ (15 files)
└── 📄 package.json
Statistics: 63 files, 15 directories
Technologies: React, TypeScript, Tailwind CSS
Largest Files: UserService.ts (2.5KB), App.tsx (1.8KB)
📊 Project Statistics
- File counts - Total files and per-directory breakdowns
- Directory structure - Hierarchical organisation overview
- Technology detection - Frameworks, languages, and tools identified
- Size analysis - Largest files and directories highlighted
- File type distribution - TypeScript, JavaScript, CSS, etc.
🏗️ Architecture Insights
- Pattern recognition - MVC, component-based, microservices
- Organisation assessment - Well-structured vs needs improvement
- Conventions analysis - Naming patterns and standards
- Scaling considerations - Suggestions for growing projects
README Ready
The markdown output is perfectly formatted for copying directly into README files, documentation, or project wikis.
Perfect Use Cases
Here's when count_files becomes your go-to tool:
📚 Documentation & Onboarding
Create beautiful project overviews for README files, technical documentation, and new developer onboarding. Help people understand your project structure at a glance.
🔍 Codebase Exploration
Just inherited a complex project? Get your bearings quickly with a comprehensive structural overview that highlights the most important directories and files.
🏗️ Architecture Reviews
Present project structure to stakeholders, technical leads, or during architectural planning sessions. Perfect for showing how a codebase is organised.
📋 Project Audits
Assess project organisation quality, identify structural issues, and get recommendations for improvement during code reviews or technical audits.
📊 Progress Tracking
Compare project structure over time, track growth, and document how your codebase evolves as features are added.
🤝 Client Presentations
Show clients or project managers how their application is structured in a visual, easy-to-understand format that builds confidence.
Best Practices
Get the most valuable insights from your project analysis:
🎯 Choose the Right Depth
- maxDepth: 2 - Quick overview, perfect for small projects
- maxDepth: 3 - Standard depth, works for most projects
- maxDepth: 4-5 - Deep analysis, use for large enterprise codebases
📖 Match Analysis to Purpose
- "structure" + "basic" - Quick README documentation
- "comprehensive" + "detailed" - Team onboarding and exploration
- "comprehensive" + "comprehensive" - Architecture reviews and audits
⚡ Performance Considerations
- Start small - Use maxDepth: 2-3 first, then increase if needed
- Large projects - Use "basic" analysisDepth initially
- Node modules - The tool automatically excludes common build directories
📋 Documentation Workflow
- Generate the structure overview with count_files
- Copy the markdown output to your README or docs
- Add project-specific context and explanations
- Update periodically as your project grows
Pro Tip
For the best architectural insights, use comprehensive analysis on well-organised projects. You'll get specific recommendations about patterns and improvements.
Troubleshooting
Common issues and how to solve them:
Output is too overwhelming or too detailed
The directory tree is too large or includes too much information.
- Reduce
maxDepth
to 2 or 3 for large projects - Use
analysisDepth: "basic"
for simpler output - Try
analysisType: "structure"
for just the tree without insights - Consider analysing subdirectories separately
Missing files or directories in the output
Some expected files or folders aren't showing up in the analysis.
- Increase
maxDepth
if files are nested deeper - Check file permissions - ensure read access to all directories
- Hidden files and common build directories are automatically excluded
- Verify the project path is correct and accessible
Analysis takes too long for large projects
The function seems to hang on very large codebases.
- Start with
maxDepth: 2
andanalysisDepth: "basic"
- Ensure your LM Studio model has sufficient memory
- Try analysing specific subdirectories instead of the entire project
- Close other applications to free up system resources
Architecture insights are generic or unhelpful
Not getting useful architectural recommendations or pattern recognition.
- Use
analysisDepth: "comprehensive"
for detailed insights - Ensure you're using
analysisType: "comprehensive"
- Try with a larger model (13B+ parameters) for better analysis
- Well-organised projects get better insights than messy ones
Path not found or permission errors
Getting errors about paths not existing or access being denied.
- Use absolute paths:
C:/project
not./project
- Verify the path exists and you have read permissions
- Check that the path is within your
LLM_MCP_ALLOWED_DIRS
- On Windows, use forward slashes or double backslashes in paths