File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,19 @@ Welcome to the Netlify AI command! This is a foundation for AI-powered developme
10
10
11
11
${ chalk . gray ( 'This command is currently in development. More features coming soon!' ) }
12
12
13
+ Available commands:
14
+ ${ chalk . cyan ( 'ai:start <hash>' ) } Start AI project initialization with hash
15
+
13
16
Available options:
14
17
${ chalk . cyan ( '--help' ) } Show this help message
15
- ${ chalk . cyan ( '--version' ) } Show version information
18
+
19
+ ${ chalk . gray ( 'Usage examples:' ) }
20
+ ${ chalk . gray ( 'netlify ai:start abc123def456' ) }
16
21
17
22
${ chalk . gray ( 'Future features will include:' ) }
18
23
• Project analysis and optimization suggestions
19
24
• Configuration generation and optimization
20
- • AI-powered development assistance
25
+ • Advanced AI-powered development assistance
21
26
22
- Use ${ chalk . cyan ( 'netlify ai --help' ) } for more information.` )
27
+ Use ${ chalk . cyan ( 'netlify ai --help' ) } or ${ chalk . cyan ( 'netlify ai start --help' ) } for more information.` )
23
28
}
Original file line number Diff line number Diff line change @@ -3,12 +3,23 @@ import { OptionValues } from 'commander'
3
3
import BaseCommand from '../base-command.js'
4
4
5
5
export const createAiCommand = ( program : BaseCommand ) => {
6
+ // Add ai:start subcommand following CLI convention
6
7
program
8
+ . command ( 'ai:start' )
9
+ . argument ( '<hash>' , 'Project hash for AI initialization' )
10
+ . description ( 'Start AI project initialization with hash' )
11
+ . action ( async ( hash : string , options : OptionValues , command : BaseCommand ) => {
12
+ // Set the hash as the first argument for the command
13
+ command . args = [ hash ]
14
+ const { aiStartCommand } = await import ( './ai-start.js' )
15
+ await aiStartCommand ( options , command )
16
+ } )
17
+
18
+ return program
7
19
. command ( 'ai' )
8
20
. description ( 'AI-powered development tools' )
9
- . option ( '--json' , 'Output information as JSON' )
10
21
. action ( async ( options : OptionValues , command : BaseCommand ) => {
11
- const { aiCommand } = await import ( './ai.js' )
12
- aiCommand ( options , command )
22
+ const { aiCommand : mainAiCommand } = await import ( './ai.js' )
23
+ mainAiCommand ( options , command )
13
24
} )
14
25
}
You can’t perform that action at this time.
0 commit comments