Command mode for Unix-friendly automation and scripting.
| 22 | |
| 23 | |
| 24 | class CmdCommand(UnifiedCommand): |
| 25 | """Command mode for Unix-friendly automation and scripting.""" |
| 26 | |
| 27 | @property |
| 28 | def name(self) -> str: |
| 29 | return "cmd" |
| 30 | |
| 31 | @property |
| 32 | def description(self) -> str: |
| 33 | return "Command mode for Unix-friendly automation and scripting" |
| 34 | |
| 35 | @property |
| 36 | def modes(self) -> CommandMode: |
| 37 | return CommandMode.CLI |
| 38 | |
| 39 | @property |
| 40 | def aliases(self) -> list[str]: |
| 41 | return [] |
| 42 | |
| 43 | @property |
| 44 | def parameters(self) -> list[CommandParameter]: |
| 45 | return [ |
| 46 | CommandParameter( |
| 47 | name="input_file", type=str, required=False, |
| 48 | help="Input file (use - for stdin)", |
| 49 | ), |
| 50 | CommandParameter( |
| 51 | name="output_file", type=str, required=False, |
| 52 | help="Output file (use - for stdout)", |
| 53 | ), |
| 54 | CommandParameter( |
| 55 | name="prompt", type=str, required=False, |
| 56 | help="Prompt text", |
| 57 | ), |
| 58 | CommandParameter( |
| 59 | name="tool", type=str, required=False, |
| 60 | help="Tool name to execute", |
| 61 | ), |
| 62 | CommandParameter( |
| 63 | name="tool_args", type=str, required=False, |
| 64 | help="Tool arguments as JSON", |
| 65 | ), |
| 66 | CommandParameter( |
| 67 | name="system_prompt", type=str, required=False, |
| 68 | help="Custom system prompt", |
| 69 | ), |
| 70 | CommandParameter( |
| 71 | name="raw", type=bool, default=False, is_flag=True, |
| 72 | help="Raw output without formatting", |
| 73 | ), |
| 74 | CommandParameter( |
| 75 | name="single_turn", type=bool, default=False, is_flag=True, |
| 76 | help="Disable multi-turn conversation", |
| 77 | ), |
| 78 | CommandParameter( |
| 79 | name="max_turns", type=int, default=100, |
| 80 | help="Maximum conversation turns", |
| 81 | ), |
no outgoing calls