| 87 | } |
| 88 | |
| 89 | function showHelp(): void { |
| 90 | console.log(` |
| 91 | ${chalk.bold('hapi auth')} - Authentication management |
| 92 | |
| 93 | ${chalk.bold('Usage:')} |
| 94 | hapi auth status Show current configuration |
| 95 | hapi auth login Enter and save CLI_API_TOKEN |
| 96 | hapi auth logout Clear saved credentials |
| 97 | |
| 98 | ${chalk.bold('Token priority (highest to lowest):')} |
| 99 | 1. CLI_API_TOKEN environment variable |
| 100 | 2. ~/.hapi/settings.json |
| 101 | 3. Interactive prompt (on first run) |
| 102 | `) |
| 103 | } |
| 104 | |
| 105 | export const authCommand: CommandDefinition = { |
| 106 | name: 'auth', |