-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: Adds run --porcelain cli option to output only the final text message to stdout #3106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
…rcelain * origin/main: (26 commits) docs: add more instructions about resuming a session for cli users (#3146) add claude 4 models (#3143) docs: cross reference recipe docs (#3141) docs: add recipes tutorial (#3132) Docs: recipe landing page (#3122) Run cargo fmt (#3135) Update Recipe Cookbook Submission Flow (#3064) chore(release): release version 1.0.30 (#3126) blog: everyday tasks for ai (#3103) fix windows session paths (#3130) update the path regex (#3129) wider support for cron schedules (#3123) feat: add optional view_range to text editor tool and text editor insert tool (#3093) Added announcement modal (#3098) build: Add `just` to Hermit, correct ui/desktop's README (#3116) fix: Make the entire toolcall argument row clickable to expand (#3118) Fix clippy + test errors (#3120) Update goose help to include cli (#3095) add scheduler type setting (#3119) Add a reference for recipes (#3099) ...
…rcelain * origin/main: return missign npx/uvx (#3148)
DOsinga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as mentioned in the slack, I don't really understand why we need this rather than just make sure that all things that are logging really go to the stderr and all things returned from the llm go to stdout. for structured output we should just make sure it is always the last line and a full json doc
|
Closing this for now as we've merged #3188 |
This pull request introduces a new "Porcelain mode" feature to the
goose-clicrate run command, which redirects all CLI output to stderr while only outputting the final text message to stdout.This enables us to extract final goose output in scripts as well as pipe or chain to other commands.
Only outputting the final text message to stdout is moderately useful but this will become more useful when we add structured outputs to recipes.
Key Changes
cli_println!macro to encapsulate the conditional statement directing output to stderr or stdoutExamples
Supports pipes
Supports tools and tool approval messages
Chaining gooses Easier done using variables and scripts but its doable.