noora-text-formatting
Noora Text Formatting
Use this skill when a Swift CLI needs semantic terminal text instead of plain strings.
Compose TerminalText
Use TerminalText interpolation so Noora can render commands, links, and themed text correctly.
import Noora
let text = TerminalText("""
\(.raw("Project created."))
Run \(.command("swift run")) next.
Docs: \(.link(title: "Noora", href: "https://noora.tuist.dev"))
\(.primary("Primary"))
\(.secondary("Secondary"))
\(.muted("Muted"))
\(.accent("Accent"))
\(.danger("Danger"))
\(.success("Success"))
\(.info("Info"))
""")
Format It Explicitly
Use Noora().format(...) when you need a rendered string rather than a rendered component.
let rendered = Noora().format(text)
print(rendered)
Best Practices
- Use
\(.command("..."))for executable commands instead of quoting them manually. - Use
\(.link(title:href:))for documentation or dashboard links. - Use semantic color components sparingly. Reserve them for status, emphasis, and scanability.
- Prefer
TerminalTextin alert takeaways and long-running step updates when you want richer output.
Avoid
- Concatenating ANSI escape codes by hand.
- Converting everything to raw strings too early.
- Using color semantics for large paragraphs. Keep emphasis local.
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-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