|
| 1 | +# CodeWiki CLI |
| 2 | + |
| 3 | +Transform your codebase into comprehensive documentation using AI-powered analysis. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- **Multi-Language Support**: Python, Java, JavaScript, TypeScript, C, C++, C# |
| 8 | +- **AI-Powered Analysis**: Uses LLM models for intelligent documentation generation |
| 9 | +- **Comprehensive Documentation**: Generates overview, module docs, and architecture diagrams |
| 10 | +- **Dependency Analysis**: Tree-sitter based code parsing and dependency graph generation |
| 11 | +- **Module Clustering**: Intelligent grouping of related code components |
| 12 | +- **GitHub Pages Integration**: Generate beautiful, interactive HTML documentation |
| 13 | +- **Git Workflow Support**: Automated branch creation and commit management |
| 14 | +- **Secure Configuration**: API keys stored in system keychain |
| 15 | +- **Progress Tracking**: Real-time progress updates with ETA |
| 16 | +- **Mermaid Diagrams**: Automatic generation of architecture and data flow diagrams |
| 17 | + |
| 18 | +## Installation |
| 19 | + |
| 20 | +```bash |
| 21 | +pip install codewiki |
| 22 | +``` |
| 23 | + |
| 24 | +## Quick Start |
| 25 | + |
| 26 | +### 1. Configure CodeWiki |
| 27 | + |
| 28 | +```bash |
| 29 | +codewiki config set \ |
| 30 | + --api-key YOUR_API_KEY \ |
| 31 | + --base-url https://api.anthropic.com \ |
| 32 | + --main-model claude-sonnet-4 \ |
| 33 | + --cluster-model claude-sonnet-4 |
| 34 | +``` |
| 35 | + |
| 36 | +### 2. Generate Documentation |
| 37 | + |
| 38 | +```bash |
| 39 | +cd /path/to/your/project |
| 40 | +codewiki generate |
| 41 | +``` |
| 42 | + |
| 43 | +Documentation will be created in `./docs/` |
| 44 | + |
| 45 | +### 3. Generate with GitHub Pages |
| 46 | + |
| 47 | +```bash |
| 48 | +codewiki generate --github-pages |
| 49 | +``` |
| 50 | + |
| 51 | +This creates an interactive HTML viewer at `./docs/index.html` |
| 52 | + |
| 53 | +## Commands |
| 54 | + |
| 55 | +### Configuration Management |
| 56 | + |
| 57 | +```bash |
| 58 | +# Set configuration |
| 59 | +codewiki config set --api-key <key> --base-url <url> \ |
| 60 | + --main-model <model> --cluster-model <model> |
| 61 | + |
| 62 | +# Show configuration |
| 63 | +codewiki config show |
| 64 | + |
| 65 | +# Validate configuration |
| 66 | +codewiki config validate |
| 67 | +``` |
| 68 | + |
| 69 | +### Documentation Generation |
| 70 | + |
| 71 | +```bash |
| 72 | +# Basic generation |
| 73 | +codewiki generate |
| 74 | + |
| 75 | +# Custom output directory |
| 76 | +codewiki generate --output ./documentation |
| 77 | + |
| 78 | +# Create git branch |
| 79 | +codewiki generate --create-branch |
| 80 | + |
| 81 | +# Generate GitHub Pages HTML |
| 82 | +codewiki generate --github-pages |
| 83 | + |
| 84 | +# Full-featured |
| 85 | +codewiki generate --create-branch --github-pages --verbose |
| 86 | +``` |
| 87 | + |
| 88 | +## Configuration |
| 89 | + |
| 90 | +Configuration is stored in: |
| 91 | +- API keys: System keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service) |
| 92 | +- Settings: `~/.codewiki/config.json` |
| 93 | + |
| 94 | +## Supported Languages |
| 95 | + |
| 96 | +| Language | Extensions | |
| 97 | +|------------|---------------------| |
| 98 | +| Python | `.py` | |
| 99 | +| Java | `.java` | |
| 100 | +| JavaScript | `.js`, `.jsx` | |
| 101 | +| TypeScript | `.ts`, `.tsx` | |
| 102 | +| C | `.c`, `.h` | |
| 103 | +| C++ | `.cpp`, `.hpp`, etc.| |
| 104 | +| C# | `.cs` | |
| 105 | + |
| 106 | +## Requirements |
| 107 | + |
| 108 | +- Python 3.12+ |
| 109 | +- Git (optional, for branch management) |
| 110 | +- LLM API access (Anthropic Claude, OpenAI, etc.) |
| 111 | +- Tree-sitter language parsers (automatically installed) |
| 112 | +- System keychain support (macOS Keychain, Windows Credential Manager, Linux Secret Service) |
| 113 | + |
| 114 | +## Development |
| 115 | + |
| 116 | +### Install from Source |
| 117 | + |
| 118 | +```bash |
| 119 | +git clone https://github.com/yourusername/codewiki.git |
| 120 | +cd codewiki |
| 121 | +pip install -e . |
| 122 | +``` |
| 123 | + |
| 124 | +### Run Tests |
| 125 | + |
| 126 | +```bash |
| 127 | +pytest tests/ |
| 128 | +``` |
| 129 | + |
| 130 | +## License |
| 131 | + |
| 132 | +MIT License - see LICENSE file for details |
| 133 | + |
| 134 | +## Support |
| 135 | + |
| 136 | +- Documentation: https://github.com/yourusername/codewiki/docs |
| 137 | +- Issues: https://github.com/yourusername/codewiki/issues |
| 138 | + |
0 commit comments