chekk 0.5.2 → 0.5.4

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/bin/chekk.js CHANGED
@@ -4,7 +4,7 @@ import { execSync, spawn } from 'child_process';
4
4
  import { Command } from 'commander';
5
5
  import { run } from '../src/index.js';
6
6
 
7
- const LOCAL_VERSION = '0.5.2';
7
+ const LOCAL_VERSION = '0.5.4';
8
8
 
9
9
  // ── Auto-update check ──
10
10
  // If running from a cached npx install, check if there's a newer version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chekk",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "See how you prompt. Chekk analyzes your AI coding workflow, tells you what kind of engineer you are, and shows what your habits actually cost.",
5
5
  "bin": {
6
6
  "chekk": "./bin/chekk.js"
package/src/display.js CHANGED
@@ -173,7 +173,7 @@ export function displayHeader() {
173
173
  console.log();
174
174
  const lines = [
175
175
  '',
176
- ` ${bold.white('chekk')}${dim(' v0.5.2')}`,
176
+ ` ${bold.white('chekk')}${dim(' v0.5.4')}`,
177
177
  ` ${dim('prompt engineering capability profile')}`,
178
178
  '',
179
179
  ];
@@ -213,10 +213,7 @@ export async function displayProgressBar(durationMs = 2000) {
213
213
  console.log();
214
214
  console.log();
215
215
  console.log(` ${green('\u2713')} ${dim('Profile generated.')}`);
216
- // Brief pause so user sees "Profile generated" before clearing
217
216
  await sleep(600);
218
- // Clear screen so results start at the top
219
- process.stdout.write('\x1b[2J\x1b[H');
220
217
  }
221
218
 
222
219
  // ══════════════════════════════════════════════
@@ -234,7 +231,7 @@ function displayProfileHeader(result, extra = {}) {
234
231
  console.log(` ${bold.white('PROMPT ENGINEERING CAPABILITY PROFILE')}`);
235
232
  console.log();
236
233
  if (sessionStats) {
237
- console.log(` ${dim(`Generated ${dateStr} | chekk v0.5.2`)}`);
234
+ console.log(` ${dim(`Generated ${dateStr} | chekk v0.5.4`)}`);
238
235
  console.log(` ${dim(`Analysis: ${sessionStats.totalSessions} sessions \u00B7 ${sessionStats.tools.length} tool${sessionStats.tools.length > 1 ? 's' : ''} \u00B7 ${numberFormat(sessionStats.totalExchanges)} exchanges`)}`);
239
236
  if (sessionStats.dateRangeShort) {
240
237
  console.log(` ${dim(`Period: ${sessionStats.dateRangeShort}`)}`);
package/src/index.js CHANGED
@@ -204,6 +204,16 @@ export async function run(options = {}) {
204
204
  }
205
205
 
206
206
  // ── Step 5: Display results ──
207
+ // Track line count so we can scroll back to top when done
208
+ let lineCount = 0;
209
+ const origWrite = process.stdout.write.bind(process.stdout);
210
+ process.stdout.write = function(chunk, ...args) {
211
+ if (typeof chunk === 'string') {
212
+ lineCount += (chunk.match(/\n/g) || []).length;
213
+ }
214
+ return origWrite(chunk, ...args);
215
+ };
216
+
207
217
  const extra = { scoreDelta, perToolScores, insights, sessionStats, tokenEfficiency };
208
218
  if (options.offline) {
209
219
  displayOffline(result, metrics, extra);
@@ -251,6 +261,13 @@ export async function run(options = {}) {
251
261
  console.log();
252
262
  }
253
263
  }
264
+
265
+ // ── Scroll to top of output ──
266
+ // Restore original write and scroll terminal back so profile starts at top
267
+ process.stdout.write = origWrite;
268
+ if (lineCount > 0 && process.stdout.isTTY) {
269
+ process.stdout.write(`\x1b[${lineCount}A`);
270
+ }
254
271
  }
255
272
 
256
273
  function formatDateRange(start, end) {