Skip to content

kingsleyesisi/DocMint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 DocMint

Professional README & Documentation Generator

PyPI version Python License: MIT Downloads Code style: black

Transform your projects into professionally documented masterpieces with AI-powered README generation ✨

πŸš€ Quick Start β€’ πŸ“– Documentation β€’ 🎯 Features β€’ 🀝 Contributing


🎯 What is DocMint?

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!

✨ Key Highlights

πŸ” 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


πŸš€ Installation

Install from PyPI (Recommended)

pip install docmint

Install from Source

git clone https://github.com/kingsleyesisi/docmint.git
cd docmint
pip install -e .

Verify Installation

docmint --help

πŸ’» Usage

🎯 Quick Start

Generate a README for your current project:

docmint

πŸ“ Analyze Specific Directory

docmint -d /path/to/your/project

πŸ’¬ Generate from Description

docmint -p "My awesome web application built with Flask and React"

🚫 Exclude Files and Directories

# 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*"

🎨 Advanced Usage

# 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

πŸ› οΈ Command Line Options

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

🚫 Exclusion Patterns

DocMint provides powerful exclusion capabilities to filter out unwanted files and directories:

πŸ“ Directory Exclusions

# 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*"

πŸ“„ File Exclusions

# 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*"

πŸ”§ Default Exclusions

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

🎨 Features

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

🎯 Supported Project Types

  • 🐍 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)

βš™οΈ Configuration

DocMint uses a configuration file located at ~/.docmint/config.json for persistent settings.

πŸ“‹ Default Configuration

{
    "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"
    ]
}

πŸ”§ Customization

Edit the configuration file to customize DocMint's behavior:

# View current configuration
docmint --show-config

# Open configuration file for editing
nano ~/.docmint/config.json

πŸ“ Configuration Options

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

🌐 API Integration

DocMint integrates with cloud services for enhanced README generation:

πŸ”— Available Endpoints

Endpoint Method Purpose
/api/health/ GET Health check
/api/generate/ POST Generate from prompt
/api/generate-from-files/ POST Generate from files

πŸ“‘ Example API Usage

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"]

πŸš€ Development

πŸ› οΈ Setting Up Development Environment

# 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

πŸ§ͺ Running Tests

# Run tests (when available)
python -m pytest

# Run with coverage
python -m pytest --cov=docmint

πŸ“¦ Building Package

# Build distribution packages
python -m build

# Upload to PyPI (maintainers only)
python -m twine upload dist/*

🀝 Contributing

We welcome contributions! Here's how you can help make DocMint even better:

🎯 Ways to Contribute

  • πŸ› 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

πŸ“‹ Contribution Process

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“œ Code Style

We use Black for code formatting:

# Format code
black docmint/

# Check formatting
black --check docmint/

πŸ› Troubleshooting

Common Issues & Solutions

πŸ”Œ Connection Issues

Problem: Cannot connect to DocMint backend

Solutions:

  • βœ… Check your internet connection
  • βœ… Verify backend URL in configuration
  • βœ… Try using --url flag 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-dir to exclude large directories
  • βœ… Use --exclude-file to 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

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • 🌟 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

🌟 Star us on GitHub!

If DocMint helped you create better documentation, please consider giving us a star ⭐

GitHub stars


Made with ❀️ by the DocMint Team

Built with DocMint

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages