hermes-git 0.3.1 → 0.3.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 (3) hide show
  1. package/README.md +82 -73
  2. package/dist/index.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -42,6 +42,8 @@ hermes wip
42
42
 
43
43
  No magic. Every command shows exactly what git operations it runs.
44
44
 
45
+ Run `hermes` with no arguments to see the full command reference and available workflows.
46
+
45
47
  ---
46
48
 
47
49
  ## Installation
@@ -78,7 +80,7 @@ hermes config set provider gemini
78
80
  hermes config set gemini-key AIza...
79
81
  ```
80
82
 
81
- Verify it worked:
83
+ Verify:
82
84
 
83
85
  ```bash
84
86
  hermes config list
@@ -93,7 +95,7 @@ hermes config list
93
95
  npm install -g hermes-git
94
96
  hermes config setup
95
97
 
96
- # 2. Initialize your project (optional, enables team config sharing)
98
+ # 2. Initialize your project (optional enables team config sharing)
97
99
  cd your-project
98
100
  hermes init
99
101
 
@@ -105,13 +107,26 @@ hermes start "user authentication"
105
107
 
106
108
  ## Commands
107
109
 
110
+ ### `hermes update`
111
+
112
+ Update hermes to the latest version.
113
+
114
+ ```bash
115
+ hermes update # check and install if a newer version exists
116
+ hermes update --check # check only, don't install
117
+ ```
118
+
119
+ Auto-detects your package manager (npm, bun, or pnpm).
120
+
121
+ ---
122
+
108
123
  ### `hermes config`
109
124
 
110
125
  Manage API keys and provider settings.
111
126
 
112
127
  ```bash
113
- hermes config setup # Interactive wizard
114
- hermes config list # Show current config (keys masked)
128
+ hermes config setup # interactive wizard
129
+ hermes config list # show current config (keys masked, sources shown)
115
130
  hermes config set provider openai
116
131
  hermes config set openai-key sk-...
117
132
  hermes config get provider
@@ -122,6 +137,52 @@ Config is stored in `~/.config/hermes/config.json`. You can also use environment
122
137
 
123
138
  ---
124
139
 
140
+ ### `hermes guard`
141
+
142
+ Scan staged files for secrets and sensitive content before committing.
143
+
144
+ ```bash
145
+ hermes guard
146
+ ```
147
+
148
+ Scans every staged file for:
149
+
150
+ - **Sensitive filenames** — `.env`, `id_rsa`, `*.pem`, `credentials.json`, `google-services.json`, etc.
151
+ - **API keys** — Anthropic, OpenAI, Google, AWS, GitHub, Stripe, SendGrid, Twilio
152
+ - **Private key headers** — `-----BEGIN PRIVATE KEY-----` and variants
153
+ - **Database URLs** with embedded credentials — `postgres://user:pass@host`
154
+ - **Hardcoded passwords/tokens** — common assignment patterns
155
+
156
+ Findings are categorised as `BLOCKED` (definite secret) or `WARN` (suspicious). The AI explains each finding and what to do about it, then you choose: abort, unstage the flagged files, or proceed anyway.
157
+
158
+ ```
159
+ BLOCKED src/config.ts
160
+ ● Anthropic API key line 12
161
+ apiKey: "sk-a...****",
162
+ Rotate at: https://console.anthropic.com/settings/keys
163
+
164
+ What this means:
165
+ This key gives anyone with repo access full billing access to your
166
+ Anthropic account. Rotate it immediately and load it from an
167
+ environment variable instead.
168
+
169
+ ? Blocked secrets found. What do you want to do?
170
+ ❯ Abort — I will fix these before committing
171
+ Unstage the flagged files and continue
172
+ Proceed anyway (I know what I'm doing)
173
+ ```
174
+
175
+ **Install as a git pre-commit hook** so it runs automatically on every commit:
176
+
177
+ ```bash
178
+ hermes guard install-hook # installs to .git/hooks/pre-commit
179
+ hermes guard uninstall-hook # removes it
180
+ ```
181
+
182
+ In hook mode the scan is non-interactive: prints findings to stderr and exits 1 on any blocker.
183
+
184
+ ---
185
+
125
186
  ### `hermes plan "<intent>"`
126
187
 
127
188
  Analyze repo state and propose a safe Git plan. **Makes no changes.**
@@ -154,7 +215,7 @@ hermes sync
154
215
  hermes sync --from develop
155
216
  ```
156
217
 
157
- Hermes evaluates whether rebase or merge is safer given your branch state and explains before executing.
218
+ Evaluates whether rebase or merge is safer given your branch state and explains before executing.
158
219
 
159
220
  ---
160
221
 
@@ -171,55 +232,6 @@ Decides commit vs stash based on what's safest in your current state.
171
232
 
172
233
  ---
173
234
 
174
- ### `hermes guard`
175
-
176
- Scan staged files for secrets and sensitive content before committing.
177
-
178
- ```bash
179
- hermes guard
180
- ```
181
-
182
- Hermes scans every staged file for:
183
-
184
- - **Sensitive filenames** — `.env`, `id_rsa`, `*.pem`, `credentials.json`, `google-services.json`, etc.
185
- - **API keys** — Anthropic, OpenAI, Google, AWS, GitHub, Stripe, SendGrid, Twilio
186
- - **Private key headers** — `-----BEGIN PRIVATE KEY-----` and variants
187
- - **Database URLs** with embedded credentials — `postgres://user:pass@host`
188
- - **Hardcoded passwords/tokens** — common assignment patterns
189
-
190
- Findings are categorized as `BLOCKED` (definite secret) or `WARN` (suspicious). The AI explains each finding and what to do about it. Then you choose: abort, unstage the flagged files, or proceed anyway.
191
-
192
- ```
193
- BLOCKED src/config.ts
194
- ● Anthropic API key line 12
195
- apiKey: "sk-a...****",
196
- Rotate at: https://console.anthropic.com/settings/keys
197
- ● Database URL with credentials line 15
198
- dbUrl: "post...****prod.db.internal/app"
199
-
200
- What this means:
201
- The Anthropic API key on line 12 would give anyone with repository
202
- access full billing access to your Anthropic account. Rotate it
203
- immediately and use process.env.ANTHROPIC_API_KEY instead.
204
- ...
205
-
206
- ? Blocked secrets found. What do you want to do?
207
- ❯ Abort — I will fix these before committing
208
- Unstage the flagged files and continue
209
- Proceed anyway (I know what I'm doing)
210
- ```
211
-
212
- **Install as a git pre-commit hook** so it runs automatically on every commit:
213
-
214
- ```bash
215
- hermes guard install-hook # installs to .git/hooks/pre-commit
216
- hermes guard uninstall-hook # removes it
217
- ```
218
-
219
- In hook mode (`--hook`), the scan is non-interactive: it prints findings to stderr and exits 1 on any blocker.
220
-
221
- ---
222
-
223
235
  ### `hermes conflict explain`
