noora-alerts
Noora Alerts
Use this skill when a Swift CLI needs concise, styled status messaging that should stand apart from raw print output.
Alert Shapes
Use these APIs:
let noora = Noora()
noora.warning(
.alert(
"Your token is about to expire",
takeaway: "Generate a new token with \(.command("mycli auth refresh"))"
)
)
noora.success(
.alert(
"Project initialized",
takeaways: [
"Run \(.command("swift build")) to verify the package.",
"Open \(.command("Package.swift")) to review dependencies.",
]
)
)
noora.error(
.alert(
"Deployment failed",
takeaways: [
"Verify the token passed to \(.command("deploy --token ...")).",
"Check that the target environment is reachable.",
]
)
)
noora.info(
.alert(
"The current version is up to date",
takeaways: ["Consider enabling automatic updates."]
)
)
Choosing the Right Alert
warning: non-fatal issue or caution. Supports one takeaway per warning item.success: positive completion plus optional takeaways.error: failed action plus concrete next steps.info: neutral state or context worth surfacing.
Writing Good Alert Copy
- Keep the top-level message to one sentence.
- Put next steps in takeaways, not in the headline.
- Prefer 1 to 3 takeaways.
- Use
TerminalTextinterpolation for commands and links.
Avoid
- Using alerts for every line of normal command output.
- Hiding actionable remediation inside a long paragraph.
- Using
warningfor a hard failure that should beerror.
More from spqw/skills-noora
noora-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-collapsible-step
Use when a Swift CLI needs Noora to stream multiple log lines during a task and collapse them on success or failure. Covers `collapsibleStep`, `visibleLines`, and writing readable progress lines.
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