fix: add --quiet to create-operator-key for scripting - #80
Merged
Sirajmx merged 1 commit intoSep 15, 2026
Merged
Conversation
Mirror the buyer-agent flag so KEY=$(ad-seller create-operator-key --quiet) prints only the minted key. Fixes IABTechLab#79.
Sirajmx
reviewed
Sep 15, 2026
Sirajmx
left a comment
Contributor
There was a problem hiding this comment.
Verified: unit + integration passed (0 failed), merged onto current
main. Small,
exactly matches the buyer-agent's existing--quietpattern, default interactive output
unchanged. No conflicts merging ontomain.
atc964
approved these changes
Sep 15, 2026
atc964
left a comment
Collaborator
There was a problem hiding this comment.
Approved. Thanks for turning this around so quickly.
Verified the implementation matches the buyer agent's --quiet behaviour: bare key
to stdout, flush=True so it survives command substitution, early return before the
panel, and the default interactive output untouched. The test asserting stdout is
exactly the key and stderr is empty is the right assertion for this.
Two non-blocking nits, neither worth holding the merge for:
if quiet is True:can just beif quiet:.- In
docs/api/authentication.mdthe two commands now sit in one block and read as a
sequence to run in order, which would mint two separate operator keys. Splitting
them, or showing the--quietform as an alternative rather than a follow-on, would
read more clearly.
Happy for this to merge as-is.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #79.
ad-seller create-operator-keyhad no machine-readable mode, so bootstrap scripts had to scrape the minted key out of the rich panel.ad-buyer create-operator-keyalready has--quiet/-q.This adds the same flag: print only
response.api_keyand return before the panel. Stdout is flushed so the value survives command substitution.KEY=$(ad-seller create-operator-key --label ci --quiet)Default interactive output is unchanged.
Test plan
uv run --locked pytest tests/unit/test_operator_auth.py::TestCliBootstrap -q(7 passed)uv run --locked ruff check/ruff formaton the touched files