File size: 8,918 Bytes
d466b7d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# Dir2md Feature Comparison: Open Source vs Pro

> **Transform your codebase into LLM-optimized markdown blueprints**

Dir2md follows an **Open-Core** model - providing essential functionality for free while offering advanced features for professional teams and power users.

## 🎯 Quick Comparison

| Feature Category | Open Source (Free) | Pro Version |
|------------------|-------------------|-------------|
| **Basic Functionality** | βœ… Full Access | βœ… Enhanced |
| **Security & Masking** | βœ… Basic Patterns | βœ… Advanced + Custom |
| **Performance** | βœ… Single-threaded | βœ… Parallel + Caching |
| **Export Options** | βœ… Markdown Only | βœ… HTML, PDF, Slides |
| **Team Features** | ❌ Individual Use | βœ… CI/CD Integration |
| **Language Support** | βœ… Basic Analysis | βœ… Smart Plugins |

---

## πŸ”“ Open Source Features (MIT License)

### Core Functionality
- **πŸ“ Directory Scanning**: Complete file tree analysis with `.gitignore` support
- **🎯 Smart Filtering**: Include/exclude/omit glob patterns
- **πŸ“Š Token Optimization**: Head/tail sampling with configurable budgets
- **πŸ”„ Duplicate Detection**: SimHash-based content deduplication 
- **πŸ“‹ Manifest Generation**: JSON metadata with file hashes and statistics
- **⏰ Deterministic Output**: `--no-timestamp` for reproducible builds
- **🎨 Multiple Presets**: `iceberg`, `pro`, `raw` (default: `raw` for developers)

### Basic Security
- **πŸ›‘οΈ Essential Masking**: Protection for common secrets
  - AWS Access Keys (`AKIA[0-9A-Z]{16}`)
  - Bearer Tokens (`Bearer <token>`)
  - Private Keys (`-----BEGIN ... PRIVATE KEY-----`)

### Output Modes
- **πŸ“ Reference Mode**: File listings with metadata
- **πŸ“– Summary Mode**: Condensed content overview
- **πŸ“„ Inline Mode**: Full content inclusion (within token budget)

### CLI & Integration
- **⚑ Command Line Interface**: Full-featured CLI with help system
- **πŸ”§ Configurable Options**: Extensive customization via arguments
- **πŸ“¦ Easy Installation**: `pip install dir2md`

---

## πŸ”’ Pro Version Features

### Advanced Security & Compliance
- **πŸ›‘οΈ Comprehensive Masking**: 25+ built-in patterns
  - Cloud Provider Keys (AWS, Azure, GCP)
  - API Tokens (Slack, GitHub, GitLab)
  - Database Connections & Credentials
  - Custom Pattern Support
- **πŸ” Smart Detection**: File-type aware masking
- **βœ… False Positive Reduction**: Context-aware pattern matching
- **πŸ“ Audit Logging**: Security scanning reports

### Performance & Scale
- **⚑ Parallel Processing**: Multi-threaded file analysis
- **πŸ’Ύ Incremental Caching**: `.dir2md_cache/` for faster re-runs
- **πŸ“ˆ Large Repository Support**: Optimized for 10,000+ files
- **πŸš€ Streaming Processing**: Memory-efficient for massive codebases

### Advanced Analysis
- **🧠 Language Plugins**: Smart code analysis
  - **Python**: AST parsing, function/class extraction
  - **JavaScript/TypeScript**: ES module analysis, export detection
  - **Go**: Package structure, type definitions
  - **Java**: Class hierarchy, annotation extraction
- **πŸ“Š Drift Detection**: Compare blueprint versions
- **🎯 Impact Scoring**: Identify critical changes

### Export & Sharing
- **πŸ“„ Multiple Formats**: HTML, PDF, PowerPoint slides
- **🎨 Custom Templates**: Branded output with Jinja2
- **πŸ“± Responsive HTML**: Mobile-friendly documentation
- **πŸ–¨οΈ Print Optimization**: Publication-ready PDFs

### Team & CI/CD Integration
- **πŸ€– GitHub Actions**: Automated blueprint generation
- **πŸ’¬ PR Comments**: Automatic documentation updates  
- **πŸ”— GitLab Integration**: Pipeline integration support
- **πŸ“‹ Status Checks**: Quality gates for documentation
- **πŸ‘₯ Team Templates**: Standardized output formats

### Developer Experience
- **πŸ–₯️ Terminal UI (TUI)**: Interactive file selection
- **πŸ” Live Preview**: Real-time output preview
- **βš™οΈ Advanced Configuration**: Team-wide settings
- **πŸ“Š Analytics Dashboard**: Usage metrics and insights

---

## πŸ’° Pricing & Licensing

### Open Source (MIT)
- **Price**: Free forever
- **Use Case**: Individual developers, small projects
- **Support**: Community via GitHub Issues
- **License**: MIT - commercial use allowed

