@rigour-labs/cli 3.0.0 → 3.0.1

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/dist/cli.js CHANGED
@@ -10,6 +10,7 @@ import { indexCommand } from './commands/index.js';
10
10
  import { studioCommand } from './commands/studio.js';
11
11
  import { exportAuditCommand } from './commands/export-audit.js';
12
12
  import { demoCommand } from './commands/demo.js';
13
+ import { hooksInitCommand } from './commands/hooks.js';
13
14
  import { checkForUpdates } from './utils/version.js';
14
15
  import chalk from 'chalk';
15
16
  const CLI_VERSION = '2.0.0';
@@ -114,13 +115,23 @@ Examples:
114
115
  program
115
116
  .command('demo')
116
117
  .description('Run a live demo — see Rigour catch AI drift, security issues, and structural violations')
118
+ .option('--cinematic', 'Screen-recording mode: typewriter effects, simulated AI agent, before/after scores')
119
+ .option('--hooks', 'Focus on real-time hooks catching issues as AI writes code')
120
+ .option('--speed <speed>', 'Pacing: fast, normal, slow (default: normal)', 'normal')
117
121
  .addHelpText('after', `
118
122
  Examples:
119
123
  $ rigour demo # Run the flagship demo
124
+ $ rigour demo --cinematic # Screen-recording optimized (great for GIFs)
125
+ $ rigour demo --cinematic --speed slow # Slower pacing for presentations
126
+ $ rigour demo --hooks # Focus on hooks catching issues
120
127
  $ npx @rigour-labs/cli demo # Try without installing
121
128
  `)
122
- .action(async () => {
123
- await demoCommand();
129
+ .action(async (options) => {
130
+ await demoCommand({
131
+ cinematic: !!options.cinematic,
132
+ hooks: !!options.hooks,
133
+ speed: options.speed || 'normal',
134
+ });
124
135
  });
125
136
  program
126
137
  .command('guide')
@@ -134,6 +145,27 @@ program
134
145
  .action(async () => {
135
146
  await setupCommand();
136
147
  });
148
+ const hooksCmd = program
149
+ .command('hooks')
150
+ .description('Manage AI coding tool hook integrations');
151
+ hooksCmd
152
+ .command('init')
153
+ .description('Generate hook configs for AI coding tools (Claude, Cursor, Cline, Windsurf)')
154
+ .option('-t, --tool <name>', 'Target tool(s): claude, cursor, cline, windsurf, all. Auto-detects if not specified.')
155
+ .option('--dry-run', 'Show what files would be created without writing them')
156
+ .option('-f, --force', 'Overwrite existing hook files')
157
+ .option('--block', 'Configure hooks to block on failure (exit code 2)')
158
+ .addHelpText('after', `
159
+ Examples:
160
+ $ rigour hooks init # Auto-detect tools, generate hooks
161
+ $ rigour hooks init --tool claude # Generate Claude Code hooks only
162
+ $ rigour hooks init --tool all # Generate hooks for all tools
163
+ $ rigour hooks init --dry-run # Preview without writing files
164
+ $ rigour hooks init --tool cursor -f # Force overwrite Cursor hooks
165
+ `)
166
+ .action(async (options) => {
167
+ await hooksInitCommand(process.cwd(), options);
168
+ });
137
169
  // Check for updates before parsing (non-blocking)
138
170
  (async () => {
139
171
  try {
@@ -2,15 +2,22 @@
2
2
  * rigour demo
3
3
  *
4
4
  * Creates a temp project with intentional AI-generated code issues,
5
- * runs Rigour against it, and shows the full experience:
6
- * 1. Scaffolds a broken codebase
7
- * 2. Runs quality gates → FAIL with violations
8
- * 3. Shows the fix packet
9
- * 4. Exports an audit report
10
- * 5. Cleans up
5
+ * runs Rigour against it, and shows the full experience.
6
+ *
7
+ * Modes:
8
+ * Default: Fast demo scaffold → check → results
9
+ * --cinematic: Screen-recording optimized typewriter effects, pauses,
10
+ * simulated AI agent writing code, hooks catching issues
11
+ * --hooks: Focus on the real-time hooks experience
12
+ * --speed: Control pacing (fast / normal / slow)
11
13
  *
12
14
  * The "flagship demo" — one command to understand Rigour.
13
15
  *
14
- * @since v2.17.0
16
+ * @since v2.17.0 (extended v3.0.0)
15
17
  */
16
- export declare function demoCommand(): Promise<void>;
18
+ export interface DemoOptions {
19
+ cinematic?: boolean;
20
+ hooks?: boolean;
21
+ speed?: 'fast' | 'normal' | 'slow';
22
+ }
23
+ export declare function demoCommand(options?: DemoOptions): Promise<void>;