Common issues and solutions for Dir2md.
Quick Start: Wiki.md | Main: README | CLI: CLI_REFERENCE.md | Features: FEATURES.md
# Error: No matching distribution found for dir2md
# Fix: Use GitHub installation
git clone https://github.com/Flamehaven/dir2md.git
cd dir2md
pip install -e .# Error: Cannot install conflicting dependencies
# Fix: Use virtual environment
python -m venv .venv
.venv\Scripts\activate # Windows
source .venv/bin/activate # Linux/macOS
pip install -e .# Error: UnicodeDecodeError or cp949 codec errors
# Fix 1: Exclude problematic files
dir2md . --exclude-glob "**/*.bin" --exclude-glob "**/*.dat"
# Fix 2: Specify file types explicitly
dir2md . --only-ext "py,js,md,txt"# Error: [WARN] Could not read mask pattern file
# Cause: Incorrect file:// URI format
# Fix: Use triple slash for absolute paths
dir2md . --mask-pattern-file file:///C:/path/to/patterns.json
# Relative path
dir2md . --mask-pattern-file file://./patterns.json# Symptom: Output is truncated or incomplete
# Fix 1: Increase budget
dir2md . --budget-tokens 10000
# Fix 2: More aggressive filtering
dir2md . --budget-tokens 5000 --only-ext "py,js" --exclude-glob "**/tests/**"
# Fix 3: Use fast preset for overview
dir2md . --preset fast# Symptom: .manifest.json file missing
# Cause: raw preset disables manifests by default
# Fix: Use pro preset or enable explicitly
dir2md . --preset pro --emit-manifest
# Or
dir2md . --preset raw --emit-manifest# Symptom: API keys or tokens not masked
# Fix 1: Enable masking
dir2md . --masking basic
# Fix 2: Test with dry-run first
dir2md . --masking basic --dry-run
# Fix 3: Add custom pattern
dir2md . --masking basic --mask-pattern "your_secret_pattern"
# Fix 4: Use advanced masking
dir2md . --masking advanced# Symptom: Legitimate code is masked incorrectly
# Cause: Overly broad masking patterns
# Fix: Use basic masking or customize patterns
dir2md . --masking basic# Symptom: Generated file exists but is nearly empty
# Cause 1: All files excluded by filters
# Fix: Check include/exclude patterns
dir2md . --verbose --dry-run
# Cause 2: Token budget too low
# Fix: Increase budget or remove limit
dir2md . --budget-tokens 10000# Symptom: Same code appears multiple times
# Cause: Deduplication disabled or threshold too low
# Fix: Enabled by default; if issues persist, report as bug# Symptom: Expected files not included
# Fix 1: Check filters
dir2md . --verbose --dry-run
# Fix 2: Verify file extensions
dir2md . --only-ext "py,js,ts,tsx"
# Fix 3: Check .gitignore influence
# Dir2md respects .gitignore by default# Error: Cannot access /work directory
# Fix Windows: Use absolute path with drive letter
docker run --rm -v C:\path\to\project:/work dir2md:local /work
# Fix Linux/macOS: Ensure proper permissions
docker run --rm -v $(pwd):/work dir2md:local /work# Error: Docker build fails
# Fix 1: Update Docker
# Fix 2: Clean build
docker build --no-cache -t dir2md:local .
# Fix 3: Check Dockerfile for platform issues# Symptom: Takes minutes on small projects
# Cause: Processing large binary files or many files
# Fix 1: Exclude binaries
dir2md . --exclude-glob "**/*.{jpg,png,gif,pdf,zip}"
# Fix 2: Use fast preset
dir2md . --preset fast
# Fix 3: Limit file types
dir2md . --only-ext "py,js,ts"# Symptom: Out of memory errors
# Cause: Very large codebase with unlimited budget
# Fix: Set reasonable token budget
dir2md . --budget-tokens 8000 --max-file-tokens 500# Symptom: LLM rejects input as too long
# Fix 1: Reduce budget
dir2md . --ai-mode --budget-tokens 4000
# Fix 2: Use query filtering
dir2md . --ai-mode --query "specific feature"
# Fix 3: Use fast preset for overview
dir2md . --preset fast# Symptom: Query doesn't affect file ordering
# Cause: --ai-mode not enabled
# Fix: Must use --ai-mode with --query
dir2md . --ai-mode --query "authentication"# Symptom: Config file ignored
# Cause 1: File not in working directory
# Fix: Ensure pyproject.toml is in project root
# Cause 2: Syntax error in TOML
# Fix: Validate TOML syntax
python -c "import tomli; tomli.load(open('pyproject.toml', 'rb'))"# Symptom: Config file settings ignored
# Cause: CLI flags take precedence (by design)
# Fix: Remove conflicting CLI flags or adjust configIf your issue isn't covered here:
- Search existing issues: GitHub Issues
- Check discussions: GitHub Discussions
- Create new issue: Include:
- Dir2md version (
dir2md --version) - Python version (
python --version) - Operating system
- Full command used
- Error message (if any)
- Expected vs actual behavior
- Dir2md version (
- Security issues: Email info@flamehaven.space
For detailed troubleshooting information:
# Enable verbose output
dir2md . --verbose --dry-run
# Check what will be processed
dir2md . --dry-run
# Test specific features
dir2md . --masking basic --dry-run --verbose