Learn how to use the cloving generate shell
command to generate and manage shell scripts.
cloving generate shell [options]
There is also shortcut to save you a few chars
cloving g sh [options]
The cloving generate shell
command helps you generate executable shell scripts based on a prompt. It uses the AI APIs configured with cloving config
and the prompt and generate relevant shell commands, which can then be reviewed, revised, executed, or copied to the clipboard.
This command accepts the following options:
The cloving generate shell
command uses the following interactive prompts:
Here is an example of what a shell script generation session might look like:
$ cloving generate shell -p "List all TypeScript files in the current directory"
Generating shell script...
Generated shell script:
\`\`\`sh
find . -type f -name "*.ts"
\`\`\`
What would you like to do?
1. Execute
2. Revise
3. Explain
4. Copy to Clipboard
5. Cancel
If you choose to execute the script, the process continues as follows:
$ cloving generate shell -p "List all TypeScript files in the current directory"
Generating shell script...
Generated shell script:
\`\`\`sh
find . -type f -name "*.ts"
\`\`\`
What would you like to do?
1. Execute
2. Revise
3. Explain
4. Copy to Clipboard
5. Cancel
> Execute
./src/index.ts
./src/utils/config_utils.ts
./src/utils/git_utils.ts
./src/utils/string_utils.ts
./src/utils/types.ts
./src/commands/config.ts
./src/commands/init.ts
...