opencode
opencode copied to clipboard
feat: quiet mode for CLI runs
Fixes: #6999
This PR adds the -q | --quiet argument, which aims to provide a cleaner output to the user for CLI runs, suppressing tool calls and focusing on the actual response from the agent.
Usage
# shorthand
opencode run -q "list the files in this directory"
# verbalized
opencode run --quiet "list the files in this directory"
# specifying a model
opencode run -m "opencode/gemini-3-flash" "list the files in this directory" --quiet
# wrapped around a function
function ask() {
if [ -z "$1" ]; then
echo "Usage: ask <question>"
return 1
fi
local model="opencode/gemini-3-flash"
opencode run -m $model "$*" -q | glow -
}
Demo
Dry Run
https://github.com/user-attachments/assets/41c96313-343a-416b-8e63-6665b0695aaa
| Scenario | Preview |
|---|---|
| Before | |
| After |