commitshow 0.1.4 → 0.1.6
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 +12 -7
- package/dist/commands/audit.js +17 -6
- package/dist/index.js +3 -1
- package/dist/lib/api.js +5 -3
- package/dist/lib/render.js +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# commit.show CLI
|
|
2
2
|
|
|
3
|
-
> Audit any vibe-coded project from your terminal.
|
|
4
|
-
|
|
5
|
-
The official CLI for **[commit.show](https://commit.show)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
> Audit any vibe-coded project from your terminal — the **walk-on** lane.
|
|
4
|
+
|
|
5
|
+
The official CLI for **[commit.show](https://commit.show)**. A walk-on
|
|
6
|
+
drops in, gets scored, and leaves — no signup, no audition fee, no league
|
|
7
|
+
entry. You get the same Claude-grade analysis used in the full season
|
|
8
|
+
(Audit / Scout / Community breakdown, 3 strengths + 2 concerns, rank,
|
|
9
|
+
delta since the last snapshot). Local runs also save `.commitshow/audit.md`
|
|
10
|
+
so your AI coding agent can read the report in the next turn and iterate.
|
|
11
|
+
|
|
12
|
+
When a walk-on is ready to enter the season for real — Scout forecasts,
|
|
13
|
+
season ranking, Backstage prompt-extraction, Hall of Fame — they audition
|
|
14
|
+
at <https://commit.show/submit>.
|
|
10
15
|
|
|
11
16
|
The npm package + command is `commitshow` (no dot — npm doesn't allow it in
|
|
12
17
|
package names). Everything else uses the brand `commit.show`.
|
package/dist/commands/audit.js
CHANGED
|
@@ -4,6 +4,7 @@ import { renderAudit, renderMarkdown, renderJson, renderUpsell, renderQuotaFoote
|
|
|
4
4
|
import { c } from '../lib/colors.js';
|
|
5
5
|
export async function audit(args) {
|
|
6
6
|
const asJson = args.includes('--json');
|
|
7
|
+
const force = args.includes('--refresh') || args.includes('--force');
|
|
7
8
|
const positional = args.find(a => !a.startsWith('--'));
|
|
8
9
|
let target;
|
|
9
10
|
try {
|
|
@@ -16,11 +17,17 @@ export async function audit(args) {
|
|
|
16
17
|
}
|
|
17
18
|
throw err;
|
|
18
19
|
}
|
|
19
|
-
if (!asJson)
|
|
20
|
-
|
|
20
|
+
if (!asJson) {
|
|
21
|
+
if (force)
|
|
22
|
+
console.log(c.dim(`Refreshing audit for ${target.slug}…`));
|
|
23
|
+
else
|
|
24
|
+
console.log(c.dim(`Auditing ${target.slug}…`));
|
|
25
|
+
}
|
|
21
26
|
// 1. Try cached/registered flow first — avoid re-running Claude if we
|
|
22
27
|
// already have the snapshot. Covers all full-audition projects.
|
|
23
|
-
|
|
28
|
+
// --refresh / --force skips this entirely and goes straight to audit-preview
|
|
29
|
+
// with force=true (counts against IP + URL + global rate limits).
|
|
30
|
+
const project = force ? null : await findProjectByGithubUrl(target.github_url);
|
|
24
31
|
if (project) {
|
|
25
32
|
const [snapshot, standing] = await Promise.all([
|
|
26
33
|
fetchLatestSnapshot(project.id),
|
|
@@ -77,9 +84,13 @@ export async function audit(args) {
|
|
|
77
84
|
}
|
|
78
85
|
// 2. Unregistered repo — kick off a preview audit. Full Claude depth,
|
|
79
86
|
// no season entry. Rate-limited server-side.
|
|
80
|
-
if (!asJson)
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
if (!asJson) {
|
|
88
|
+
if (force)
|
|
89
|
+
console.log(c.dim('Forcing a fresh audit · counts against your daily IP cap…'));
|
|
90
|
+
else
|
|
91
|
+
console.log(c.dim('First time on commit.show for this repo — running a preview audit…'));
|
|
92
|
+
}
|
|
93
|
+
const result = await runPreviewAudit(target.github_url, undefined, { force });
|
|
83
94
|
// Error envelope
|
|
84
95
|
if ('error' in result) {
|
|
85
96
|
const err = result;
|
package/dist/index.js
CHANGED
|
@@ -5,9 +5,10 @@ import { status } from './commands/status.js';
|
|
|
5
5
|
import { login } from './commands/login.js';
|
|
6
6
|
import { whoami } from './commands/whoami.js';
|
|
7
7
|
import { c } from './lib/colors.js';
|
|
8
|
-
const VERSION = '0.1.
|
|
8
|
+
const VERSION = '0.1.5';
|
|
9
9
|
const USAGE = `
|
|
10
10
|
${c.bold(c.gold('commit.show'))} ${c.dim(`v${VERSION}`)} ${c.muted('—')} ${c.cream('audit any vibe-coded project from your terminal.')}
|
|
11
|
+
${c.muted('the')} ${c.gold('walk-on')} ${c.muted('lane: drop in, get scored, leave · no signup, no audition, no league entry.')}
|
|
11
12
|
|
|
12
13
|
${c.muted('USAGE')}
|
|
13
14
|
${c.cream('commitshow')} ${c.gold('<command>')} [target] [flags] ${c.dim('# CLI is `commitshow` (no dot — npm constraint)')}
|
|
@@ -22,6 +23,7 @@ ${c.muted('COMMANDS')}
|
|
|
22
23
|
|
|
23
24
|
${c.muted('FLAGS')}
|
|
24
25
|
${c.gold('--json')} stable machine-readable output (for agents · CI · jq pipes)
|
|
26
|
+
${c.gold('--refresh')} bypass the 7-day cache · re-run a fresh audit ${c.dim('(counts against IP cap)')}
|
|
25
27
|
|
|
26
28
|
${c.muted('TARGET FORMS')} ${c.dim('(default: cwd)')}
|
|
27
29
|
${c.cream('commitshow audit')} ${c.dim('# cwd · git remote origin')}
|
package/dist/lib/api.js
CHANGED
|
@@ -61,12 +61,14 @@ export async function fetchStanding(projectId) {
|
|
|
61
61
|
const rows = await rest(`/season_standings?project_id=eq.${projectId}&limit=1`);
|
|
62
62
|
return rows[0] ?? null;
|
|
63
63
|
}
|
|
64
|
-
/** Kicks off (or returns cached) a preview audit. 202 → poll; 200 → done.
|
|
65
|
-
|
|
64
|
+
/** Kicks off (or returns cached) a preview audit. 202 → poll; 200 → done.
|
|
65
|
+
* force=true skips the 7-day cache and forces a fresh analyze-project run.
|
|
66
|
+
* Counts against IP + URL + global rate limits (real Claude spend). */
|
|
67
|
+
export async function runPreviewAudit(githubUrl, liveUrl, opts = {}) {
|
|
66
68
|
const res = await fetch(`${baseUrl()}/functions/v1/audit-preview`, {
|
|
67
69
|
method: 'POST',
|
|
68
70
|
headers: headers(),
|
|
69
|
-
body: JSON.stringify({ github_url: githubUrl, live_url: liveUrl }),
|
|
71
|
+
body: JSON.stringify({ github_url: githubUrl, live_url: liveUrl, force: opts.force === true }),
|
|
70
72
|
});
|
|
71
73
|
const body = await res.json().catch(() => ({ error: 'invalid_json' }));
|
|
72
74
|
if (res.status === 202)
|
package/dist/lib/render.js
CHANGED
|
@@ -483,11 +483,15 @@ function wrapText(s, width) {
|
|
|
483
483
|
}
|
|
484
484
|
export function renderUpsell() {
|
|
485
485
|
const lines = [];
|
|
486
|
-
|
|
486
|
+
// "Walk-on" — anyone running CLI without auditioning. Theatre-coherent
|
|
487
|
+
// (Audition / Audit / Stage / Backstage / Walk-on) · friendlier than
|
|
488
|
+
// "preview" (which doubles as our DB status) · positions audition as the
|
|
489
|
+
// upgrade path without making the walk-on tier feel lesser.
|
|
490
|
+
const titleVisible = 'Walk-on · drop-in audit, no audition yet';
|
|
487
491
|
const headVisible = 'Audition to unlock:';
|
|
488
492
|
const ctaVisible = '→ https://commit.show/submit';
|
|
489
493
|
lines.push(' ' + boxTop());
|
|
490
|
-
lines.push(' ' + boxRow(titleVisible.length, c.bold(c.gold('
|
|
494
|
+
lines.push(' ' + boxRow(titleVisible.length, c.bold(c.gold('Walk-on')) + c.muted(' · ') + c.cream('drop-in audit, no audition yet')));
|
|
491
495
|
lines.push(' ' + boxBlank());
|
|
492
496
|
lines.push(' ' + boxRow(headVisible.length, c.cream(headVisible)));
|
|
493
497
|
// Backstage = our brand for the prompt-extraction analysis (Phase 2 brief).
|