### Pro Version
- **Individual**: $29/month or $290/year
- **Team (5 users)**: $99/month or $990/year  
- **Enterprise**: Custom pricing with on-premise options
- **Support**: Priority email support + documentation
- **License**: Commercial license with usage analytics opt-out

---

## πŸš€ Usage Examples

### Open Source Quick Start

```bash
# Install from PyPI
pip install dir2md

# Basic usage with security masking
dir2md ./my-project --masking basic --preset raw

# Generate with manifest for CI/CD
dir2md . --emit-manifest --no-timestamp --output blueprint.md
```

### Pro Version Examples

```bash
# Set Pro license
export DIR2MD_LICENSE="PRO-your-license-key"

# Advanced masking with custom patterns
dir2md . --masking advanced --preset pro

# Parallel processing with caching
dir2md ./large-repo --parallel --use-cache

# Generate multiple formats
dir2md . --export html,pdf --template branded
```

### GitHub Actions Integration

**Open Source:**
```yaml
- name: Generate Blueprint
  run: |
    pip install dir2md
    dir2md . --no-timestamp --output docs/blueprint.md
```

**Pro Version:**
```yaml
- name: Generate Pro Blueprint  
  env:
    DIR2MD_LICENSE: ${{ secrets.DIR2MD_PRO_LICENSE }}
  run: |
    pip install dir2md-pro
    dir2md . --masking advanced --export html --pr-comment
```

---

## 🎯 When to Upgrade to Pro

### Individual Developers
- Working with sensitive codebases requiring advanced security
- Need faster processing for large repositories (1000+ files)
- Want professional-looking exports for client presentations
- Require language-specific code analysis

### Teams & Organizations  
- Standardizing documentation across multiple projects
- Integrating with CI/CD pipelines for automatic updates
- Need compliance features for security auditing
- Want team analytics and usage insights

### Enterprise Users
- On-premise deployment requirements
- SSO/SAML integration needs
- Custom security patterns and compliance rules
- Dedicated support and SLA requirements

---

## πŸ› οΈ Technical Implementation

### Open-Core Architecture
```
dir2md-core (OSS)           dir2md-pro (Commercial)
β”œβ”€β”€ CLI Interface           β”œβ”€β”€ Advanced Masking
β”œβ”€β”€ File Scanning           β”œβ”€β”€ Language Plugins  
β”œβ”€β”€ Token Optimization      β”œβ”€β”€ Parallel Engine
β”œβ”€β”€ Basic Masking           β”œβ”€β”€ Export Templates
β”œβ”€β”€ Manifest Generation     β”œβ”€β”€ Team Integration
└── Markdown Output         └── License Validation
```

### License Validation
- **Runtime Check**: Environment variable `DIR2MD_LICENSE`
- **Offline Validation**: Ed25519 signature verification
- **Graceful Degradation**: Falls back to OSS features if invalid
- **No Phone Home**: All validation happens locally

### Plugin System
```python
# Pro Plugin Example
class PythonAnalyzer(LanguagePlugin):
    extensions = {'.py'}
    
    def analyze(self, content: str) -> Dict[str, Any]:
        return {
            'functions': self.extract_functions(content),
            'classes': self.extract_classes(content),
            'imports': self.extract_imports(content)
        }
```

---

## πŸ†š Comparison with Alternatives

| Tool | Open Source | Pro Features | License Model |
|------|-------------|--------------|---------------|
| **dir2md** | βœ… Full core functionality | βœ… Advanced security, performance, team features | Open-Core (MIT + Commercial) |
| tree + cat | βœ… Basic listing | ❌ No advanced features | Free (but manual) |
| Proprietary doc tools | ❌ Closed source | βœ… Enterprise features | Subscription only |
| Custom scripts | βœ… DIY solution | ❌ No standardization | Time investment |

---

## πŸ“ž Get Started

### Try Open Source
```bash
pip install dir2md
dir2md --help
```

### Evaluate Pro Features
```bash
# 14-day free trial
export DIR2MD_LICENSE="TRIAL-request-at-dir2md.com"
pip install dir2md-pro
dir2md --masking advanced --parallel
```

### Purchase Pro License
- **Individual**: [Buy now for $29/month](https://dir2md.com/buy/individual)
- **Team**: [Start team trial](https://dir2md.com/buy/team)  
- **Enterprise**: [Contact sales](https://dir2md.com/contact)

---

## 🀝 Contributing

Dir2md's open-source core welcomes contributions:

- **Bug Reports**: [GitHub Issues](https://github.com/your-org/dir2md/issues)
- **Feature Requests**: [GitHub Discussions](https://github.com/your-org/dir2md/discussions)
- **Code Contributions**: See [CONTRIBUTING.md](CONTRIBUTING.md)
- **Documentation**: Help improve our guides and examples

Pro features are developed in-house but benefit from community feedback and OSS improvements.

---

*Made with ❀️ for developers who value great documentation*