commitshow 0.3.15 → 0.3.17

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 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` in local mode |
91
- | `commitshow status [target]` | Same render, no re-run |
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
- | `commitshow login` | Device-flow sign-in (coming soon) |
95
- | `commitshow whoami` | Print the linked account |
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.2` — device-flow login · `commitshow submit` · `--watch` mode · CI exit-code gate
210
- - `0.3` — `commitshow install <pack>` with {{VARIABLE}} substitution
211
- - `0.4` — MCP server variant (Cursor / Claude Desktop can call commit.show tools directly)
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
 
@@ -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[args.indexOf('--source') + 1]?.replace(/^-/, '') // tolerate --source X
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
- const VERSION = '0.2.11';
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.')}
@@ -17,7 +17,12 @@ export const c = {
17
17
  // matched the Claude Code logo too literally — CEO pulled it back to
18
18
  // brand on 2026-05-02.)
19
19
  pixelInk: rgb(0xF0, 0xC0, 0x40),
20
- cream: rgb(0xF8, 0xF5, 0xEE),
20
+ // `cream` was originally truecolor #F8F5EE (near-white), which is
21
+ // invisible on light-background terminals. Use the terminal's default
22
+ // foreground color (no escape) so body text reads on both light and
23
+ // dark backgrounds. The brand cream is preserved for accents (gold ·
24
+ // scarlet · teal) which stay readable on both.
25
+ cream: (s) => s,
21
26
  teal: rgb(0x00, 0xD4, 0xAA),
22
27
  scarlet: rgb(0xC8, 0x10, 0x2E),
23
28
  muted: rgb(0x6B, 0x72, 0x80),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commitshow",
3
- "version": "0.3.15",
3
+ "version": "0.3.17",
4
4
  "description": "commit.show CLI — audit any vibe-coded project from your terminal.",
5
5
  "type": "module",
6
6
  "bin": {