noora-text-prompt

Installation
SKILL.md

Noora Text Prompt

Use this skill when a Swift CLI needs one typed answer from the user.

Basic Pattern

import Noora

let name = Noora().textPrompt(
    title: "Project name",
    prompt: "How would you like to name your project?",
    description: "This name will be used for generated files.",
    defaultValue: "demo-app",
    collapseOnAnswer: true,
    validationRules: [
        NonEmptyValidationRule(error: "Project name cannot be empty.")
    ]
)

When To Use

  • Naming a project, target, or environment.
  • Asking for a token, host, path, or identifier.
  • Gathering one value before scaffolding or deployment.

Guidance

  • Always add validation when empty or malformed input would break the next step.
  • Use defaultValue when there is a sensible generated fallback.
  • Keep the prompt specific. The description should explain impact, not restate the prompt.
  • Expect a non-interactive session to be a problem for prompts; these APIs are for TTY use.

Avoid

  • Using a text prompt for a closed set of known choices. Prefer a choice prompt.
  • Accepting unchecked user input when a bad value would cascade into file or network failures.
Related skills
Installs
1
First Seen
Mar 31, 2026