Skip to content

[CLI] Add out.status()#4171

Merged
hanouticelina merged 2 commits intomainfrom
codex/out-status-helper
Apr 30, 2026
Merged

[CLI] Add out.status()#4171
hanouticelina merged 2 commits intomainfrom
codex/out-status-helper

Conversation

@hanouticelina
Copy link
Copy Markdown
Contributor

@hanouticelina hanouticelina commented Apr 30, 2026

Follow-up to Wauplin’s review comment in #4111 (comment).

This PR adds out.status() as the CLI wrapper around StatusLine, so command code can request a status line without deciding when it should render. It also migrates the existing CLI status-line call sites in buckets, extensions, and spaces to use the new helper.

Breaking Change

hf extensions install and hf spaces dev-mode no longer print status updates when run with --format json, --quiet, or --format agent.

Before, StatusLine() defaulted to enabled=True, so updates went to stderr whenever stderr was a TTY, regardless of output mode. After this PR, status updates go to stderr only in human mode, and still only when stderr is a TTY.


Note

Medium Risk
Changes CLI stderr output behavior by suppressing status updates in agent/json/quiet modes, which may affect tooling that relied on those messages.

Overview
Adds Output.status() as a CLI-level wrapper around StatusLine, automatically enabling status rendering only in human mode and remaining a no-op for agent/json/quiet output.

Updates existing status-line usage in hf buckets rm --recursive, hf extensions install (python extension path), and hf spaces dev-mode to use out.status() instead of constructing StatusLine directly, and adds a targeted unit test to lock in the new mode-dependent behavior.

Reviewed by Cursor Bugbot for commit 9912a86. Configure here.

@hanouticelina hanouticelina requested a review from Wauplin April 30, 2026 11:16
@bot-ci-comment
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Copy Markdown
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and clean, thank you!

Comment thread tests/test_cli_output.py Outdated
@hanouticelina hanouticelina merged commit 6db2d1b into main Apr 30, 2026
20 checks passed
@hanouticelina hanouticelina deleted the codex/out-status-helper branch April 30, 2026 12:58
@huggingface-hub-bot
Copy link
Copy Markdown
Contributor

This PR has been shipped as part of the v1.14.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants