Code Mode CLI
Use Code Mode from the command line for code generation and editing.Commands
Generate Code
Edit Code
Explain Code
Review Code
Options
| Option | Type | Default | Description |
|---|---|---|---|
--action | string | generate | Action: generate, edit, explain, review |
--content | string | - | Description or instructions |
--file | string | - | Target file path |
--language | string | typescript | Programming language |
--format | boolean | true | Format output |
--output | string | - | Output file path |
Examples
Generate Python Script
Refactor File
Environment Variables
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY | Yes | For code generation |
Related
- Code Mode - Code documentation