224
236
 
225
237
  Understand why a conflict exists.
@@ -246,15 +258,17 @@ For each file: shows a proposed resolution, lets you accept, edit manually, or s
246
258
 
247
259
  ### `hermes workflow <name>`
248
260
 
249
- One-command workflows for common patterns.
261
+ One-command workflows for common patterns. Available workflows are shown when you run `hermes` with no arguments.
250
262
 
251
263
  ```bash
252
264
  hermes workflow pr-ready # fetch → rebase → push --force-with-lease
253
265
  hermes workflow daily-sync # fetch all → show status → suggest next action
254
266
  hermes workflow quick-commit # generate commit message from staged diff
255
- hermes workflow list # show available workflows
267
+ hermes workflow list # show all workflows including project-specific
256
268
  ```
257
269
 
270
+ Define project-specific workflows in `.hermes/config.json` and they appear automatically in the help output.
271
+
258
272
  ---
259
273
 
260
274
  ### `hermes worktree new "<task>"`
@@ -273,8 +287,8 @@ hermes worktree new "fix memory leak"
273
287
  Initialize project-level config (`.hermes/config.json`). Commit this to share branch patterns and workflows with your team.
274
288
 
275
289
  ```bash
276
- hermes init # Interactive
277
- hermes init --quick # Use defaults
290
+ hermes init # interactive
291
+ hermes init --quick # use defaults
278
292
  ```
279
293
 
280
294
  ---
@@ -301,6 +315,8 @@ Hermes resolves config in this priority order:
301
315
  | `.env` file in current dir | `ANTHROPIC_API_KEY=sk-ant-...` |
302
316
  | `~/.config/hermes/config.json` | set via `hermes config set` |
303
317
 
318
+ Environment variables always win — useful for CI and Docker environments where you don't want a config file.
319
+
304
320
  **Supported env vars:**
305
321
 
306
322
  | Variable | Description |
@@ -326,9 +342,9 @@ If `HERMES_PROVIDER` is not set, Hermes auto-detects by using whichever key it f
326
342
 
327
343
  1. **Reads your repo state** — branch, commits, dirty files, conflicts, remote tracking
328
344
  2. **Sends context + intent to an AI** — using your configured provider
329
- 3. **Validates the response** — all returned commands must start with `git`, destructive flags are blocked
345
+ 3. **Validates the response** — all returned commands must start with `git`; destructive flags are blocked
330
346
  4. **Executes with display** — shows every command before running it
331
- 5. **You always stay in control** — interactive prompts for anything irreversible
347
+ 5. **You stay in control** — interactive prompts for anything irreversible
332
348
 
333
349
  ---
334
350
 
@@ -350,30 +366,23 @@ If `HERMES_PROVIDER` is not set, Hermes auto-detects by using whichever key it f
350
366
  hermes config setup
351
367
  ```
352
368
 
353
- **Wrong provider selected**
369
+ **Wrong provider being used**
354
370
 
355
371
  ```bash
356
372
  hermes config set provider anthropic
357
- hermes config list # verify
373
+ hermes config list # check sources — env vars override saved config
358
374
  ```
359
375
 
360
- **Key saved but not working**
376
+ **Key set but not working**
361
377
 
362
378
  ```bash
363
- # Check what Hermes sees
364
- hermes config list
365
-
366
- # Environment variables override saved config
367
- # Check for conflicting vars:
368
- echo $ANTHROPIC_API_KEY
379
+ hermes config list # shows value and where it came from (env / .env / config)
369
380
  ```
370
381
 
371
- **General debugging**
382
+ **Update to latest**
372
383
 
373
384
  ```bash
374
- hermes --version
375
- hermes config list
376
- git status
385
+ hermes update
377
386
  ```
378
387
 
379
388
  ---
package/dist/index.js CHANGED
@@ -38889,7 +38889,7 @@ function printWorkflows() {
38889
38889
 
38890
38890
  // src/index.ts
38891
38891
  var program2 = new Command;
38892
- var CURRENT_VERSION = "0.3.1";
38892
+ var CURRENT_VERSION = "0.3.2";
38893
38893
  program2.name("hermes").description("Intent-driven Git, guided by AI").version(CURRENT_VERSION).action(() => {
38894
38894
  printBanner(CURRENT_VERSION);
38895
38895
  printWorkflows();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hermes-git",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Intent-driven Git, guided by AI. Turn natural language into safe, explainable Git operations.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",