Download packages/cli/src/commands/hooks.tsx from SaylorTwift/gemini-cli: direct link, hf CLI and curl.
- Browser
- Download file 799 Bytes
-
https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/commands/hooks.tsx
- Command line
-
hf download hf://SaylorTwift/gemini-cli/packages/cli/src/commands/hooks.tsx
-
curl -L -o hooks.tsx https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/commands/hooks.tsx
799 Bytes
| /** | |
| * @license | |
| * Copyright 2025 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| import type { CommandModule } from 'yargs'; | |
| import { migrateCommand } from './hooks/migrate.js'; | |
| import { initializeOutputListenersAndFlush } from '../gemini.js'; | |
| export const hooksCommand: CommandModule = { | |
| command: 'hooks <command>', | |
| aliases: ['hook'], | |
| describe: 'Manage Gemini CLI hooks.', | |
| builder: (yargs) => | |
| yargs | |
| .middleware((argv) => { | |
| initializeOutputListenersAndFlush(); | |
| argv['isCommand'] = true; | |
| }) | |
| .command(migrateCommand) | |
| .demandCommand(1, 'You need at least one command before continuing.') | |
| .version(false), | |
| handler: () => { | |
| // This handler is not called when a subcommand is provided. | |
| // Yargs will show the help menu. | |
| }, | |
| }; | |