Skip to content

Commit ca35b64

Browse files
committed
Add comprehensive documentation structure
- Add docs/index.md with CommitWeave overview and features - Add docs/installation.md with setup and configuration guide - Add docs/usage.md with examples and CLI reference - Add docs/api/reference.md with complete API documentation - Include proper MDX frontmatter for typeweaver-docs integration - Cover AI-powered commit generation, configuration, and usage 🤖 Generated with GLINR Studios
1 parent 5584f56 commit ca35b64

File tree

3 files changed

+849
-0
lines changed

3 files changed

+849
-0
lines changed

docs/index.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: "CommitWeave Documentation"
3+
description: "AI-powered Git commit message generation tool for beautiful, conventional commits"
4+
order: 1
5+
---
6+
7+
# CommitWeave
8+
9+
CommitWeave is an intelligent CLI tool that helps you create beautiful, structured, and conventional Git commit messages with AI-powered assistance. Transform your Git workflow with smart commit message generation that follows industry standards and best practices.
10+
11+
## What is CommitWeave?
12+
13+
CommitWeave combines the power of AI with conventional commit standards to create an exceptional Git workflow experience. Whether you're working solo or with a team, CommitWeave ensures your commit history is clean, meaningful, and professional.
14+
15+
### Key Features
16+
17+
- **🤖 AI-Powered Generation**: Leverages OpenAI GPT and Anthropic Claude to analyze your changes and generate contextual commit messages
18+
- **📝 Conventional Commits**: Full support for conventional commit format with predefined types and scopes
19+
- **🎨 Beautiful CLI Interface**: Interactive prompts with animations, colors, and branded styling
20+
- **✨ Smart Emoji Integration**: Contextual emojis that make your commit history visually appealing
21+
- **⚙️ Highly Configurable**: Customize everything from commit types to AI models
22+
- **🔧 Git Integration**: Seamless integration with your existing Git workflow
23+
- **✅ Validation**: Built-in commit message validation and formatting
24+
25+
## Quick Start
26+
27+
Get up and running with CommitWeave in minutes:
28+
29+
```bash
30+
# Install globally
31+
npm install -g commitweave
32+
33+
# Initialize configuration
34+
commitweave init
35+
36+
# Create your first AI-powered commit
37+
commitweave --ai
38+
```
39+
40+
## Why CommitWeave?
41+
42+
### Before CommitWeave
43+
```
44+
git commit -m "fix stuff"
45+
git commit -m "update"
46+
git commit -m "changes"
47+
```
48+
49+
### After CommitWeave
50+
```
51+
feat(auth): ✨ implement JWT token validation system
52+
53+
Add comprehensive JWT authentication with automatic token
54+
refresh and secure session management.
55+
56+
BREAKING CHANGE: Legacy auth endpoints deprecated
57+
```
58+
59+
## Core Principles
60+
61+
1. **🎨 Beauty First** - Every interaction should be visually appealing
62+
2. **⚡ Speed Matters** - Fast, responsive, and efficient operations
63+
3. **🛡️ Type Safety** - Full TypeScript coverage for reliability
64+
4. **🔧 Configurable** - Highly customizable to fit team preferences
65+
5. **🤖 AI-Enhanced** - Smart assistance without complexity
66+
6. **📝 Standards-Based** - Full conventional commit compliance
67+
68+
## Supported Commit Types
69+
70+
CommitWeave includes 11 predefined conventional commit types:
71+
72+
| Type | Emoji | Description |
73+
|------|--------|-------------|
74+
| `feat` || A new feature |
75+
| `fix` | 🐛 | A bug fix |
76+
| `docs` | 📚 | Documentation changes |
77+
| `style` | 💎 | Code style changes (formatting) |
78+
| `refactor` | 📦 | Code refactoring |
79+
| `perf` | 🚀 | Performance improvements |
80+
| `test` | 🚨 | Adding or correcting tests |
81+
| `build` | 🛠 | Build system or external dependencies |
82+
| `ci` | ⚙️ | CI configuration changes |
83+
| `chore` | ♻️ | Maintenance tasks |
84+
| `revert` | 🗑 | Revert previous commit |
85+
86+
## Getting Started
87+
88+
Ready to transform your Git workflow? Check out our comprehensive guides:
89+
90+
- [Installation Guide](./installation.md) - Get CommitWeave installed on your system
91+
- [Usage Examples](./usage.md) - Learn how to use CommitWeave effectively
92+
- [API Reference](./api/reference.md) - Detailed API documentation
93+
94+
## Community and Support
95+
96+
CommitWeave is built by the GLINR team and published by @typeweaver. Join our community for support, feature requests, and contributions.
97+
98+
---
99+
100+
*Transform your Git workflow with intelligent, beautiful commit messages.*

