You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cortex-cli): implement improvements from code analysis (#174)
This commit addresses multiple improvements identified in IMPROVEMENTS_STATUS.md
and CORTEX_CLI_ANALYSIS.md:
## CLI Help Text Improvements (Group A)
- Enhanced --ask-for-approval help with detailed values (ask/medium/low/yolo)
- Expanded --full-auto help explaining sandbox restrictions and use cases
- Added --oss flag help listing all supported providers
- Improved --search flag help with detailed capabilities
- Added --output-schema help with JSON Schema format example
- Enhanced --host help in ServeCommand with security warnings
- Improved --selector help in scrape command with CSS selector examples
- Improved --user-agent help with common examples
## CLI Validation & Error Handling (Group B/H)
- MCP server command now returns proper error instead of silent failure
## CLI Features & Behavior (Group C)
- Fixed zip dependency to use workspace version (2.2 vs 0.6)
- Removed redundant 'bytes' suffix in debug paths size output
## Agent & Execution (Group G)
- Added helpful alternatives when trying to remove built-in agents
## Sessions & Minor Fixes (Group D/E/F)
- Added confirmation prompt to logout command
- Added data loss warning to --force flag in pr command
- Enhanced agent create help with detailed examples
- Enhanced PR review automation help text
Co-authored-by: Droid Agent <droid@factory.ai>
Copy file name to clipboardExpand all lines: cortex-cli/src/github_cmd.rs
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,13 @@ pub struct InstallArgs {
40
40
#[arg(short, long)]
41
41
pubforce:bool,
42
42
43
-
/// Include PR review automation. When enabled, the agent will automatically review pull requests, suggest improvements, and can approve/request changes based on configured policies
43
+
/// Include PR review automation in the workflow.
44
+
/// When enabled, the agent will:
45
+
/// - Automatically review new and updated pull requests
46
+
/// - Analyze code changes for bugs, security issues, and best practices
/// Use open-source/local LLM providers instead of cloud APIs.
69
+
/// Supported providers:
70
+
/// ollama - Ollama local LLM server (default port: 11434)
71
+
/// lmstudio - LM Studio local server
72
+
/// llamacpp - llama.cpp server
73
+
/// vllm - vLLM inference server
74
+
/// openrouter - OpenRouter API (cloud, supports many OSS models)
69
75
#[arg(long = "oss", default_value_t = false)]
70
76
oss:bool,
71
77
@@ -77,11 +83,20 @@ struct InteractiveArgs {
77
83
#[arg(long = "sandbox", short = 's')]
78
84
sandbox_mode:Option<String>,
79
85
80
-
/// Set the approval policy for tool executions. Valid values: ask (always ask), medium (risky only), low (rarely ask), yolo (never ask)
81
-
#[arg(long = "ask-for-approval", short = 'a')]
86
+
/// Set the approval policy for tool executions.
87
+
/// Valid values:
88
+
/// ask - Always ask for approval before executing tools
89
+
/// medium - Ask for approval only for risky operations
90
+
/// low - Rarely ask for approval (only for dangerous operations)
91
+
/// yolo - Never ask for approval (DANGEROUS: use with caution)
92
+
#[arg(long = "ask-for-approval", short = 'a', value_name = "POLICY")]
82
93
approval_policy:Option<String>,
83
94
84
-
/// Enable fully automatic mode with sandboxed execution. Equivalent to --dangerously-skip-permissions combined with workspace-write sandbox. Use for non-destructive automated workflows
95
+
/// Enable fully automatic mode with sandboxed execution.
96
+
/// Combines approval_policy=yolo with workspace-write sandbox restrictions.
97
+
/// The sandbox ensures operations are confined to the workspace directory.
98
+
/// Best suited for automated CI/CD pipelines and non-destructive scripted workflows.
99
+
/// For interactive use, consider --ask-for-approval=medium instead.
#[arg(long = "cd", short = 'C', value_name = "DIR")]
99
114
cwd:Option<PathBuf>,
100
115
101
-
/// Enable web search capability. Allows the agent to search the web for up-to-date information, documentation, and code examples during the conversation
116
+
/// Enable web search capability for the agent.
117
+
/// When enabled, the agent can:
118
+
/// - Search the web for up-to-date information and documentation
119
+
/// - Find code examples and best practices
120
+
/// - Look up library/API documentation
121
+
/// - Research error messages and solutions
122
+
/// Requires network access. Search results are automatically filtered for relevance.
102
123
#[arg(long = "search", default_value_t = false)]
103
124
web_search:bool,
104
125
@@ -215,8 +236,12 @@ struct ExecCommand {
215
236
#[arg(short, long, default_value = "human")]
216
237
format:String,
217
238
218
-
/// Path to a JSON Schema file (.json) that defines the expected structure of the output. The schema should follow JSON Schema draft-07 or later format
219
-
#[arg(long)]
239
+
/// Path to a JSON Schema file (.json) that defines the expected structure of the output.
240
+
/// The schema should follow JSON Schema draft-07 or later format.
0 commit comments