File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { OptionValues } from 'commander'
2
+
3
+ import { chalk , log } from '../../utils/command-helpers.js'
4
+ import BaseCommand from '../base-command.js'
5
+
6
+ export const aiCommand = ( _options : OptionValues , _command : BaseCommand ) => {
7
+ log ( `${ chalk . greenBright ( '🤖 Netlify AI Assistant' ) }
8
+
9
+ Welcome to the Netlify AI command! This is a foundation for AI-powered development tools.
10
+
11
+ ${ chalk . gray ( 'This command is currently in development. More features coming soon!' ) }
12
+
13
+ Available options:
14
+ ${ chalk . cyan ( '--help' ) } Show this help message
15
+ ${ chalk . cyan ( '--version' ) } Show version information
16
+
17
+ ${ chalk . gray ( 'Future features will include:' ) }
18
+ • Project analysis and optimization suggestions
19
+ • Configuration generation and optimization
20
+ • AI-powered development assistance
21
+
22
+ Use ${ chalk . cyan ( 'netlify ai --help' ) } for more information.` )
23
+ }
Original file line number Diff line number Diff line change
1
+ import { OptionValues } from 'commander'
2
+
3
+ import BaseCommand from '../base-command.js'
4
+
5
+ export const createAiCommand = ( program : BaseCommand ) => {
6
+ program
7
+ . command ( 'ai' )
8
+ . description ( 'AI-powered development tools' )
9
+ . option ( '--json' , 'Output information as JSON' )
10
+ . action ( async ( options : OptionValues , command : BaseCommand ) => {
11
+ const { aiCommand } = await import ( './ai.js' )
12
+ aiCommand ( options , command )
13
+ } )
14
+ }
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import getCLIPackageJson from '../utils/get-cli-package-json.js'
22
22
import { didEnableCompileCache } from '../utils/nodejs-compile-cache.js'
23
23
import { track , reportError } from '../utils/telemetry/index.js'
24
24
25
+ import { createAiCommand } from './ai/index.js'
25
26
import { createApiCommand } from './api/index.js'
26
27
import BaseCommand from './base-command.js'
27
28
import { createBlobsCommand } from './blobs/blobs.js'
@@ -214,6 +215,7 @@ export const createMainCommand = (): BaseCommand => {
214
215
const program = new BaseCommand ( 'netlify' )
215
216
216
217
// register all the commands
218
+ createAiCommand ( program )
217
219
createApiCommand ( program )
218
220
createBlobsCommand ( program )
219
221
createBuildCommand ( program )
You can’t perform that action at this time.
0 commit comments