noora-interactive-tables

Installation
SKILL.md

Noora Interactive Tables

Use this skill when a Swift CLI needs table-based navigation rather than simple printed rows.

Selectable Table

import Noora

let rows = [
    ["init", "Create a new project", "Stable"],
    ["deploy", "Ship to production", "Preview"],
    ["doctor", "Run environment checks", "Stable"],
]

let selectedIndex = try await Noora().selectableTable(
    headers: ["Command", "Description", "State"],
    rows: rows,
    pageSize: 5
)

Paginated Table

try Noora().paginatedTable(
    headers: ["Build", "Status", "Runner", "Date"],
    rows: releaseRows,
    pageSize: 10
)

Lazy Paginated Table

Use the async loadPage variant when pages come from an API or another deferred source.

try await Noora().paginatedTable(
    headers: ["ID", "User", "Status"],
    pageSize: 10,
    totalPages: 8,
    loadPage: { page in
        try await fetchRows(page: page)
    }
)

Updating Tables

Use AsyncSequence updates when rows change over time.

await Noora().table(initialTableData, updates: updates)

let selected = try await Noora().selectableTable(
    initialTableData,
    updates: updates,
    pageSize: 8
)

Guidance

  • Interactive tables require an interactive terminal. Plan for NooraError.nonInteractiveTerminal.
  • Use pageSize that fits normal terminal heights.
  • For updating tables, keep row identity stable enough that users can track changes.
  • For lazy pagination, keep page fetch latency visible and expected.

Avoid

  • Using interactive tables in CI or piped output without a fallback.
  • Sending wildly reshuffled rows every update so selection becomes meaningless.
  • Using a table when a choice prompt would be simpler.
Related skills
Installs
1
First Seen
Mar 31, 2026