@nerviq/cli 1.6.3 → 1.6.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/package.json +1 -1
- package/src/activity.js +5 -2
- package/src/audit.js +26 -5
- package/src/setup.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nerviq/cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "The intelligent nervous system for AI coding agents — 2,431 checks across 8 platforms, 10 languages, and 62 domain packs. Audit, align, and amplify.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
package/src/activity.js
CHANGED
|
@@ -283,11 +283,14 @@ function formatHistory(dir) {
|
|
|
283
283
|
|
|
284
284
|
const lines = ['Score history (most recent first):', ''];
|
|
285
285
|
for (const entry of history) {
|
|
286
|
-
const
|
|
286
|
+
const dateStr = entry.createdAt || 'unknown';
|
|
287
|
+
const date = dateStr.split('T')[0] || 'unknown';
|
|
288
|
+
const time = dateStr.includes('T') ? dateStr.split('T')[1]?.substring(0, 5) || '' : '';
|
|
289
|
+
const dateDisplay = time ? `${date} ${time}` : date;
|
|
287
290
|
const score = entry.summary?.score ?? '?';
|
|
288
291
|
const passed = entry.summary?.passed ?? '?';
|
|
289
292
|
const total = entry.summary?.checkCount ?? '?';
|
|
290
|
-
lines.push(` ${
|
|
293
|
+
lines.push(` ${dateDisplay} ${score}/100 (${passed}/${total} passing)`);
|
|
291
294
|
}
|
|
292
295
|
|
|
293
296
|
const comparison = compareLatest(dir);
|
package/src/audit.js
CHANGED
|
@@ -769,9 +769,10 @@ function inferSuggestedNextCommand(result) {
|
|
|
769
769
|
}
|
|
770
770
|
|
|
771
771
|
const actionKeys = new Set((result.topNextActions || []).map(item => item.key));
|
|
772
|
+
const platFlag = result.platform && result.platform !== 'claude' ? ` --platform ${result.platform}` : '';
|
|
772
773
|
|
|
773
774
|
if (result.failed === 0) {
|
|
774
|
-
return
|
|
775
|
+
return `npx nerviq${platFlag} augment`;
|
|
775
776
|
}
|
|
776
777
|
|
|
777
778
|
if (
|
|
@@ -781,14 +782,14 @@ function inferSuggestedNextCommand(result) {
|
|
|
781
782
|
actionKeys.has('settingsPermissions') ||
|
|
782
783
|
actionKeys.has('permissionDeny')
|
|
783
784
|
) {
|
|
784
|
-
return
|
|
785
|
+
return `npx nerviq${platFlag} setup`;
|
|
785
786
|
}
|
|
786
787
|
|
|
787
788
|
if (result.score < 80) {
|
|
788
|
-
return
|
|
789
|
+
return `npx nerviq${platFlag} suggest-only`;
|
|
789
790
|
}
|
|
790
791
|
|
|
791
|
-
return
|
|
792
|
+
return `npx nerviq${platFlag} augment`;
|
|
792
793
|
}
|
|
793
794
|
|
|
794
795
|
function getPlatformScopeNote(spec, ctx) {
|
|
@@ -876,7 +877,11 @@ function printLiteAudit(result, dir) {
|
|
|
876
877
|
console.log(colorize(' ═══════════════════════════════════════', 'dim'));
|
|
877
878
|
console.log(colorize(` Scanning: ${dir}`, 'dim'));
|
|
878
879
|
console.log('');
|
|
879
|
-
|
|
880
|
+
if (result.detectedConfigFiles && result.detectedConfigFiles.length > 0) {
|
|
881
|
+
console.log(colorize(` Found: ${result.detectedConfigFiles.join(', ')}`, 'dim'));
|
|
882
|
+
}
|
|
883
|
+
console.log('');
|
|
884
|
+
console.log(` Score: ${colorize(`${result.score}/100`, 'bold')} (${result.passed}/${result.passed + result.failed} checks passing)`);
|
|
880
885
|
if (result.platformScopeNote) {
|
|
881
886
|
console.log(colorize(` Scope: ${result.platformScopeNote.message}`, 'dim'));
|
|
882
887
|
}
|
|
@@ -1128,6 +1133,22 @@ async function audit(options) {
|
|
|
1128
1133
|
platformCaveats,
|
|
1129
1134
|
recommendedDomainPacks,
|
|
1130
1135
|
};
|
|
1136
|
+
// Detect which AI config files are present
|
|
1137
|
+
const configFiles = [];
|
|
1138
|
+
const configChecks = [
|
|
1139
|
+
['CLAUDE.md', 'CLAUDE.md'], ['.claude/settings.json', '.claude/settings.json'],
|
|
1140
|
+
['AGENTS.md', 'AGENTS.md'], ['.cursorrules', '.cursorrules'],
|
|
1141
|
+
['.cursor/rules', '.cursor/rules/'], ['GEMINI.md', 'GEMINI.md'],
|
|
1142
|
+
['.windsurfrules', '.windsurfrules'], ['.aider.conf.yml', '.aider.conf.yml'],
|
|
1143
|
+
['opencode.json', 'opencode.json'], ['.mcp.json', '.mcp.json'],
|
|
1144
|
+
];
|
|
1145
|
+
for (const [file, label] of configChecks) {
|
|
1146
|
+
try {
|
|
1147
|
+
if (require('fs').existsSync(require('path').join(options.dir, file))) configFiles.push(label);
|
|
1148
|
+
} catch {}
|
|
1149
|
+
}
|
|
1150
|
+
result.detectedConfigFiles = configFiles;
|
|
1151
|
+
|
|
1131
1152
|
result.suggestedNextCommand = inferSuggestedNextCommand(result);
|
|
1132
1153
|
result.liteSummary = {
|
|
1133
1154
|
topNextActions: topNextActions.slice(0, 3),
|
package/src/setup.js
CHANGED
|
@@ -1242,7 +1242,10 @@ async function setup(options) {
|
|
|
1242
1242
|
log(` \x1b[2m ${skipped} files already exist and were preserved.\x1b[0m`);
|
|
1243
1243
|
log(' \x1b[2m We never overwrite your existing config — your setup is kept.\x1b[0m');
|
|
1244
1244
|
} else if (created > 0) {
|
|
1245
|
-
log(` \x1b[1m${created} files created
|
|
1245
|
+
log(` \x1b[1m${created} files created:\x1b[0m`);
|
|
1246
|
+
for (const f of writtenFiles) {
|
|
1247
|
+
log(` \x1b[32m + ${f}\x1b[0m`);
|
|
1248
|
+
}
|
|
1246
1249
|
if (skipped > 0) {
|
|
1247
1250
|
log(` \x1b[2m${skipped} existing files preserved (not overwritten).\x1b[0m`);
|
|
1248
1251
|
}
|