noora-collapsible-step
Noora Collapsible Step
Use this skill when a task emits many lines of progress and the final output should collapse back to one summarized line.
Basic Pattern
import Noora
try await Noora().collapsibleStep(
title: "Authentication",
successMessage: "Authenticated",
errorMessage: "Failed to authenticate",
visibleLines: 5
) { writeLine in
for index in 0 ..< 20 {
writeLine("Progressing \(index)/20")
try await Task.sleep(nanoseconds: 200_000_000)
}
}
Good Fit
- Build logs.
- Boot logs.
- Multi-line validation output.
- Streaming subprocess or remote-operation status.
Guidance
- Use
visibleLinesto show enough context without flooding the terminal. - Keep each emitted line short and meaningful.
- Reserve this for tasks with multiple intermediate lines, not one-line state changes.
Avoid
- Printing directly to stdout inside the task while also using a collapsible step.
- Using collapsible steps for static summaries that could just be an alert or progress step.
More from spqw/skills-noora
noora-alerts
Use when building Noora warning, success, error, or info alerts in a Swift CLI. Covers choosing alert type, structuring takeaways, and using `TerminalText` interpolation inside alert copy.
1noora-progress-step
Use when a Swift CLI needs a spinner-style Noora progress step for an async operation. Covers `progressStep`, optional status updates, success and error messages, and sequencing multiple steps.
1noora-text-formatting
Use when composing or formatting Noora `TerminalText` in a Swift CLI. Covers semantic text components such as commands, links, paths, and themed text, plus `Noora().format(...)`.
1noora-text-prompt
Use when gathering free-form text input with Noora in a Swift CLI. Covers `textPrompt`, default values, collapse behavior, and validation rules such as `NonEmptyValidationRule`.
1noora-interactive-tables
Use when building interactive Noora tables in a Swift CLI. Covers selectable tables, paginated tables, lazy paginated loading, updating tables from async sequences, and TTY constraints.
1noora-progress-bar-step
Use when a Swift CLI needs percentage-based progress with Noora. Covers `progressBarStep`, reporting values from 0 to 1, and choosing bar updates for downloads, migrations, and batch work.
1