commit-whisper 1.0.2

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +132 -0
  3. package/dist/index.js +5615 -0
  4. package/package.json +67 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Georgios Nikitas
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,132 @@
1
+ # commit-whisper
2
+
3
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=georgiosnikitas_commit-whisper&metric=alert_status)](https://sonarcloud.io/summary/overall?id=georgiosnikitas_commit-whisper)
4
+ [![CI](https://github.com/georgiosnikitas/commit-whisper/actions/workflows/ci.yml/badge.svg)](https://github.com/georgiosnikitas/commit-whisper/actions/workflows/ci.yml)
5
+ [![Release](https://github.com/georgiosnikitas/commit-whisper/actions/workflows/release.yml/badge.svg?event=push)](https://github.com/georgiosnikitas/commit-whisper/actions/workflows/release.yml)
6
+ [![npm](https://img.shields.io/npm/v/commit-whisper)](https://www.npmjs.com/package/commit-whisper)
7
+ [![TypeScript](https://img.shields.io/badge/TypeScript-6.x-blue?logo=typescript)](https://www.typescriptlang.org/)
8
+ [![License](https://img.shields.io/github/license/georgiosnikitas/commit-whisper)](LICENSE)
9
+ [![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=flat&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/georgiosnikitas)
10
+
11
+ > 🕵️ **I know what you did last commit.**
12
+
13
+ Deterministic git history analysis with a grounded, bring-your-own-key AI narrative — a
14
+ terminal-native CLI.
15
+
16
+ commit-whisper analyzes a local or remote git repository, computes a catalog of deterministic
17
+ metrics (no AI), and — when a provider is configured — adds a grounded AI narrative and
18
+ coaching report. It renders to HTML, Markdown, terminal, and JSON from a single canonical
19
+ Report JSON.
20
+
21
+ > Status: v1 — all seven epics delivered. See
22
+ > [docs/planning-artifacts/](docs/planning-artifacts/) for the PRD, architecture, epics, and
23
+ > UX design.
24
+
25
+ ## Requirements
26
+
27
+ - Node.js 22 LTS or newer
28
+ - npm (bundled with Node.js)
29
+ - A system `git` on `PATH` (retrieval shells out to it)
30
+
31
+ ## 🚀 Installation
32
+
33
+ ### 🍺 Homebrew (macOS)
34
+
35
+ ```bash
36
+ brew tap georgiosnikitas/commit-whisper
37
+ brew install commit-whisper
38
+ ```
39
+
40
+ ### 📦 From npm
41
+
42
+ ```bash
43
+ npm install -g commit-whisper
44
+ ```
45
+
46
+ Or run it once without installing:
47
+
48
+ ```bash
49
+ npx commit-whisper .
50
+ ```
51
+
52
+ ### 📦 From GitHub Packages
53
+
54
+ ```bash
55
+ npm install -g @georgiosnikitas/commit-whisper --registry=https://npm.pkg.github.com
56
+ ```
57
+
58
+ > **Note:** GitHub Packages requires authentication even for public packages. Add a
59
+ > [personal access token](https://github.com/settings/tokens) with `read:packages` scope
60
+ > to your `~/.npmrc`:
61
+ >
62
+ > ```
63
+ > //npm.pkg.github.com/:_authToken=YOUR_TOKEN
64
+ > ```
65
+
66
+ ### 💾 Prebuilt binaries (no Node.js required)
67
+
68
+ Self-contained executables for macOS, Linux, and Windows are attached to each
69
+ [GitHub Release](https://github.com/georgiosnikitas/commit-whisper/releases).
70
+
71
+ After installing via Homebrew, npm, GitHub Packages, or a prebuilt binary, run it from
72
+ anywhere:
73
+
74
+ ```bash
75
+ commit-whisper .
76
+ ```
77
+
78
+ ### 🛠️ From source
79
+
80
+ ```bash
81
+ git clone https://github.com/georgiosnikitas/commit-whisper.git
82
+ cd commit-whisper
83
+ npm install
84
+ npm run build
85
+ node dist/index.js .
86
+ ```
87
+
88
+ ## Getting started (development)
89
+
90
+ ```bash
91
+ npm install # install pinned toolchain + runtime deps
92
+ npm run build # bundle src/ → dist/ (tsup / esbuild)
93
+ npm test # run the test suite (vitest)
94
+ ```
95
+
96
+ ## npm scripts
97
+
98
+ | Script | Purpose |
99
+ | --- | --- |
100
+ | `npm run build` | Bundle `src/` to `dist/` via tsup (ESM, Node 22 target). |
101
+ | `npm run bundle:sea` | Bundle `src/sea-entry.ts` to a single self-contained CJS file in `dist-sea/`. |
102
+ | `npm run build:sea` | Build a Node SEA single-executable binary (see [the 7.4 spike findings](docs/implementation-artifacts/7-4-sea-packaging-spike-findings.md)). |
103
+ | `npm test` | Run the test suite once (`vitest run`). |
104
+ | `npm run test:watch` | Run vitest in watch mode. |
105
+ | `npm run typecheck` | Type-check with `tsc --noEmit` (strict, nodenext). |
106
+ | `npm run lint` | Lint with ESLint (enforces the architecture patterns). |
107
+
108
+ ## Project structure
109
+
110
+ ```
111
+ src/
112
+ ├── index.ts # entrypoint (bootstrap → cli)
113
+ ├── cli/ # CLI shell, menu, arg parsing, exit-code mapping
114
+ ├── config/ # two-phase resolver, RunConfig, the only reader of process.env
115
+ ├── retrieve/ # git clone shell-out, retrieval, temp-workspace lifecycle
116
+ ├── analyze/ # normalized model + deterministic metric functions (Groups A–F)
117
+ ├── narrate/ # AI client, reachability preflight, grounding check
118
+ ├── assemble/ # canonical Report JSON assembly + schema
119
+ ├── render/ # HTML / Markdown / Terminal / JSON renderers
120
+ ├── license/ # license validation and tier resolution
121
+ └── shared/ # errors, ui (stderr), Secret<string>, ports, types
122
+ ```
123
+
124
+ Only `cli/` and `config/` may touch `argv` / `env` / prompts; every stage from `retrieve/`
125
+ onward receives a frozen `RunConfig` (the hexagonal boundary). These conventions are
126
+ enforced by ESLint.
127
+
128
+ ## License
129
+
130
+ [MIT](LICENSE) © Georgios Nikitas. The CLI and its source are MIT-licensed; paid
131
+ tiers are enforced at runtime via an online license check (BYOK AI keys and git
132
+ tokens stay on your machine).