Transform your projects into professionally documented masterpieces with AI-powered README generation β¨
π Quick Start β’ π Documentation β’ π― Features β’ π€ Contributing
DocMint is a powerful Python package that automatically generates comprehensive, professional README files for your projects. Simply point it at your codebase, and watch as it analyzes your files, understands your project structure, and creates beautiful documentation that makes your project shine.
π‘ Perfect for developers who want professional documentation without the hassle!
π Smart Analysis - Automatically detects project type and structure
π¨ Beautiful Output - Generates professional, well-formatted README files
π Cross-Platform - Works seamlessly on Windows, macOS, and Linux
β‘ Lightning Fast - Generate comprehensive docs in seconds
π οΈ Highly Configurable - Customize output to match your needs
π« Smart Filtering - Exclude unwanted files and directories with patterns
pip install docmintgit clone https://github.com/kingsleyesisi/docmint.git
cd docmint
pip install -e .docmint --helpGenerate a README for your current project:
docmintdocmint -d /path/to/your/projectdocmint -p "My awesome web application built with Flask and React"# Exclude specific directories
docmint --exclude-dir "temp,cache,logs"
# Exclude specific files (supports wildcards)
docmint --exclude-file "*.log,*.tmp,secret.txt"
# Exclude with patterns
docmint --exclude-file "tests/*,docs/*.md"
# Combine multiple exclusions
docmint --exclude-dir node_modules,dist --exclude-file "*.log,temp*"# Specify project type and output file
docmint -t Python -o MyAwesome-README.md
# Skip contributing section
docmint --no-contributing
# Use custom backend
docmint --url http://localhost:8000
# Silent mode (no banner)
docmint --no-banner
# Show current configuration
docmint --show-config| Option | Short | Description | Example |
|---|---|---|---|
--directory |
-d |
Project directory to analyze | -d ./my-project |
--prompt |
-p |
Generate from text description | -p "Flask API server" |
--type |
-t |
Specify project type | -t Python |
--output |
-o |
Output filename | -o DOCUMENTATION.md |
--exclude-dir |
Exclude directories (supports wildcards) | --exclude-dir "temp*,cache" |
|
--exclude-file |
Exclude files (supports wildcards) | --exclude-file "*.log,secret*" |
|
--no-contributing |
Skip contributing section | --no-contributing |
|
--url |
Custom backend URL | --url http://localhost:8000 |
|
--no-banner |
Skip banner display | --no-banner |
|
--show-config |
Show current configuration | --show-config |
|
--help |
-h |
Show help message | --help |
DocMint provides powerful exclusion capabilities to filter out unwanted files and directories:
# Exclude specific directories
docmint --exclude-dir "node_modules,dist,build"
# Use wildcards
docmint --exclude-dir "temp*,cache*,*_backup"
# Multiple exclude-dir arguments
docmint --exclude-dir node_modules --exclude-dir dist --exclude-dir "temp*"# Exclude specific files
docmint --exclude-file "secret.txt,config.local.json"
# Use wildcards for file patterns
docmint --exclude-file "*.log,*.tmp,*.cache"
# Exclude files in specific paths
docmint --exclude-file "tests/*,docs/*.md,src/temp*"DocMint automatically excludes common directories and files:
Default Excluded Directories:
node_modules,.git,__pycache__,venv,dist,build.next,target,vendor,coverage,.vs,Pods
Default Excluded Files:
*.log,*.tmp,*.cache,*.lock,*.pyc.DS_Store,Thumbs.db,*.swp,*.swo
| Feature | Description |
|---|---|
| π€ AI-Powered Analysis | Intelligent project understanding and documentation generation |
| π Smart Detection | Automatically identifies project type, dependencies, and structure |
| π Professional Templates | Beautiful, industry-standard README formats |
| π Colorful CLI | Rich terminal output with progress indicators and status updates |
| βοΈ Configurable | Extensive configuration options for customized output |
| π« Smart Filtering | Advanced file and directory exclusion with wildcard support |
| π API Integration | Seamless integration with DocMint cloud services |
| π File Analysis | Comprehensive project file scanning and summarization |
| π‘οΈ Error Handling | Robust error handling with helpful diagnostic messages |
- π Python (Django, Flask, FastAPI, etc.)
- π¨ JavaScript/TypeScript (Node.js, React, Vue, Angular)
- β Java (Spring, Maven, Gradle)
- π¦ Rust (Cargo projects)
- πΉ Go (Go modules)
- π Ruby (Rails, Gems)
- π PHP (Laravel, Composer)
- β‘ C/C++ (CMake, Make)
- π· C#/.NET (MSBuild projects)
- π Swift (Xcode projects)
- π― Kotlin (Android, JVM)
- π Web Development (HTML, CSS, JavaScript)
DocMint uses a configuration file located at ~/.docmint/config.json for persistent settings.
{
"backend_url": "https://docmint.onrender.com",
"default_project_type": "auto",
"include_contributing": true,
"max_file_size": 104857600,
"max_files": 150,
"excluded_dirs": [
"node_modules", ".git", "__pycache__",
"venv", "dist", "build", ".next",
"coverage", ".vs", "Pods"
],
"excluded_files": [
"*.log", "*.tmp", "*.cache", "*.lock",
".DS_Store", "Thumbs.db", "*.pyc"
],
"supported_extensions": [
".py", ".js", ".ts", ".jsx", ".tsx",
".java", ".cpp", ".go", ".rs", ".php"
]
}Edit the configuration file to customize DocMint's behavior:
# View current configuration
docmint --show-config
# Open configuration file for editing
nano ~/.docmint/config.json| Option | Type | Description |
|---|---|---|
backend_url |
string | API endpoint URL |
max_file_size |
integer | Maximum file size in bytes |
max_files |
integer | Maximum number of files to analyze |
excluded_dirs |
array | Default directories to exclude |
excluded_files |
array | Default file patterns to exclude |
supported_extensions |
array | File extensions to include |
DocMint integrates with cloud services for enhanced README generation:
| Endpoint | Method | Purpose |
|---|---|---|
/api/health/ |
GET | Health check |
/api/generate/ |
POST | Generate from prompt |
/api/generate-from-files/ |
POST | Generate from files |
import requests
# Generate README from prompt
response = requests.post(
"https://docmint.onrender.com/api/generate/",
json={"message": "Python web scraping tool"}
)
readme_content = response.json()["answer"]# Clone the repository
git clone https://github.com/kingsleyesisi/docmint.git
cd docmint
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -e .
pip install -r requirements.txt# Run tests (when available)
python -m pytest
# Run with coverage
python -m pytest --cov=docmint# Build distribution packages
python -m build
# Upload to PyPI (maintainers only)
python -m twine upload dist/*We welcome contributions! Here's how you can help make DocMint even better:
- π Report Bugs - Found an issue? Let us know!
- π‘ Suggest Features - Have ideas for improvements?
- π Improve Documentation - Help make our docs clearer
- π§ Submit Code - Fix bugs or add new features
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
We use Black for code formatting:
# Format code
black docmint/
# Check formatting
black --check docmint/π Connection Issues
Problem: Cannot connect to DocMint backend
Solutions:
- β Check your internet connection
- β Verify backend URL in configuration
- β
Try using
--urlflag with alternative endpoint - β Check firewall settings
π File Encoding Errors
Problem: Encoding errors when reading files
Solutions:
- β Ensure files are UTF-8 encoded
- β Check for binary files in project directory
- β
Add problematic files to exclusion list with
--exclude-file
β‘ Performance Issues
Problem: Slow processing for large projects
Solutions:
- β
Use
--exclude-dirto exclude large directories - β
Use
--exclude-fileto exclude unnecessary files - β Reduce max_files in configuration
- β
Use specific directory targeting with
-d
π« Too Many Files Excluded
Problem: Important files being excluded
Solutions:
- β
Check your exclusion patterns with
--show-config - β Use more specific patterns instead of broad wildcards
- β Review default exclusions in configuration file
- β Test patterns with smaller directories first
This project is licensed under the MIT License - see the LICENSE file for details.
- π Contributors - Thank you to all who have contributed to this project
- π οΈ Open Source Community - For the amazing tools and libraries
- π€ AI Technology - Powering intelligent documentation generation