commitshow 0.3.15 → 0.3.16
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 +41 -7
- package/dist/commands/audit.js +8 -1
- package/dist/index.js +17 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -87,12 +87,46 @@ Requires **Node 20+**.
|
|
|
87
87
|
|
|
88
88
|
| Command | What it does |
|
|
89
89
|
|---|---|
|
|
90
|
-
| `commitshow audit [target]` | Fetch + render the latest audit, write `.commitshow/audit.md`
|
|
91
|
-
| `commitshow status [target]` | Same render
|
|
90
|
+
| `commitshow audit [target] [--json] [--refresh] [--source=<tag>]` | Fetch + render the latest audit, write `.commitshow/audit.{md,json}` |
|
|
91
|
+
| `commitshow status [target]` | Same render as `audit`, no re-run |
|
|
92
|
+
| `commitshow login [--no-open] [--token <jwt>]` | Device-flow sign-in via browser approval |
|
|
93
|
+
| `commitshow whoami [--logout]` | Print the linked account · `--logout` clears the saved token |
|
|
92
94
|
| `commitshow submit [target]` | Audition a project (coming soon · needs login) |
|
|
93
95
|
| `commitshow install <pack>` | Install a Library artifact (coming soon) |
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
|
|
97
|
+
### Sign in for higher rate limits
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npx commitshow@latest login
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Opens `commit.show/cli/link?code=<6-hex>` in your browser. After you
|
|
104
|
+
click Authorize there, the CLI receives a 90-day JWT and saves it to
|
|
105
|
+
`~/.commitshow/config.json` (file mode 0600). Subsequent calls send
|
|
106
|
+
the token in the Authorization header automatically.
|
|
107
|
+
|
|
108
|
+
What changes once signed in:
|
|
109
|
+
|
|
110
|
+
- Per-IP rate cap goes from **20 audits/day** to **50/day**
|
|
111
|
+
- Newly audited preview projects auto-claim ownership (visible at
|
|
112
|
+
[commit.show/me](https://commit.show/me) → MY AUDITS)
|
|
113
|
+
- `commitshow whoami` prints your member id + email
|
|
114
|
+
|
|
115
|
+
Headless / CI? Use `--token <jwt>` to skip the browser handshake.
|
|
116
|
+
|
|
117
|
+
### Telemetry source flag
|
|
118
|
+
|
|
119
|
+
`--source=<tag>` lets you self-report how the call originated:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
npx commitshow audit . --source=claude-code
|
|
123
|
+
COMMITSHOW_SOURCE=cursor npx commitshow audit .
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Common tags: `claude-code` · `cursor` · `gemini-cli` · `codex` ·
|
|
127
|
+
`antigravity` · `production-audit-skill` · any 64-char string. Drops
|
|
128
|
+
into the maintainer's admin breakdown so we can see which agent
|
|
129
|
+
ecosystems are driving installs. Skip the flag to stay anonymous.
|
|
96
130
|
|
|
97
131
|
### Target forms
|
|
98
132
|
|
|
@@ -206,9 +240,9 @@ changes do. Known keys: `project`, `score`, `standing`, `strengths`, `concerns`,
|
|
|
206
240
|
## Roadmap
|
|
207
241
|
|
|
208
242
|
- `0.1` — ✓ read-only audit · status · `--json` · target auto-detect · sidecar files
|
|
209
|
-
- `0.
|
|
210
|
-
- `0.
|
|
211
|
-
- `0.
|
|
243
|
+
- `0.3` — ✓ device-flow login · `--source` telemetry · User-Agent self-report · MCP server (`commitshow-mcp`)
|
|
244
|
+
- `0.4` — `commitshow submit` · `--watch` mode · CI exit-code gate · refresh-token flow
|
|
245
|
+
- `0.5` — `commitshow install <pack>` with {{VARIABLE}} substitution
|
|
212
246
|
|
|
213
247
|
## Links
|
|
214
248
|
|
package/dist/commands/audit.js
CHANGED
|
@@ -11,8 +11,15 @@ export async function audit(args) {
|
|
|
11
11
|
// the COMMITSHOW_SOURCE env var (used by IDE plugins that wrap the
|
|
12
12
|
// CLI) and ultimately empty string. Surfaced in /admin > CLI 사용
|
|
13
13
|
// tab as a distribution chart.
|
|
14
|
+
// --source X (space form): only consume args[idx+1] when --source actually
|
|
15
|
+
// appears. Old code used `args.indexOf('--source') + 1` unguarded, which
|
|
16
|
+
// returns 0 when --source is absent — making the FIRST positional arg
|
|
17
|
+
// (e.g. the target URL) get misread as the source value, then filtered
|
|
18
|
+
// out of `positional` below. Result: target URL silently dropped, CLI
|
|
19
|
+
// falls back to cwd and reports "no git remote".
|
|
20
|
+
const sourceIdx = args.indexOf('--source');
|
|
14
21
|
const sourceFlag = args.find(a => a.startsWith('--source='))?.split('=')[1]
|
|
15
|
-
?? args[
|
|
22
|
+
?? (sourceIdx >= 0 ? args[sourceIdx + 1] : undefined)
|
|
16
23
|
?? process.env.COMMITSHOW_SOURCE
|
|
17
24
|
?? null;
|
|
18
25
|
const positional = args.find(a => !a.startsWith('--') && a !== sourceFlag);
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
1
4
|
import { audit } from './commands/audit.js';
|
|
2
5
|
import { submit } from './commands/submit.js';
|
|
3
6
|
import { install } from './commands/install.js';
|
|
@@ -6,7 +9,20 @@ import { login } from './commands/login.js';
|
|
|
6
9
|
import { whoami } from './commands/whoami.js';
|
|
7
10
|
import { c } from './lib/colors.js';
|
|
8
11
|
import { checkLatestVersion, formatUpdateBanner } from './lib/version-check.js';
|
|
9
|
-
|
|
12
|
+
// Read version from package.json at runtime so a hardcoded constant
|
|
13
|
+
// can't go stale across publishes. (Previous incident: source said
|
|
14
|
+
// '0.2.11' while npm shipped 0.3.x — every binary nagged users to
|
|
15
|
+
// upgrade to a version they were already on.)
|
|
16
|
+
const VERSION = (() => {
|
|
17
|
+
try {
|
|
18
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
const pkg = JSON.parse(readFileSync(join(here, '..', 'package.json'), 'utf8'));
|
|
20
|
+
return pkg.version ?? '0.0.0';
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return '0.0.0';
|
|
24
|
+
}
|
|
25
|
+
})();
|
|
10
26
|
const USAGE = `
|
|
11
27
|
${c.bold(c.gold('commit.show'))} ${c.dim(`v${VERSION}`)} ${c.muted('—')} ${c.cream('audit any vibe-coded project from your terminal.')}
|
|
12
28
|
${c.muted('the')} ${c.gold('walk-on')} ${c.muted('lane: drop in, get scored, leave · no signup, no audition, no league entry.')}
|