Skip to content

Explore unifying playground and CLI into a shared TUI #1029

@alxjrvs

Description

@alxjrvs

Idea

The playground (apps/playground/) and CLI (apps/cli/) both provide interactive dice rolling interfaces — one in the browser, one in the terminal. Explore whether a shared TUI framework could power both, similar to how gridland.io delivers rich terminal-style interfaces that work across contexts.

Current State

  • Playground: Astro app with browser-native components (textarea input, result display, reference sidebar)
  • CLI: Bun-powered terminal app with text I/O

Both consume @randsum/roller and present the same core interaction: input notation, see results, explore modifiers.

Questions to Explore

  • Could a shared UI layer (e.g., Ink for React-in-terminal, or a custom renderer) serve both browser and terminal?
  • What's the overlap in interaction patterns? (input → roll → display → history)
  • Does @randsum/dice-ui already cover enough to be the shared component layer?
  • Would a gridland-style approach (rich TUI that also renders in browser) be more compelling than two separate apps?
  • What's the cost of maintaining two separate interfaces vs. one unified one?

References

  • gridland.io — rich terminal-style interfaces
  • Ink — React for CLIs
  • Textual — Python TUI framework (for inspiration)
  • packages/dice-ui/ — existing shared dice UI components

Scope

Research/brainstorm only. No implementation commitment. This would likely be a scramstorm to evaluate feasibility before any code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions