@@ -291,15 +291,32 @@ async function promptToContinue() {
291291}
292292
293293async function selectAndShowHookInfo ( ) {
294+ const hooksDir = path . join ( process . env . HOME , '.claude' , 'hooks' ) ;
295+
294296 const { hookName } = await inquirer . prompt ( [
295297 {
296298 type : 'list' ,
297299 name : 'hookName' ,
298300 message : 'Select a hook to learn more:' ,
299- choices : Object . keys ( hooks ) . map ( name => ( {
300- name : `${ name } - ${ hooks [ name ] . description } ` ,
301- value : name
302- } ) )
301+ choices : Object . keys ( hooks ) . map ( name => {
302+ // Check status
303+ const hookPath = path . join ( hooksDir , `${ name } .py` ) ;
304+ const disabledPath = path . join ( hooksDir , `${ name } .py.disabled` ) ;
305+
306+ let status = '' ;
307+ if ( fs . existsSync ( hookPath ) ) {
308+ status = chalk . green ( '●' ) + ' ' ;
309+ } else if ( fs . existsSync ( disabledPath ) ) {
310+ status = chalk . red ( '●' ) + ' ' ;
311+ } else {
312+ status = chalk . gray ( '○' ) + ' ' ;
313+ }
314+
315+ return {
316+ name : `${ status } ${ name } - ${ hooks [ name ] . description } ` ,
317+ value : name
318+ } ;
319+ } )
303320 }
304321 ] ) ;
305322
@@ -430,9 +447,27 @@ async function selectAndRemoveHook() {
430447
431448function listHooks ( ) {
432449 console . log ( chalk . cyan ( '\nAvailable Claude Code Hooks:\n' ) ) ;
450+
451+ const hooksDir = path . join ( process . env . HOME , '.claude' , 'hooks' ) ;
452+
433453 Object . entries ( hooks ) . forEach ( ( [ name , info ] ) => {
434- console . log ( chalk . yellow ( ` ${ name } .py` . padEnd ( 35 ) ) + chalk . gray ( info . description ) ) ;
454+ // Check if hook is enabled or disabled
455+ const hookPath = path . join ( hooksDir , `${ name } .py` ) ;
456+ const disabledPath = path . join ( hooksDir , `${ name } .py.disabled` ) ;
457+
458+ let status = '' ;
459+ if ( fs . existsSync ( hookPath ) ) {
460+ status = chalk . green ( '●' ) + ' ' ; // Green dot for enabled
461+ } else if ( fs . existsSync ( disabledPath ) ) {
462+ status = chalk . red ( '●' ) + ' ' ; // Red dot for disabled
463+ } else {
464+ status = chalk . gray ( '○' ) + ' ' ; // Gray circle for not installed
465+ }
466+
467+ console . log ( ` ${ status } ${ chalk . yellow ( `${ name } .py` . padEnd ( 33 ) ) } ${ chalk . gray ( info . description ) } ` ) ;
435468 } ) ;
469+
470+ console . log ( '\n' + chalk . gray ( ' ● Enabled ● Disabled ○ Not Installed' ) ) ;
436471 console . log ( ) ;
437472}
438473
@@ -484,9 +519,14 @@ async function showStatus() {
484519 if ( fs . existsSync ( hooksDir ) ) {
485520 console . log ( chalk . green ( '✅ Hooks directory exists' ) ) ;
486521
487- // Count installed hooks
488- const installedHooks = fs . readdirSync ( hooksDir ) . filter ( f => f . endsWith ( '.py' ) ) ;
489- console . log ( chalk . gray ( ` ${ installedHooks . length } hooks installed` ) ) ;
522+ // Count hooks by status
523+ const allFiles = fs . readdirSync ( hooksDir ) ;
524+ const enabledHooks = allFiles . filter ( f => f . endsWith ( '.py' ) && ! f . endsWith ( '.disabled' ) ) ;
525+ const disabledHooks = allFiles . filter ( f => f . endsWith ( '.py.disabled' ) ) ;
526+
527+ console . log ( chalk . gray ( ` ${ chalk . green ( '●' ) } ${ enabledHooks . length } hooks enabled` ) ) ;
528+ console . log ( chalk . gray ( ` ${ chalk . red ( '●' ) } ${ disabledHooks . length } hooks disabled` ) ) ;
529+ console . log ( chalk . gray ( ` ${ enabledHooks . length + disabledHooks . length } total hooks installed` ) ) ;
490530 } else {
491531 console . log ( chalk . red ( '❌ Hooks directory not found' ) ) ;
492532 console . log ( chalk . gray ( ' Run "claude-hooks install" to set up' ) ) ;
0 commit comments