termcast  by remorses

React framework for building interactive terminal UIs

Created 9 months ago
319 stars

Top 84.7% on SourcePulse

GitHubView on GitHub
Project Summary

Termcast is a React-based framework for building cross-platform Terminal User Interfaces (TUIs), designed to mirror the Raycast extension API. It enables developers to create interactive terminal applications that can be compiled into standalone executables or bundled as desktop apps, offering a familiar development experience and a rich set of terminal-native UI components.

How It Works

Termcast utilizes React and the opentui library, requiring the Bun runtime. It achieves high compatibility with Raycast extensions by aliasing @raycast/api and @raycast/utils imports. Developers can build standalone extensions managed by the termcast CLI or integrate TUI functionality into existing CLIs using renderWithProviders. The framework emphasizes rapid development with Hot Module Reloading (HMR) via termcast dev.

Quick Start & Requirements

  • Install: pnpm install -g termcast
  • Runtime: Requires Bun. Node.js is not supported.
  • Scaffold: termcast new <extension-name>
  • Development: termcast dev (enables HMR)
  • Build: termcast compile (standalone executable), termcast release (multi-platform binaries), termcast app build (desktop app).

Highlighted Details

  • Raycast API Compatibility: Seamlessly imports from @raycast/api and @raycast/utils.
  • Hot Module Reloading (HMR): termcast dev provides instant UI updates without restarts, preserving state.
  • Cross-Platform Deployment: Compiles to single-file executables (including Bun) and desktop applications for macOS, Linux, and Windows.
  • Rich Terminal Components: Extends the Raycast API with terminal-specific elements like charts (Graph, BarChart, CandleChart), tables, heatmaps, and progress bars.
  • Data Management Utilities: @termcast/utils offers hooks (useCachedPromise, useCachedState, useForm) for efficient data fetching, caching, and state persistence backed by SQLite.

Maintenance & Community

No specific details on maintainers, community channels (Discord/Slack), or roadmap were found in the provided README.

Licensing & Compatibility

The license is not explicitly stated. Compatibility with the Raycast API suggests a permissive approach, but explicit clarification is needed for commercial use or closed-source linking.

Limitations & Caveats

  • Bun Dependency: Strictly requires the Bun runtime; Node.js is incompatible.
  • Keyboard Input: cmd key is unsupported; ctrl or alt should be used instead.
  • Graphics: Lacks pixel rendering capabilities, relying solely on terminal character-based graphics.
Health Check
Last Commit

6 days ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
8 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.