Skip to content
nikdelvinPublic

Latest commit

Β 

History

2 Commits

Folders and files

Repository files navigation

Termweave β€” Build terminal apps. Ship them native.

πŸ“Ÿ Termweave turns an OpenTUI + React interface into a native desktop app β€” running inside a real CRT monitor. You bring the vibes, termweave brings the machine.

You write React β€” we handle:

  • πŸ“¦ The native window, terminal renderer, app lifecycle & packaging
  • πŸ“Ί The whole CRT: bezel, tube optics, power-on click, ambient hum
  • πŸ–ΌοΈ PixelRenderer β€” PNG/JPEG backdrops under your UI
  • 🧊 ThreeRenderer β€” three.js scenes in the tube, RGB332-quantized like everything else
  • πŸͺ SpaceObject β€” proceduraly generated universe as a starter example
  • βš™οΈ One app.config.json: name, colors, bundle metadata
  • πŸ”₯ Live reload without restarting the window
  • ⚑️ One command to a native .app + .dmg

🎯 Who is this for

  • πŸ€– AI agents that deserve a home screen, not a boring terminal
  • πŸ•ΉοΈ Retro games that want to feel like 1998
  • 🎬 ThreeJS dataviz people actually screenshot

πŸš€ Quick start

You need macOS, Bun 1.3+, Rust, and the Xcode Command Line Tools.

bun install
bun run dev

The monitor turns on. Press Ctrl+C in the window to quit. That's the whole tutorial. ✨

🎨 Make it yours

  • app/App.tsx β€” your interface
  • app.config.json β€” name, themeColor, bundle metadata
  • app.icon.png β€” your icon

Edits under app/ hot-reload. Change the config or icon β†’ restart bun run dev.

πŸ“Ί A real CRT, not a filter

This is the part that makes people go "wait, what?" β€” a monitor bezel around a live tube with physically calibrated optics:

  • πŸŒ€ Barrel curvature
  • 🌈 Chromatic fringe
  • ✨ Bloom & scanlines
  • πŸ”Š The power-on click and a low hum

All rendered on the terminal's own GPU, never a canned overlay. Your themeColor repaints the whole machine β€” tube, bezel, glow.

πŸ–ΌοΈ Pixel-art > text

import { PixelRenderer } from "#termweave";
import bg from "./assets/bg.png" with { type: "file" };

export function App() {
  return (
    <PixelRenderer uri={bg} width="100%" height="100%">
      <box position="absolute" bottom={0} width="100%" height={8}>
        <text>overlay whatever on top</text>
      </box>
    </PixelRenderer>
  );
}

Your terminal, but it's a little world. πŸŒ†

🧊 three.js in the tube

import { ThreeRenderer, useFrame } from "#termweave";
import { Scene, PerspectiveCamera, Mesh } from "three";

export function App() {
  const scene = new Scene();
  const camera = new PerspectiveCamera(50, 1, 0.1, 100);
  camera.position.set(0, 4, 10);
  // scene.add(...) your geometry

  useFrame((dt) => {
    // mutate the scene; 30fps, only ticking while mounted
    camera.rotation.y += dt / 1000;
  });

  return (
    <ThreeRenderer scene={scene} camera={camera} width="100%" height="100%">
      <text position="absolute" top={1} left={4}>overlay text</text>
    </ThreeRenderer>
  );
}

Renders through the same super-sampled pipeline as PixelRenderer 🧊. Everything goes through the tube.

πŸͺ Hot-test ThreeRenderer, it's a whole Universe

<SpaceObject> generates πŸͺ PixelPlanets and drops them straight into your CRT, over the darkened starfield.

import { SpaceObject, randomSpaceObjectConfig } from "#termweave";

export function App() {
  // roll it β€” or hand-write the config: { type, seed?, palette?, layers? }
  return <SpaceObject object={randomSpaceObjectConfig(1234)} backgroundSeed={5678} />;
}
  • πŸͺ 12 types: terran wet/dry, islands, no-atmosphere, gas giants (ringed ✨), ice & lava worlds, asteroids, black holes, galaxies, stars
  • 🎨 Curated, space-truth palettes: earth, mars, moon, jupiter, saturn, neptune, europa, gargantua, milky-way…
  • 🌱 seed = the geography β€” same palette + new seed = whole new world
  • πŸ“Έ One static frame per config β€” deterministic (same config in, same pixels out), the GPU naps between renders
  • 🌌 backgroundSeed just reshuffles the starfield

🧰 Commands

command does
bun run dev run it, live reload
bun run build native .app + .dmg
bun test tests
bun run typecheck types

🍎 Status

MacOS only for now (arm64 & x64). Bundles build for your machine.

🀝 Contributing

Issues & PRs welcome. ⭐ Star the repo if you ship something cool β€” and share what you made.

πŸ€– Footer

πŸ“Ÿ A config-driven Tauri and OpenTUI builder for native desktop terminal apps.

terminal cli tui terminal-user-interface terminal-based react typescript rust tauri webgl threejs opentui pixel-art procedural-generation crt retro retro-terminal developer-tools ai-agents hacktoberfest

Contributors

Languages