# streaming

URL: /milo-cli/api/milo/streaming/
Section: milo
Description: Streaming support for long-running CLI commands.

---

> For a complete page index, fetch /milo-cli/llms.txt.

Open LLM text
(/milo-cli/api/milo/streaming/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2Fstreaming%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2Fstreaming%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2Fstreaming%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2Fstreaming%2Findex.txt)

Module

#
`streaming`

Streaming support for long-running CLI commands.

1Class2Functions

## Classes

`Progress`

3

▼

Progress notification from a streaming command.

Progress notification from a streaming command.

#### Attributes

Name
Type
Description

`status`

`str`

—

`step`

`int`

—

`total`

`int`

—

## Functions

`consume_generator`

1

`tuple[list[Progress], An…`

▼

Consume a generator, collecting Progress yields and capturing the final value.
…

`def consume_generator(gen: Any) -> tuple[list[Progress], Any]`

Consume a generator, collecting Progress yields and capturing the final value.

Returns`(progress_list, final_value)`.
If the generator has no`StopIteration.value`, final_value is `None`.

##### Parameters

Name
Type
Description

`gen`
`Any`

##### Returns

`tuple[list[Progress], Any]`

`is_generator_result`

1

`bool`

▼

Check if a call result is a generator that should be consumed for streaming.

`def is_generator_result(result: Any) -> bool`

##### Parameters

Name
Type
Description

`result`
`Any`

##### Returns

`bool`
