git-coco 0.33.0 → 0.34.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 +28 -1
- package/dist/index.d.ts +71 -11
- package/dist/index.esm.mjs +7674 -1792
- package/dist/index.js +7688 -1806
- package/package.json +16 -6
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](https://github.com/gfargo/coco/tree/main)
|
|
11
11
|
[](https://discord.gg/KGu9nE9Ejx)
|
|
12
12
|
|
|
13
|
-
An AI-powered git assistant that generates meaningful commit messages, creates changelogs, and streamlines your development workflow.
|
|
13
|
+
An AI-powered git assistant that generates meaningful commit messages, creates changelogs, explores repository history, and streamlines your development workflow.
|
|
14
14
|
|
|
15
15
|
**✨ Key Features:**
|
|
16
16
|
|
|
@@ -18,6 +18,7 @@ An AI-powered git assistant that generates meaningful commit messages, creates c
|
|
|
18
18
|
- 📋 **Conventional Commits** - Full support with automatic validation and formatting
|
|
19
19
|
- 🔧 **Commitlint Integration** - Seamless integration with your existing commitlint configuration
|
|
20
20
|
- 🏠 **Local AI Support** - Run completely offline with Ollama (no API costs, full privacy)
|
|
21
|
+
- 🖥️ **Coco UI Git Workstation** - Seven top-level views (history, status, diff, compose, branches, tags, stash) reachable via `g`-prefixed chords, with an interactive command palette (`:`) and global search (`/`)
|
|
21
22
|
- 📦 **Package Manager Friendly** - Works with npm, yarn, and pnpm
|
|
22
23
|
- 👥 **Team Ready** - Shared configurations and enterprise deployment
|
|
23
24
|
|
|
@@ -45,6 +46,7 @@ coco -i
|
|
|
45
46
|
- **`coco recap`** - Summarize recent changes and activity
|
|
46
47
|
- **`coco review`** - AI-powered code review of your changes
|
|
47
48
|
- **`coco log`** - Explore commit history with graph, filters, JSON output, and commit details
|
|
49
|
+
- **`coco ui`** - Open the full-screen Git workstation TUI
|
|
48
50
|
- **`coco init`** - Interactive setup wizard
|
|
49
51
|
|
|
50
52
|
## Usage Examples
|
|
@@ -88,12 +90,30 @@ coco recap --yesterday
|
|
|
88
90
|
coco review
|
|
89
91
|
|
|
90
92
|
# Explore commit history
|
|
93
|
+
coco ui
|
|
94
|
+
coco ui --view status
|
|
95
|
+
coco log --limit 20
|
|
96
|
+
coco log -i
|
|
97
|
+
coco log --view full --limit 20
|
|
91
98
|
coco log --all --limit 20
|
|
92
99
|
coco log --author "Grace Hopper" --path src
|
|
93
100
|
coco log --commit HEAD
|
|
94
101
|
coco log --format json
|
|
95
102
|
```
|
|
96
103
|
|
|
104
|
+
### Navigating the TUI
|
|
105
|
+
|
|
106
|
+
`coco ui` and `coco log -i` share a chord-driven navigation model. Press `g` and then a second key to jump anywhere; `<` (or `Esc`) pops the navigation stack back.
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
g h history g c compose < back
|
|
110
|
+
g s status g b branches Esc back / close modal
|
|
111
|
+
g d diff g t tags ? help overlay
|
|
112
|
+
g z stash : command palette
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The command palette (`:`) is an interactive launcher with fuzzy filter and recently-used at the top — every keybinding and workflow action is reachable from there. `/` searches the active view (history, branches, tags, or stash). See the [Coco UI](https://github.com/gfargo/coco/wiki/Coco-UI) wiki page for the full keymap.
|
|
116
|
+
|
|
97
117
|
## Configuration
|
|
98
118
|
|
|
99
119
|
Configure `coco` for your workflow with the interactive setup wizard:
|
|
@@ -116,6 +136,11 @@ coco init --scope project
|
|
|
116
136
|
{
|
|
117
137
|
"mode": "interactive",
|
|
118
138
|
"conventionalCommits": true,
|
|
139
|
+
"logTui": {
|
|
140
|
+
"theme": {
|
|
141
|
+
"preset": "catppuccin"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
119
144
|
"service": {
|
|
120
145
|
"provider": "openai",
|
|
121
146
|
"model": "gpt-4o"
|
|
@@ -133,6 +158,8 @@ For comprehensive guides, advanced usage, and detailed configuration options, vi
|
|
|
133
158
|
- **[Getting Started](https://github.com/gfargo/coco/wiki/Getting-Started)** - Complete beginner's guide from installation to first commit
|
|
134
159
|
- **[Command Reference](https://github.com/gfargo/coco/wiki/Command-Reference)** - Detailed command options and examples
|
|
135
160
|
- **[Configuration Overview](https://github.com/gfargo/coco/wiki/Config-Overview)** - All configuration options and setup methods
|
|
161
|
+
- **[Coco UI](https://github.com/gfargo/coco/wiki/Coco-UI)** - GitKraken-style terminal workstation guide
|
|
162
|
+
- **[Interactive Log TUI](https://github.com/gfargo/coco/wiki/Interactive-Log-TUI)** - History-focused `coco log -i` guide
|
|
136
163
|
- **[Team Collaboration](https://github.com/gfargo/coco/wiki/Team-Collaboration)** - Enterprise deployment and team adoption strategies
|
|
137
164
|
|
|
138
165
|
**Advanced Resources:**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import * as yargs from 'yargs';
|
|
3
3
|
import { Arguments } from 'yargs';
|
|
4
|
-
import { OllamaInput, ChatOllama } from '@langchain/ollama';
|
|
5
|
-
import { BaseLLMParams } from '@langchain/core/language_models/llms';
|
|
6
4
|
import * as _langchain_openai from '@langchain/openai';
|
|
7
|
-
import { TiktokenModel,
|
|
5
|
+
import { TiktokenModel, ChatOpenAI } from '@langchain/openai';
|
|
8
6
|
import { SimpleGit } from 'simple-git';
|
|
9
7
|
import { ChatAnthropic } from '@langchain/anthropic';
|
|
8
|
+
import { ChatOllama } from '@langchain/ollama';
|
|
10
9
|
import { Color } from 'chalk';
|
|
11
10
|
import { TiktokenModel as TiktokenModel$1 } from 'tiktoken';
|
|
12
11
|
|
|
12
|
+
type LogInkBorderStyle = 'round' | 'single' | 'classic';
|
|
13
|
+
type LogInkThemePreset = 'default' | 'monochrome' | 'catppuccin' | 'gruvbox';
|
|
14
|
+
type LogInkThemeColors = {
|
|
15
|
+
accent?: string;
|
|
16
|
+
border?: string;
|
|
17
|
+
danger?: string;
|
|
18
|
+
focusBorder?: string;
|
|
19
|
+
gitAdded?: string;
|
|
20
|
+
gitDeleted?: string;
|
|
21
|
+
gitModified?: string;
|
|
22
|
+
info?: string;
|
|
23
|
+
muted?: string;
|
|
24
|
+
selection?: string;
|
|
25
|
+
success?: string;
|
|
26
|
+
warning?: string;
|
|
27
|
+
};
|
|
28
|
+
type LogInkThemeConfig = {
|
|
29
|
+
ascii?: boolean;
|
|
30
|
+
borderStyle?: LogInkBorderStyle;
|
|
31
|
+
colors?: LogInkThemeColors;
|
|
32
|
+
preset?: LogInkThemePreset;
|
|
33
|
+
};
|
|
34
|
+
|
|
13
35
|
type LLMProvider = 'openai' | 'ollama' | 'anthropic';
|
|
14
36
|
type DynamicModelTask = 'summarize' | 'commit' | 'changelog' | 'review' | 'recap' | 'repair' | 'largeDiff';
|
|
15
37
|
type DynamicModelPreference = 'cost' | 'balanced' | 'quality';
|
|
@@ -94,8 +116,13 @@ type Authentication = {
|
|
|
94
116
|
apiKey: string;
|
|
95
117
|
};
|
|
96
118
|
};
|
|
97
|
-
|
|
98
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Provider-specific extra options forwarded to the underlying LangChain client.
|
|
121
|
+
* Decoupled from upstream input types so schema generation stays stable across
|
|
122
|
+
* langchain releases.
|
|
123
|
+
*/
|
|
124
|
+
type OpenAIFields = Record<string, unknown>;
|
|
125
|
+
type OllamaFields = Record<string, unknown>;
|
|
99
126
|
type OpenAILLMService = BaseLLMService & {
|
|
100
127
|
provider: 'openai';
|
|
101
128
|
model: OpenAIModel | 'dynamic';
|
|
@@ -203,6 +230,15 @@ type BaseConfig = {
|
|
|
203
230
|
* @example { "model": "o4-mini", "approval-mode": "auto-edit" }
|
|
204
231
|
*/
|
|
205
232
|
autoFixToolOptions?: Record<string, string>;
|
|
233
|
+
/**
|
|
234
|
+
* Interactive log TUI settings.
|
|
235
|
+
*/
|
|
236
|
+
logTui?: {
|
|
237
|
+
/**
|
|
238
|
+
* Theme settings for `coco log -i`.
|
|
239
|
+
*/
|
|
240
|
+
theme?: LogInkThemeConfig;
|
|
241
|
+
};
|
|
206
242
|
};
|
|
207
243
|
type ConfigWithServiceObject = BaseConfig & Partial<BaseCommandOptions> & {
|
|
208
244
|
service: LLMService;
|
|
@@ -230,7 +266,7 @@ interface ChangelogOptions extends BaseCommandOptions {
|
|
|
230
266
|
}
|
|
231
267
|
type ChangelogArgv = Arguments<ChangelogOptions>;
|
|
232
268
|
|
|
233
|
-
declare const _default$
|
|
269
|
+
declare const _default$5: {
|
|
234
270
|
command: string;
|
|
235
271
|
desc: string;
|
|
236
272
|
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
@@ -253,7 +289,7 @@ interface CommitOptions extends BaseCommandOptions {
|
|
|
253
289
|
}
|
|
254
290
|
type CommitArgv = Arguments<CommitOptions>;
|
|
255
291
|
|
|
256
|
-
declare const _default$
|
|
292
|
+
declare const _default$4: {
|
|
257
293
|
command: string;
|
|
258
294
|
desc: string;
|
|
259
295
|
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
@@ -263,13 +299,14 @@ declare const _default$3: {
|
|
|
263
299
|
|
|
264
300
|
type InstallationScope = 'global' | 'project';
|
|
265
301
|
|
|
266
|
-
declare const _default$
|
|
302
|
+
declare const _default$3: {
|
|
267
303
|
command: string;
|
|
268
304
|
desc: string;
|
|
269
305
|
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
270
306
|
handler: (argv: {
|
|
271
307
|
[x: string]: unknown;
|
|
272
308
|
scope?: InstallationScope | undefined;
|
|
309
|
+
dryRun?: boolean | undefined;
|
|
273
310
|
interactive: boolean;
|
|
274
311
|
verbose: boolean;
|
|
275
312
|
version: boolean;
|
|
@@ -279,6 +316,7 @@ declare const _default$2: {
|
|
|
279
316
|
} | Promise<{
|
|
280
317
|
[x: string]: unknown;
|
|
281
318
|
scope?: InstallationScope | undefined;
|
|
319
|
+
dryRun?: boolean | undefined;
|
|
282
320
|
interactive: boolean;
|
|
283
321
|
verbose: boolean;
|
|
284
322
|
version: boolean;
|
|
@@ -290,6 +328,7 @@ declare const _default$2: {
|
|
|
290
328
|
};
|
|
291
329
|
|
|
292
330
|
type LogFormat = 'table' | 'json';
|
|
331
|
+
type LogView = 'compact' | 'graph' | 'full';
|
|
293
332
|
interface LogOptions extends BaseCommandOptions {
|
|
294
333
|
all?: boolean;
|
|
295
334
|
author?: string;
|
|
@@ -297,14 +336,16 @@ interface LogOptions extends BaseCommandOptions {
|
|
|
297
336
|
commit?: string;
|
|
298
337
|
format?: LogFormat;
|
|
299
338
|
limit?: number;
|
|
339
|
+
merges?: boolean;
|
|
300
340
|
noMerges?: boolean;
|
|
301
341
|
path?: string | string[];
|
|
302
342
|
since?: string;
|
|
303
343
|
until?: string;
|
|
344
|
+
view?: LogView;
|
|
304
345
|
}
|
|
305
346
|
type LogArgv = Arguments<LogOptions>;
|
|
306
347
|
|
|
307
|
-
declare const _default$
|
|
348
|
+
declare const _default$2: {
|
|
308
349
|
command: string;
|
|
309
350
|
desc: string;
|
|
310
351
|
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
@@ -322,7 +363,7 @@ interface RecapOptions extends BaseCommandOptions {
|
|
|
322
363
|
}
|
|
323
364
|
type RecapArgv = Arguments<RecapOptions>;
|
|
324
365
|
|
|
325
|
-
declare const _default: {
|
|
366
|
+
declare const _default$1: {
|
|
326
367
|
command: string;
|
|
327
368
|
desc: string;
|
|
328
369
|
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
@@ -330,6 +371,25 @@ declare const _default: {
|
|
|
330
371
|
options: Record<string, yargs.Options>;
|
|
331
372
|
};
|
|
332
373
|
|
|
374
|
+
type UiView = 'history' | 'status' | 'diff';
|
|
375
|
+
interface UiOptions extends BaseCommandOptions {
|
|
376
|
+
all?: boolean;
|
|
377
|
+
branch?: string;
|
|
378
|
+
limit?: number;
|
|
379
|
+
path?: string | string[];
|
|
380
|
+
theme?: LogInkThemePreset;
|
|
381
|
+
view?: UiView;
|
|
382
|
+
}
|
|
383
|
+
type UiArgv = Arguments<UiOptions>;
|
|
384
|
+
|
|
385
|
+
declare const _default: {
|
|
386
|
+
command: string;
|
|
387
|
+
desc: string;
|
|
388
|
+
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
389
|
+
handler: (argv: UiArgv) => Promise<void>;
|
|
390
|
+
options: Record<string, yargs.Options>;
|
|
391
|
+
};
|
|
392
|
+
|
|
333
393
|
/**
|
|
334
394
|
* Creates and configures an LLM instance based on the provider and configuration.
|
|
335
395
|
*
|
|
@@ -479,5 +539,5 @@ declare namespace types_d {
|
|
|
479
539
|
export type { types_d_BaseParserInput as BaseParserInput, types_d_BaseParserOptions as BaseParserOptions, types_d_CommandHandler as CommandHandler, types_d_CommitLogParserInput as CommitLogParserInput, types_d_ConfirmMessage as ConfirmMessage, types_d_ConfirmMessageCallback as ConfirmMessageCallback, types_d_DiffNode as DiffNode, types_d_DirectoryDiff as DirectoryDiff, types_d_FileChange as FileChange, types_d_FileChangeParserInput as FileChangeParserInput, types_d_FileChangeStatus as FileChangeStatus, types_d_FileDiff as FileDiff, types_d_GetChangesResult as GetChangesResult };
|
|
480
540
|
}
|
|
481
541
|
|
|
482
|
-
export { _default$
|
|
542
|
+
export { _default$5 as changelog, _default$4 as commit, _default$3 as init, _default$2 as log, _default$1 as recap, types_d as types, _default as ui };
|
|
483
543
|
export type { Config$1 as Config };
|