mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 22:26:38 +03:00
CLI changes (bumped to v2.1.2, skills stay at v2.1.1): - `npx impeccable skills check` compares local skill files against the latest bundle and reports whether updates are available - `npx impeccable skills update` now downloads the bundle first, compares hashes, and skips with "up to date" if nothing changed - Removed the local-modifications warning (was confusing for users who installed via npx skills add) Versioning: - CLI (package.json), skills (plugin.json/marketplace.json), and Chrome extension (manifest.json) are now versioned independently - CLAUDE.md updated to document when to bump each Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
65 lines
2.2 KiB
JavaScript
Executable File
65 lines
2.2 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Impeccable CLI
|
|
*
|
|
* Usage:
|
|
* npx impeccable detect [file-or-dir-or-url...]
|
|
* npx impeccable live [--port=PORT]
|
|
* npx impeccable live stop
|
|
* npx impeccable skills help|install|update
|
|
* npx impeccable --help
|
|
*/
|
|
|
|
import { readFileSync } from 'node:fs';
|
|
import { join, dirname } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const args = process.argv.slice(2);
|
|
const command = args[0];
|
|
|
|
if (!command || command === '--help' || command === '-h') {
|
|
console.log(`Usage: impeccable <command> [options]
|
|
|
|
Commands:
|
|
detect [file-or-dir-or-url...] Scan for UI anti-patterns and design quality issues
|
|
live [--port=PORT] Start browser detection overlay server
|
|
live stop Stop a running live server
|
|
skills help List all available skills and commands
|
|
skills install Install impeccable skills into your project
|
|
skills update Update skills to the latest version
|
|
skills check Check if skill updates are available
|
|
|
|
Options:
|
|
--help Show this help message
|
|
--version Show version number
|
|
|
|
Run 'impeccable <command> --help' for command-specific options.`);
|
|
process.exit(0);
|
|
}
|
|
|
|
if (command === '--version' || command === '-v') {
|
|
const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8'));
|
|
console.log(pkg.version);
|
|
process.exit(0);
|
|
}
|
|
|
|
if (command === 'detect') {
|
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
const { detectCli } = await import('../src/detect-antipatterns.mjs');
|
|
await detectCli();
|
|
} else if (command === 'live') {
|
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
const { liveCli } = await import('../src/detect-antipatterns.mjs');
|
|
await liveCli();
|
|
} else if (command === 'skills') {
|
|
const { run } = await import('./commands/skills.mjs');
|
|
await run(args.slice(1));
|
|
} else {
|
|
// Default: treat as detect arguments (allow `npx impeccable src/` shorthand)
|
|
process.argv = [process.argv[0], process.argv[1], ...args];
|
|
const { detectCli } = await import('../src/detect-antipatterns.mjs');
|
|
await detectCli();
|
|
}
|