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'
2222import { didEnableCompileCache } from '../utils/nodejs-compile-cache.js'
2323import { track , reportError } from '../utils/telemetry/index.js'
2424
25+ import { createAiCommand } from './ai/index.js'
2526import { createApiCommand } from './api/index.js'
2627import BaseCommand from './base-command.js'
2728import { createBlobsCommand } from './blobs/blobs.js'
@@ -214,6 +215,7 @@ export const createMainCommand = (): BaseCommand => {
214215 const program = new BaseCommand ( 'netlify' )
215216
216217 // register all the commands
218+ createAiCommand ( program )
217219 createApiCommand ( program )
218220 createBlobsCommand ( program )
219221 createBuildCommand ( program )
You can’t perform that action at this time.
0 commit comments