git-coco 0.33.0 → 0.35.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 +88 -11
- package/dist/index.esm.mjs +10546 -1857
- package/dist/index.js +10562 -1869
- 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,20 @@ 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
|
+
/**
|
|
242
|
+
* Rotate short usage tips through the status line when the TUI has been
|
|
243
|
+
* idle for >10s. Off by default so power users aren't distracted.
|
|
244
|
+
*/
|
|
245
|
+
idleTips?: boolean;
|
|
246
|
+
};
|
|
206
247
|
};
|
|
207
248
|
type ConfigWithServiceObject = BaseConfig & Partial<BaseCommandOptions> & {
|
|
208
249
|
service: LLMService;
|
|
@@ -230,7 +271,7 @@ interface ChangelogOptions extends BaseCommandOptions {
|
|
|
230
271
|
}
|
|
231
272
|
type ChangelogArgv = Arguments<ChangelogOptions>;
|
|
232
273
|
|
|
233
|
-
declare const _default$
|
|
274
|
+
declare const _default$6: {
|
|
234
275
|
command: string;
|
|
235
276
|
desc: string;
|
|
236
277
|
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
@@ -253,7 +294,7 @@ interface CommitOptions extends BaseCommandOptions {
|
|
|
253
294
|
}
|
|
254
295
|
type CommitArgv = Arguments<CommitOptions>;
|
|
255
296
|
|
|
256
|
-
declare const _default$
|
|
297
|
+
declare const _default$5: {
|
|
257
298
|
command: string;
|
|
258
299
|
desc: string;
|
|
259
300
|
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
@@ -261,15 +302,28 @@ declare const _default$3: {
|
|
|
261
302
|
options: Record<string, yargs.Options>;
|
|
262
303
|
};
|
|
263
304
|
|
|
305
|
+
interface DoctorOptions extends BaseCommandOptions {
|
|
306
|
+
fix?: boolean;
|
|
307
|
+
}
|
|
308
|
+
type DoctorArgv = Arguments<DoctorOptions>;
|
|
309
|
+
|
|
310
|
+
declare const _default$4: {
|
|
311
|
+
command: string;
|
|
312
|
+
desc: string;
|
|
313
|
+
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
314
|
+
handler: (argv: DoctorArgv) => Promise<void>;
|
|
315
|
+
};
|
|
316
|
+
|
|
264
317
|
type InstallationScope = 'global' | 'project';
|
|
265
318
|
|
|
266
|
-
declare const _default$
|
|
319
|
+
declare const _default$3: {
|
|
267
320
|
command: string;
|
|
268
321
|
desc: string;
|
|
269
322
|
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
270
323
|
handler: (argv: {
|
|
271
324
|
[x: string]: unknown;
|
|
272
325
|
scope?: InstallationScope | undefined;
|
|
326
|
+
dryRun?: boolean | undefined;
|
|
273
327
|
interactive: boolean;
|
|
274
328
|
verbose: boolean;
|
|
275
329
|
version: boolean;
|
|
@@ -279,6 +333,7 @@ declare const _default$2: {
|
|
|
279
333
|
} | Promise<{
|
|
280
334
|
[x: string]: unknown;
|
|
281
335
|
scope?: InstallationScope | undefined;
|
|
336
|
+
dryRun?: boolean | undefined;
|
|
282
337
|
interactive: boolean;
|
|
283
338
|
verbose: boolean;
|
|
284
339
|
version: boolean;
|
|
@@ -290,6 +345,7 @@ declare const _default$2: {
|
|
|
290
345
|
};
|
|
291
346
|
|
|
292
347
|
type LogFormat = 'table' | 'json';
|
|
348
|
+
type LogView = 'compact' | 'graph' | 'full';
|
|
293
349
|
interface LogOptions extends BaseCommandOptions {
|
|
294
350
|
all?: boolean;
|
|
295
351
|
author?: string;
|
|
@@ -297,14 +353,16 @@ interface LogOptions extends BaseCommandOptions {
|
|
|
297
353
|
commit?: string;
|
|
298
354
|
format?: LogFormat;
|
|
299
355
|
limit?: number;
|
|
356
|
+
merges?: boolean;
|
|
300
357
|
noMerges?: boolean;
|
|
301
358
|
path?: string | string[];
|
|
302
359
|
since?: string;
|
|
303
360
|
until?: string;
|
|
361
|
+
view?: LogView;
|
|
304
362
|
}
|
|
305
363
|
type LogArgv = Arguments<LogOptions>;
|
|
306
364
|
|
|
307
|
-
declare const _default$
|
|
365
|
+
declare const _default$2: {
|
|
308
366
|
command: string;
|
|
309
367
|
desc: string;
|
|
310
368
|
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
@@ -322,7 +380,7 @@ interface RecapOptions extends BaseCommandOptions {
|
|
|
322
380
|
}
|
|
323
381
|
type RecapArgv = Arguments<RecapOptions>;
|
|
324
382
|
|
|
325
|
-
declare const _default: {
|
|
383
|
+
declare const _default$1: {
|
|
326
384
|
command: string;
|
|
327
385
|
desc: string;
|
|
328
386
|
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
@@ -330,6 +388,25 @@ declare const _default: {
|
|
|
330
388
|
options: Record<string, yargs.Options>;
|
|
331
389
|
};
|
|
332
390
|
|
|
391
|
+
type UiView = 'history' | 'status' | 'diff';
|
|
392
|
+
interface UiOptions extends BaseCommandOptions {
|
|
393
|
+
all?: boolean;
|
|
394
|
+
branch?: string;
|
|
395
|
+
limit?: number;
|
|
396
|
+
path?: string | string[];
|
|
397
|
+
theme?: LogInkThemePreset;
|
|
398
|
+
view?: UiView;
|
|
399
|
+
}
|
|
400
|
+
type UiArgv = Arguments<UiOptions>;
|
|
401
|
+
|
|
402
|
+
declare const _default: {
|
|
403
|
+
command: string;
|
|
404
|
+
desc: string;
|
|
405
|
+
builder: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, string> & yargs.InferredOptionTypes<Record<string, yargs.Options>>>;
|
|
406
|
+
handler: (argv: UiArgv) => Promise<void>;
|
|
407
|
+
options: Record<string, yargs.Options>;
|
|
408
|
+
};
|
|
409
|
+
|
|
333
410
|
/**
|
|
334
411
|
* Creates and configures an LLM instance based on the provider and configuration.
|
|
335
412
|
*
|
|
@@ -479,5 +556,5 @@ declare namespace types_d {
|
|
|
479
556
|
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
557
|
}
|
|
481
558
|
|
|
482
|
-
export { _default$
|
|
559
|
+
export { _default$6 as changelog, _default$5 as commit, _default$4 as doctor, _default$3 as init, _default$2 as log, _default$1 as recap, types_d as types, _default as ui };
|
|
483
560
|
export type { Config$1 as Config };
|