8000 GitHub - kaagedev/kaage · GitHub
[go: up one dir, main page]

Skip to content
kaagedevPublic

About

No description, website, or topics provided.

Resources

Stars

8 stars

Watchers

0 watching

Forks

Repository files navigation

kaage (ಕಾಗೆ / 影)

A single-user, BeOS-inspired browser desktop environment built in Rust for inspecting and controlling a Linux host's systemd services (system + user), containers, live host metrics, and interactive PTY terminals over Tailscale.

kaage BeOS-inspired webtop desktop

Workspace Layout

  • crates/kaage-proto — Shared postcard wire protocol (ClientMsg, ServerMsg, SystemdUnitInfo, ContainerInfo, HostMetrics).
  • crates/kaaged — Linux host daemon (axum + tokio, zbus system & user D-Bus, bollard Docker/Podman, portable-pty, sysinfo, Tailscale-User-Login auth).
  • crates/kaage-ui — Mission-Control Webtop (eframe/egui + ewebsock, IBM Plex Sans/Mono typography, libghostty-vt optional native terminal backend + pure-Rust vt100 WASM fallback), compiles to both wasm32-unknown-unknown and native desktop.
  • flake.nix + nix/ — Reproducible Nix packages (kaaged, kaage-ui, kaage-ui-native, kaage), NixOS module (nixosModules.default), and Home Manager module (homeManagerModules.default).

Terminal Engine (libghostty-vt & Kitty Keyboard Protocol)

kaage-ui is designed around libghostty-vt (ghostty-vt 0.8, available via the ghostty Cargo feature on native targets) with a pure-Rust vt100 fallback for zero-Zig offline Nix WASM builds:

  • High-fidelity VT emulation: Full 24-bit truecolor, Unicode grapheme clustering, synchronized output (DEC mode 2026, eliminating TUI flicker), and low-latency GPU-accelerated canvas rendering without xterm.js DOM overhead.
  • Kitty Keyboard Protocol (CSI u): Supported by libghostty-vt. Legacy VT100/xterm collapses distinct chords into identical control bytes (Ctrl+I = Tab, Ctrl+M = Enter, Ctrl+[ = Esc) and cannot represent modified keys like Shift+Enter or Ctrl+Shift+letter. The Kitty Keyboard Protocol transmits unambiguous keycodes, modifier bitmasks, and press/repeat/release events — critical for modern editors and multiplexers (Neovim, Helix, tmux, Zellij) and for reliable key handling in browser-hosted terminals.

Quick Install (Bare NixOS)

Works on a fresh NixOS machine with nothing else installed (no Rust, Docker, GPU drivers, or Tailscale required — and works even before Nix flakes are enabled):

1. One-line User Install (Recommended for Quick Setup)

Installs kaage into your Nix profile, creates ~/appdata (KAAGE_APPDATA), enables kaaged.service as a systemd --user service, and automatically configures tailscale serve if Tailscale is running:

curl -fsSL https://raw.githubusercontent.com/kaagedev/kaage/main/install.sh | bash

Pass custom options after bash -s --:

# Custom port, appdata directory, and Tailscale user allowlist
curl -fsSL https://raw.githubusercontent.com/kaagedev/kaage/main/install.sh | \
  bash -s -- --port 9090 --appdata ~/appdata --allowed-user you@example.com

# Skip automatic Tailscale Serve setup
curl -fsSL https://raw.githubusercontent.com/kaagedev/kaage/main/install.sh | \
  bash -s -- --no-tailscale-serve

# Uninstall (preserves ~/appdata)
curl -fsSL https://raw.githubusercontent.com/kaagedev/kaage/main/install.sh | \
  bash -s -- --uninstall

Once installed:

  • Open http://127.0.0.1:9090 (or https://<your-node>.ts.net:9090 over Tailscale)
  • Check status/logs: systemctl --user status kaaged.service / journalctl --user -u kaaged.service -f

2. Ephemeral Run (Try Without Installing)

nix --extra-experimental-features 'nix-command flakes' run github:kaagedev/kaage

3. Generate a Declarative NixOS Module Snippet

curl -fsSL https://raw.githubusercontent.com/kaagedev/kaage/main/install.sh | \
  bash -s -- --mode nixos --write-module ./kaage.nix

Deploying on NixOS (Flake Overlay & Module)

Option A (Recommended): Flake Overlay + NixOS Module (services.kaage)

Runs kaaged at boot as your user (my.username), installs a scoped Polkit rule so you can start/stop/restart system units from the UI without interactive prompts, inspects both system and user systemd services (acedop, comfyui, unsloth, emacs, llama-cpp, etc.), and declaratively exposes kaage via tailscale serve.

  1. Add kaage to flake.nix inputs:
inputs = {
  # ...existing inputs...
  kaage = {
    url = "github:kaagedev/kaage"; # or "path:/home/pradeep/projects/kaage"
    inputs.nixpkgs.follows = "nixpkgs";
  };
};
  1. Apply the Flake Overlay and NixOS module in flake.nix under nixosConfigurations.<host>.modules:
modules = [
  ./hardware-configuration.nix
  ./configuration.nix
  { nixpkgs.overlays = [ inputs.kaage.overlays.default ]; }
  inputs.kaage.nixosModules.default
  # ...home-manager module...
];

The overlay adds pkgs.kaage, pkgs.kaaged, pkgs.kaage-ui, and pkgs.kaage-ui-native to pkgs.

  1. Enable services.kaage in configuration.nix (accept my in the top-level args { config, pkgs, my, ... }:):
services.kaage = {
  enable = true;
  package = pkgs.kaage;
  user = my.username;
  port = 9090;
  appDataDir = "/home/${my.username}/appdata"; # sets KAAGE_APPDATA (default: ~/appdata)
  allowedUser = "pradeep@btbytes.com"; # match your Tailscale login
  tailscaleServe = {
    enable = true;
    httpsPort = 9090; # https://aihole.<tailnet>.ts.net:9090
  };
};
  1. Rebuild:
sudo nixos-rebuild switch --flake ~/dotfiles#aihole

Option B: Home Manager Module (kaageModule)

Mirrors the homeModules/acedop/default.nix pattern for running kaaged as a systemd.user service:

  1. Import inputs.kaage.homeManagerModules.default in home.nix (accept inputs in args).
  2. Enable in home.nix:
kaageModule = {
  enable = true;
  autoStart = true;
  port = 9090;
  allowedUser = "pradeep@btbytes.com";
};
  1. Add 9090 to tailscale-serve-local and networking.firewall.interfaces."tailscale0".allowedTCPPorts in configuration.nix.

Local Development

# Enter Nix dev shell (or use local rustup + trunk)
nix develop

# Run unit tests
cargo test --workspace

# Start daemon locally (no Tailscale header check when KAAGE_ALLOWED_USER is unset)
cargo run -p kaaged

# Serve live-reloading WASM UI proxied to kaaged (http://127.0.0.1:8080)
trunk serve

# Or launch the native desktop client directly
cargo run -p kaage-ui

Environment Variables (kaaged)

Variable Default Description
KAAGE_BIND 127.0.0.1:9090 HTTP/WebSocket listen address
KAAGE_DIST_DIR dist Static directory serving the built WASM webtop
KAAGE_APPDATA ~/appdata Base directory for kaage & app data ($KAAGE_APPDATA/<app>/)
KAAGE_ALLOWED_USER (unset) Required Tailscale-User-Login header value
KAAGE_CONTAINER_CLI docker Container CLI binary used by the Shell button (e.g. podman)

License

MIT License — Copyright © 2026 Pradeep Gowda. See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0