git-coco 0.22.10 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -91
- package/dist/index.esm.mjs +5 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,140 +10,134 @@
|
|
|
10
10
|
[](https://github.com/gfargo/coco/tree/main)
|
|
11
11
|
[](https://discord.gg/KGu9nE9Ejx)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
An AI-powered git assistant that generates meaningful commit messages, creates changelogs, and streamlines your development workflow.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
**✨ Key Features:**
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
- **`recap`**: summarize changes from working-tree, or yesterday, or in the last month, or since the last tag.
|
|
17
|
+
- 🤖 **AI-Powered Commit Messages** - Generate contextual commits from your staged changes
|
|
18
|
+
- 📋 **Conventional Commits** - Full support with automatic validation and formatting
|
|
19
|
+
- 🔧 **Commitlint Integration** - Seamless integration with your existing commitlint configuration
|
|
20
|
+
- 🏠 **Local AI Support** - Run completely offline with Ollama (no API costs, full privacy)
|
|
21
|
+
- 📦 **Package Manager Friendly** - Works with npm, yarn, and pnpm
|
|
22
|
+
- 👥 **Team Ready** - Shared configurations and enterprise deployment
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
## Quick Start
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
## Getting Started
|
|
26
|
+
```bash
|
|
27
|
+
# Try without installing
|
|
28
|
+
npx git-coco@latest init
|
|
32
29
|
|
|
33
|
-
|
|
30
|
+
# Install globally
|
|
31
|
+
npm install -g git-coco
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
npx git-coco@latest init -l project
|
|
33
|
+
# Setup and configure
|
|
34
|
+
coco init
|
|
38
35
|
|
|
39
|
-
#
|
|
40
|
-
|
|
36
|
+
# Generate your first commit
|
|
37
|
+
git add .
|
|
38
|
+
coco -i
|
|
41
39
|
```
|
|
42
40
|
|
|
43
|
-
##
|
|
41
|
+
## Commands
|
|
42
|
+
|
|
43
|
+
- **`coco commit`** - Generate commit messages from staged changes
|
|
44
|
+
- **`coco changelog`** - Create changelogs from commit history
|
|
45
|
+
- **`coco recap`** - Summarize recent changes and activity
|
|
46
|
+
- **`coco review`** - AI-powered code review of your changes
|
|
47
|
+
- **`coco init`** - Interactive setup wizard
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
## Usage Examples
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
### Basic Workflow
|
|
48
52
|
|
|
49
53
|
```bash
|
|
50
|
-
|
|
54
|
+
# Make your changes
|
|
55
|
+
git add .
|
|
51
56
|
|
|
52
|
-
#
|
|
57
|
+
# Generate commit message (interactive mode recommended)
|
|
58
|
+
coco -i
|
|
53
59
|
|
|
54
|
-
|
|
60
|
+
# Or use stdout mode
|
|
61
|
+
git commit -m "$(coco)"
|
|
55
62
|
```
|
|
56
63
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
`coco` automatically detects and integrates with your project's commitlint configuration:
|
|
60
|
-
|
|
61
|
-
- **Smart Detection**: Automatically finds commitlint config files (`.commitlintrc.*`, `commitlint.config.*`, or `package.json` with commitlint field)
|
|
62
|
-
- **AI-Aware Rules**: Passes your commitlint rules to the AI for better compliance from the start
|
|
63
|
-
- **Automatic Retry**: When validation fails, `coco` automatically retries generation with error feedback (up to 2 attempts)
|
|
64
|
-
- **User-Friendly Flow**: After auto-retries, offers options to try 2 more times or edit manually
|
|
65
|
-
- **Full Validation**: Both AI-generated and manually edited commit messages are validated against your rules
|
|
66
|
-
|
|
67
|
-
#### Useful options
|
|
64
|
+
### Conventional Commits
|
|
68
65
|
|
|
69
66
|
```bash
|
|
70
|
-
#
|
|
71
|
-
|
|
72
|
-
coco --append "Resolves #128"
|
|
73
|
-
|
|
74
|
-
# --append-ticket
|
|
75
|
-
# Automatically append Jira/Linear ticket ID from the branch name to the commit message
|
|
76
|
-
coco --append-ticket
|
|
67
|
+
# Enable conventional commits format
|
|
68
|
+
coco --conventional
|
|
77
69
|
|
|
78
|
-
#
|
|
79
|
-
|
|
80
|
-
coco --additional "Resolves UX bug with sign up button"
|
|
70
|
+
# With additional context
|
|
71
|
+
coco -a "Fixes login timeout" --conventional
|
|
81
72
|
|
|
82
|
-
#
|
|
83
|
-
|
|
84
|
-
coco --conventional
|
|
73
|
+
# Include ticket from branch name
|
|
74
|
+
coco --append-ticket --conventional
|
|
85
75
|
```
|
|
86
76
|
|
|
87
|
-
###
|
|
88
|
-
|
|
89
|
-
Creates changelogs.
|
|
77
|
+
### Team Workflows
|
|
90
78
|
|
|
91
79
|
```bash
|
|
92
|
-
#
|
|
93
|
-
coco changelog
|
|
80
|
+
# Generate changelog for releases
|
|
81
|
+
coco changelog --since-last-tag
|
|
94
82
|
|
|
95
|
-
#
|
|
96
|
-
coco
|
|
83
|
+
# Summarize recent work
|
|
84
|
+
coco recap --yesterday
|
|
97
85
|
|
|
98
|
-
#
|
|
99
|
-
coco
|
|
100
|
-
|
|
101
|
-
# For a target branch
|
|
102
|
-
coco changelog -b other-branch
|
|
103
|
-
|
|
104
|
-
# For all commits since the last tag
|
|
105
|
-
coco changelog -t
|
|
86
|
+
# Code review before committing
|
|
87
|
+
coco review
|
|
106
88
|
```
|
|
107
89
|
|
|
108
|
-
|
|
90
|
+
## Configuration
|
|
109
91
|
|
|
110
|
-
|
|
92
|
+
Configure `coco` for your workflow with the interactive setup wizard:
|
|
111
93
|
|
|
112
94
|
```bash
|
|
113
|
-
#
|
|
114
|
-
coco
|
|
95
|
+
# Setup wizard
|
|
96
|
+
coco init
|
|
115
97
|
|
|
116
|
-
#
|
|
117
|
-
coco
|
|
98
|
+
# Project-specific setup
|
|
99
|
+
coco init --scope project
|
|
118
100
|
```
|
|
119
101
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
102
|
+
**AI Providers:**
|
|
103
|
+
- **OpenAI** - GPT-4o, GPT-4o-mini (API key required)
|
|
104
|
+
- **Anthropic** - Claude 3.5 Sonnet (API key required)
|
|
105
|
+
- **Ollama** - Local models, no API costs, full privacy
|
|
106
|
+
|
|
107
|
+
**Example Configuration:**
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"mode": "interactive",
|
|
111
|
+
"conventionalCommits": true,
|
|
112
|
+
"service": {
|
|
113
|
+
"provider": "openai",
|
|
114
|
+
"model": "gpt-4o"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
130
117
|
```
|
|
131
118
|
|
|
132
|
-
|
|
119
|
+
## Documentation
|
|
133
120
|
|
|
134
|
-
|
|
121
|
+
For comprehensive guides, advanced usage, and detailed configuration options, visit our complete documentation:
|
|
135
122
|
|
|
136
|
-
|
|
137
|
-
coco -s
|
|
138
|
-
```
|
|
123
|
+
### 📚 **[Coco Wiki](https://github.com/gfargo/coco/wiki)**
|
|
139
124
|
|
|
140
|
-
|
|
125
|
+
**Essential Guides:**
|
|
126
|
+
- **[Getting Started](https://github.com/gfargo/coco/wiki/Getting-Started)** - Complete beginner's guide from installation to first commit
|
|
127
|
+
- **[Command Reference](https://github.com/gfargo/coco/wiki/Command-Reference)** - Detailed command options and examples
|
|
128
|
+
- **[Configuration Overview](https://github.com/gfargo/coco/wiki/Config-Overview)** - All configuration options and setup methods
|
|
129
|
+
- **[Team Collaboration](https://github.com/gfargo/coco/wiki/Team-Collaboration)** - Enterprise deployment and team adoption strategies
|
|
141
130
|
|
|
142
|
-
|
|
131
|
+
**Advanced Resources:**
|
|
132
|
+
- **[Using Ollama](https://github.com/gfargo/coco/wiki/Using-Ollama)** - Local AI setup for privacy and cost control
|
|
133
|
+
- **[Advanced Usage](https://github.com/gfargo/coco/wiki/Advanced-Usage)** - Custom prompts, automation, and power-user features
|
|
134
|
+
- **[Troubleshooting](https://github.com/gfargo/coco/wiki/Troubleshooting)** - Solutions for common issues and debugging
|
|
143
135
|
|
|
144
|
-
### **
|
|
136
|
+
### 🆘 **Need Help?**
|
|
145
137
|
|
|
146
|
-
|
|
138
|
+
- **[Troubleshooting Guide](https://github.com/gfargo/coco/wiki/Troubleshooting)** - Comprehensive problem-solving resource
|
|
139
|
+
- **[GitHub Issues](https://github.com/gfargo/coco/issues)** - Bug reports and feature requests
|
|
140
|
+
- **[Discord Community](https://discord.gg/KGu9nE9Ejx)** - Real-time help and discussion
|
|
147
141
|
|
|
148
142
|
## Contribution
|
|
149
143
|
|
package/dist/index.esm.mjs
CHANGED
|
@@ -47,7 +47,7 @@ import { pathToFileURL } from 'url';
|
|
|
47
47
|
/**
|
|
48
48
|
* Current build version from package.json
|
|
49
49
|
*/
|
|
50
|
-
const BUILD_VERSION = "0.
|
|
50
|
+
const BUILD_VERSION = "0.23.0";
|
|
51
51
|
|
|
52
52
|
const isInteractive = (config) => {
|
|
53
53
|
return config?.mode === 'interactive' || !!config?.interactive;
|
|
@@ -11557,6 +11557,10 @@ const handler$3 = async (argv, logger) => {
|
|
|
11557
11557
|
},
|
|
11558
11558
|
factory,
|
|
11559
11559
|
parser,
|
|
11560
|
+
reviewParser: (result) => {
|
|
11561
|
+
// Ensure the result is properly formatted as a string for display
|
|
11562
|
+
return typeof result === 'string' ? result : String(result);
|
|
11563
|
+
},
|
|
11560
11564
|
agent: async (context, options) => {
|
|
11561
11565
|
// Select the appropriate schema based on whether conventional commits are enabled
|
|
11562
11566
|
const schema = USE_CONVENTIONAL_COMMITS
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ var readline__namespace = /*#__PURE__*/_interopNamespaceDefault(readline);
|
|
|
69
69
|
/**
|
|
70
70
|
* Current build version from package.json
|
|
71
71
|
*/
|
|
72
|
-
const BUILD_VERSION = "0.
|
|
72
|
+
const BUILD_VERSION = "0.23.0";
|
|
73
73
|
|
|
74
74
|
const isInteractive = (config) => {
|
|
75
75
|
return config?.mode === 'interactive' || !!config?.interactive;
|
|
@@ -11579,6 +11579,10 @@ const handler$3 = async (argv, logger) => {
|
|
|
11579
11579
|
},
|
|
11580
11580
|
factory,
|
|
11581
11581
|
parser,
|
|
11582
|
+
reviewParser: (result) => {
|
|
11583
|
+
// Ensure the result is properly formatted as a string for display
|
|
11584
|
+
return typeof result === 'string' ? result : String(result);
|
|
11585
|
+
},
|
|
11582
11586
|
agent: async (context, options) => {
|
|
11583
11587
|
// Select the appropriate schema based on whether conventional commits are enabled
|
|
11584
11588
|
const schema = USE_CONVENTIONAL_COMMITS
|