docs/installation.md

Lines changed: 287 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,287 @@
1+
---
2+
title: "Installation Guide"
3+
description: "Complete guide to installing CommitWeave on your system"
4+
order: 2
5+
---
6+
7+
# Installation Guide
8+
9+
This guide will walk you through installing CommitWeave on your system and getting it configured for your development workflow.
10+
11+
## Prerequisites
12+
13+
Before installing CommitWeave, ensure you have:
14+
15+
- **Node.js 18.0.0 or higher** - CommitWeave requires modern Node.js features
16+
- **Git** - CommitWeave integrates with your Git workflow
17+
- **NPM or Yarn** - For package management
18+
19+
You can verify your Node.js version:
20+
```bash
21+
node --version
22+
```
23+
24+
## Installation Methods
25+
26+
### Method 1: Global NPM Installation (Recommended)
27+
28+
Install CommitWeave globally for use across all your projects:
29+
30+
```bash
31+
npm install -g commitweave
32+
```
33+
34+
Verify the installation:
35+
```bash
36+
commitweave --version
37+
```
38+
39+
### Method 2: Local Project Installation
40+
41+
Install CommitWeave as a development dependency in your project:
42+
43+
```bash
44+
# Using npm
45+
npm install --save-dev commitweave
46+
47+
# Using yarn
48+
yarn add -D commitweave
49+
50+
# Using pnpm
51+
pnpm add -D commitweave
52+
```
53+
54+
Add a script to your `package.json`:
55+
```json
56+
{
57+
"scripts": {
58+
"commit": "commitweave"
59+
}
60+
}
61+
```
62+
63+
Then run with:
64+
```bash
65+
npm run commit
66+
```
67+
68+
### Method 3: Using npx (No Installation)
69+
70+
Run CommitWeave directly without installing:
71+
72+
```bash
73+
npx commitweave
74+
```
75+
76+
## Initial Setup
77+
78+
### 1. Initialize Configuration
79+
80+
After installation, set up CommitWeave for your project:
81+
82+
```bash
83+
commitweave init
84+
```
85+
86+
This creates a `glinr-commit.json` configuration file with sensible defaults:
87+
88+
```json
89+
{
90+
"commitTypes": [
91+
{
92+
"type": "feat",
93+
"description": "A new feature",
94+
"emoji": ""
95+
},
96+
{
97+
"type": "fix",
98+
"description": "A bug fix",
99+
"emoji": "🐛"
100+
}
101+
// ... more types
102+
],
103+
"emojiEnabled": true,
104+
"conventionalCommits": true,
105+
"maxSubjectLength": 50,
106+
"ui": {
107+
"fancyUI": true,
108+
"asciiArt": true,
109+
"animations": true,
110+
"colors": true,
111+
"emoji": true
112+
}
113+
}
114+
```
115+
116+
### 2. Configure AI Providers (Optional)
117+
118+
To use AI-powered commit generation, you'll need to configure an AI provider.
119+
120+
#### OpenAI Setup
121+
122+
1. Get an API key from [OpenAI Platform](https://platform.openai.com/api-keys)
123+
2. Configure CommitWeave:
124+
125+
```bash
126+
# Set your API key
127+
export OPENAI_API_KEY="your-api-key-here"
128+
129+
# Or add to your shell profile (.bashrc, .zshrc, etc.)
130+
echo 'export OPENAI_API_KEY="your-api-key-here"' >> ~/.zshrc
131+
```
132+
133+
3. Update your configuration:
134+
135+
```json
136+
{
137+
"ai": {
138+
"provider": "openai",
139+
"model": "gpt-3.5-turbo",
140+
"temperature": 0.7,
141+
"maxTokens": 150
142+
}
143+
}
144+
```
145+
146+
#### Anthropic Claude Setup
147+
148+
1. Get an API key from [Anthropic Console](https://console.anthropic.com/)
149+
2. Configure CommitWeave:
150+
151+
```bash
152+
# Set your API key
153+
export ANTHROPIC_API_KEY="your-api-key-here"
154+
```
155+
156+
3. Update your configuration:
157+
158+
```json
159+
{
160+
"ai": {
161+
"provider": "anthropic",
162+
"model": "claude-3-sonnet-20240229",
163+
"temperature": 0.7,
164+
"maxTokens": 150
165+
}
166+
}
167+
```
168+
169+
## Verification
170+
171+
Test your installation with these commands:
172+
173+
```bash
174+
# Check version
175+
commitweave --version
176+
177+
# Validate configuration
178+
commitweave doctor
179+
180+
# Test basic functionality
181+
commitweave --help
182+
183+
# Test AI functionality (if configured)
184+
commitweave --ai
185+
```
186+
187+
## Platform-Specific Notes
188+
189+
### Windows
190+
191+
CommitWeave works on Windows with Command Prompt, PowerShell, and Git Bash. For the best experience:
192+
193+
1. Use Windows Terminal for enhanced colors and emoji support
194+
2. Ensure your terminal supports Unicode for proper emoji display
195+
3. Consider using Git Bash for a Unix-like experience
196+
197+
### macOS
198+
199+
CommitWeave works out of the box on macOS. For enhanced terminal experience:
200+
201+
1. Use iTerm2 or the built-in Terminal app
202+
2. Install a Nerd Font for better emoji and icon support
203+
3. Enable "Use Unicode UTF-8" in Terminal preferences
204+
205+
### Linux
206+
207+
CommitWeave works on all major Linux distributions:
208+
209+
1. Ensure your terminal supports Unicode
210+
2. Install font packages for emoji support:
211+
```bash
212+
# Ubuntu/Debian
213+
sudo apt install fonts-noto-color-emoji
214+
215+
# Arch Linux
216+
sudo pacman -S noto-fonts-emoji
217+
```
218+
219+
## Configuration Management
220+
221+
### Global vs Project Configuration
222+
223+
CommitWeave supports both global and project-specific configurations:
224+
225+
- **Global**: `~/.config/commitweave/glinr-commit.json`
226+
- **Project**: `./glinr-commit.json` (takes precedence)
227+
228+
### Environment Variables
229+
230+
CommitWeave respects these environment variables:
231+
232+
```bash
233+
# API Keys
234+
OPENAI_API_KEY=""
235+
ANTHROPIC_API_KEY=""
236+
237+
# Configuration overrides
238+
COMMITWEAVE_EMOJI_ENABLED="true"
239+
COMMITWEAVE_AI_PROVIDER="openai"
240+
COMMITWEAVE_MAX_SUBJECT_LENGTH="50"
241+
```
242+
243+
## Troubleshooting
244+
245+
### Common Issues
246+
247+
#### "Command not found"
248+
- Ensure Node.js and npm are installed
249+
- Check if global npm bin directory is in your PATH
250+
- Try reinstalling: `npm uninstall -g commitweave && npm install -g commitweave`
251+
252+
#### "Permission denied"
253+
- Use `sudo` for global installation: `sudo npm install -g commitweave`
254+
- Or configure npm to use a different directory for global packages
255+
256+
#### AI features not working
257+
- Verify your API key is set correctly
258+
- Check your internet connection
259+
- Ensure you have API credits available
260+
- Run `commitweave doctor` for diagnostics
261+
262+
#### Unicode/Emoji display issues
263+
- Ensure your terminal supports Unicode
264+
- Install appropriate font packages
265+
- Check terminal encoding settings
266+
267+
### Getting Help
268+
269+
If you encounter issues:
270+
271+
1. Run `commitweave doctor` for health checks
272+
2. Check the configuration with `commitweave list`
273+
3. Review the logs for error messages
274+
4. Visit our GitHub repository for support
275+
276+
## Next Steps
277+
278+
Now that CommitWeave is installed and configured:
279+
280+
1. [Learn basic usage patterns](./usage.md)
281+
2. [Explore the API reference](./api/reference.md)
282+
3. Customize your configuration for your team's needs
283+
4. Set up AI providers for intelligent commit generation
284+
285+
---
286+
287+
*Ready to create beautiful commits? Let's get started!*

0 commit comments

Comments
 (0)