feature: add cloud live broadcast command - #662
Merged
jaredbroad merged 1 commit intoAug 12, 2026
Merged
Conversation
The API exposes live/commands/broadcast to send a command to every live algorithm in an organization, but the CLI could only target a single project through live/commands/create. Add `lean cloud live broadcast`, which sends the command given by --data to all live deployments of an organization. The organization defaults to the one of the current Lean CLI directory and can be overridden with --organization, and --exclude-project leaves a single project out of the broadcast. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jaredbroad
approved these changes
Aug 12, 2026
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.
Description
The API exposes
live/commands/broadcastto send a command to every live algorithm in an organization, but the CLI could only target a single project, throughlive/commands/create(lean cloud live command).This adds
lean cloud live broadcast:--organizationaccepts a name or an id, resolved the same waylean initdoes.--exclude-projectaccepts a project name or id and is resolved to a project id, mapping to the endpoint's optionalexcludeProjectId; it is omitted from the payload when not given, so all projects are included.--datais parsed like the existinglean cloud live command, and is required here.LiveClient.broadcast_commandwas added alongsidecommand_createto call the endpoint.Related Issue
N/A
Motivation and Context
Brings the CLI to parity with the
live/commands/broadcastendpoint, so a command can be sent to a whole organization's live deployments without scripting onelean cloud live commandcall per project.Requires Documentation Change
Yes,
lean cloud live broadcastshould be added to the CLI command reference. The repository README was regenerated withpython scripts/readme.py.How Has This Been Tested?
tests/commands/cloud/live/test_cloud_live_commands.pycovering the default organization,--exclude-project,--organizationby name, and the unknown-organization failure, plus a first test for the existinglean cloud live command.tests/commands/cloud/livepasses: 65 passed.lean cloud liveand that its help output renders as above.Types of changes
Checklist:
🤖 Generated with Claude Code