git-coco 0.13.1 → 0.14.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/LICENSE +1 -1
- package/README.md +42 -0
- package/dist/index.d.ts +11 -9
- package/dist/index.esm.mjs +21491 -122
- package/dist/index.js +21492 -122
- package/package.json +3 -2
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
- **`changelog`**: create changelogs for the current branch or a range of commits.
|
|
16
16
|
|
|
17
|
+
- **`recap`**: summarize changes from working-tree, or yesterday, or in the last month, or since the last tag!
|
|
18
|
+
|
|
17
19
|
- **`init`**: step by step wizard to set up `coco` globally or for a project.
|
|
18
20
|
|
|
19
21
|
## Getting Started
|
|
@@ -42,6 +44,24 @@ coco
|
|
|
42
44
|
coco commit
|
|
43
45
|
```
|
|
44
46
|
|
|
47
|
+
#### Useful options
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# --append
|
|
52
|
+
# Add content to the end of the generated commit
|
|
53
|
+
coco --append "Resolves #128"
|
|
54
|
+
|
|
55
|
+
# --append-ticket
|
|
56
|
+
# Automatically append Jira/Linear ticket ID from the branch name to the commit message
|
|
57
|
+
coco --append-ticket
|
|
58
|
+
|
|
59
|
+
# --additional
|
|
60
|
+
# Add extra context before generating the commit
|
|
61
|
+
coco --additional "Resolves UX bug with sign up button"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
|
|
45
65
|
### **`coco changelog`**
|
|
46
66
|
|
|
47
67
|
Creates changelogs.
|
|
@@ -52,8 +72,22 @@ coco changelog
|
|
|
52
72
|
|
|
53
73
|
# For a specific range
|
|
54
74
|
coco changelog -r HEAD~5:HEAD
|
|
75
|
+
|
|
76
|
+
# For a target branch
|
|
77
|
+
coco changelog -b other-branch
|
|
55
78
|
```
|
|
56
79
|
|
|
80
|
+
### **`coco recap`**
|
|
81
|
+
|
|
82
|
+
Summarize the working-tree, or other configured ranges
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Summarize all working directory changes
|
|
86
|
+
coco recap
|
|
87
|
+
|
|
88
|
+
# Or these available ranges
|
|
89
|
+
coco recap --yesterday | --last-week | --last-month | --last-tag
|
|
90
|
+
```
|
|
57
91
|
|
|
58
92
|
### Stdout vs. Interactive Mode
|
|
59
93
|
|
|
@@ -87,3 +121,11 @@ You can specify files to be ignored when generating commit messages by adding th
|
|
|
87
121
|
## Contribution
|
|
88
122
|
|
|
89
123
|
We welcome contributions! Check out our [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
|
|
124
|
+
|
|
125
|
+
## Project Stats
|
|
126
|
+
|
|
127
|
+

|
|
128
|
+
|
|
129
|
+
## License
|
|
130
|
+
|
|
131
|
+
MIT © [gfargo](https://github.com/gfargo/)
|
package/dist/index.d.ts
CHANGED
|
@@ -5,13 +5,15 @@ import { BaseLLMParams } from '@langchain/core/language_models/llms';
|
|
|
5
5
|
import * as _langchain_openai from '@langchain/openai';
|
|
6
6
|
import { TiktokenModel, OpenAIInput, ChatOpenAI } from '@langchain/openai';
|
|
7
7
|
import { SimpleGit } from 'simple-git';
|
|
8
|
+
import { ChatAnthropic } from '@langchain/anthropic';
|
|
8
9
|
import { ChatOllama } from '@langchain/ollama';
|
|
9
10
|
import { Color } from 'chalk';
|
|
10
11
|
import { TiktokenModel as TiktokenModel$1 } from 'tiktoken';
|
|
11
12
|
|
|
12
|
-
type LLMProvider = 'openai' | 'ollama';
|
|
13
|
+
type LLMProvider = 'openai' | 'ollama' | 'anthropic';
|
|
14
|
+
type AnthropicModel = 'claude-3-5-sonnet-20240620' | 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307' | 'claude-2.1' | 'claude-2.0';
|
|
13
15
|
type OllamaModel = 'codegemma:2b' | 'codegemma:7b-code' | 'codegemma' | 'codellama:13b' | 'codellama:34b' | 'codellama:70b' | 'codellama:7b' | 'codellama:instruct' | 'codellama:latest' | 'codellama' | 'gemma:2b' | 'gemma:7b' | 'gemma:latest' | 'gemma' | 'llama2:13b' | 'llama2:70b' | 'llama2:chat' | 'llama2:latest' | 'llama2:text' | 'llama2' | 'llama3:70b-text' | 'llama3:70b' | 'llama3:latest' | 'llama3:text' | 'llama3.1:70b' | 'llama3.1:8b' | 'llama3.1:latest' | 'llama3.2' | 'llama3.2:latest' | 'llama3.2:1b' | 'llama3.2:3b' | 'llama3.2:1b-instruct-fp16' | 'llama3.2:1b-instruct-q3_K_M' | 'llama3' | 'mistral:7b' | 'mistral:latest' | 'mistral:text' | 'mistral' | 'phi3:14b' | 'phi3:3.8b' | 'phi3:instruct' | 'phi3:medium-128k' | 'phi3:medium-4k' | 'phi3:medium' | 'phi3' | 'qwen2:0.5b' | 'qwen2:1.5b' | 'qwen2:72b-text' | 'qwen2:72b' | 'qwen2';
|
|
14
|
-
type LLMModel = TiktokenModel | OllamaModel;
|
|
16
|
+
type LLMModel = TiktokenModel | OllamaModel | AnthropicModel;
|
|
15
17
|
type BaseLLMService = {
|
|
16
18
|
provider: LLMProvider;
|
|
17
19
|
model: LLMModel;
|
|
@@ -146,7 +148,7 @@ type ChangelogArgv = Arguments<ChangelogOptions>;
|
|
|
146
148
|
declare const _default$3: {
|
|
147
149
|
command: string;
|
|
148
150
|
desc: string;
|
|
149
|
-
builder: (
|
|
151
|
+
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
150
152
|
handler: (argv: ChangelogArgv) => Promise<void>;
|
|
151
153
|
options: Record<string, yargs.Options>;
|
|
152
154
|
};
|
|
@@ -162,7 +164,7 @@ type CommitArgv = Arguments<CommitOptions>;
|
|
|
162
164
|
declare const _default$2: {
|
|
163
165
|
command: string;
|
|
164
166
|
desc: string;
|
|
165
|
-
builder: (
|
|
167
|
+
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
166
168
|
handler: (argv: CommitArgv) => Promise<void>;
|
|
167
169
|
options: Record<string, yargs.Options>;
|
|
168
170
|
};
|
|
@@ -195,16 +197,16 @@ declare const _default$1: {
|
|
|
195
197
|
|
|
196
198
|
interface RecapOptions extends BaseCommandOptions {
|
|
197
199
|
yesterday?: boolean;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
200
|
+
'last-week'?: boolean;
|
|
201
|
+
'last-month'?: boolean;
|
|
202
|
+
'last-tag'?: boolean;
|
|
201
203
|
}
|
|
202
204
|
type RecapArgv = Arguments<RecapOptions>;
|
|
203
205
|
|
|
204
206
|
declare const _default: {
|
|
205
207
|
command: string;
|
|
206
208
|
desc: string;
|
|
207
|
-
builder: (
|
|
209
|
+
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
208
210
|
handler: (argv: RecapArgv) => Promise<void>;
|
|
209
211
|
options: Record<string, yargs.Options>;
|
|
210
212
|
};
|
|
@@ -216,7 +218,7 @@ declare const _default: {
|
|
|
216
218
|
* @param configuration
|
|
217
219
|
* @returns LLM Model
|
|
218
220
|
*/
|
|
219
|
-
declare function getLlm(provider: LLMProvider, model: LLMModel, config: Config$1): ChatOllama | ChatOpenAI<_langchain_openai.ChatOpenAICallOptions>;
|
|
221
|
+
declare function getLlm(provider: LLMProvider, model: LLMModel, config: Config$1): ChatAnthropic | ChatOllama | ChatOpenAI<_langchain_openai.ChatOpenAICallOptions>;
|
|
220
222
|
|
|
221
223
|
interface LoggerOptions {
|
|
222
224
|
color?: typeof Color;
|