Skip to content

Commit 6864489

Browse files
committed
Add login verification functionality
1 parent 82710fd commit 6864489

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

src/commands/ai/ai.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@ Welcome to the Netlify AI command! This is a foundation for AI-powered developme
1010
1111
${chalk.gray('This command is currently in development. More features coming soon!')}
1212
13+
Available commands:
14+
${chalk.cyan('ai:start <hash>')} Start AI project initialization with hash
15+
1316
Available options:
1417
${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')}
1621
1722
${chalk.gray('Future features will include:')}
1823
• Project analysis and optimization suggestions
1924
• Configuration generation and optimization
20-
• AI-powered development assistance
25+
Advanced AI-powered development assistance
2126
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.`)
2328
}

src/commands/ai/index.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,23 @@ import { OptionValues } from 'commander'
33
import BaseCommand from '../base-command.js'
44

55
export const createAiCommand = (program: BaseCommand) => {
6+
// Add ai:start subcommand following CLI convention
67
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
719
.command('ai')
820
.description('AI-powered development tools')
9-
.option('--json', 'Output information as JSON')
1021
.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)
1324
})
1425
}

0 commit comments

Comments
 (0)