@@ -20,7 +20,8 @@ import { status } from './commands/status.js';
2020import { stop } from './commands/stop.js' ;
2121import { crash , fail , failUsage } from './errors.js' ;
2222import { availableCommands , isHelpableCommand , printCommandHelp , START_OPTIONS } from './help.js' ;
23- import { commandPrefix , getMode } from './mode.js' ;
23+ import { commandPrefix , getMode , isLocal } from './mode.js' ;
24+ import { displaySplash } from './splash.js' ;
2425import { closestMatch } from './suggest.js' ;
2526import { getVersion , getVersionLine } from './version.js' ;
2627
@@ -50,13 +51,13 @@ function renderStartOptions(): string {
5051 return START_OPTIONS . map ( ( [ flag , desc ] ) => ` ${ flag . padEnd ( flagWidth ) } ${ desc } ` ) . join ( '\n' ) ;
5152}
5253
53- function showHelp ( ) : void {
54+ function showHelp ( withSplash : boolean ) : void {
5455 const mode = getMode ( ) ;
5556 const prefix = commandPrefix ( ) ;
5657
57- console . log ( `
58- Shannon - AI Penetration Testing Framework
58+ const header = withSplash ? '' : '\nShannon - AI Penetration Testing Framework\n' ;
5959
60+ console . log ( `${ header }
6061Usage:${
6162 mode === 'local'
6263 ? ''
@@ -89,14 +90,7 @@ Examples:
8990 ${ prefix } reset
9091
9192Run '${ prefix } <command> --help' for help on a specific command.
92- ${
93- mode === 'local'
94- ? `
95- State directory: ./workspaces/`
96- : `
97- State directory: ~/.shannon/`
98- }
99- Monitor scans at http://localhost:8233
93+
10094Docs & source: https://github.com/KeygraphHQ/shannon
10195` ) ;
10296}
@@ -174,7 +168,9 @@ async function main(): Promise<void> {
174168 if ( topic && isHelpableCommand ( topic ) ) {
175169 printCommandHelp ( topic ) ;
176170 } else {
177- showHelp ( ) ;
171+ const bare = command === undefined ;
172+ if ( bare ) displaySplash ( isLocal ( ) ? undefined : getVersion ( ) ) ;
173+ showHelp ( bare ) ;
178174 }
179175 return ;
180176 }
0 commit comments