core

module
v0.0.0-...-f7c6332 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: MIT

README

residual/core

shared library for the residual toolsuite. no binaries — import this.

libraries (under lib/): lib/ansi/ ANSI/VT escape sequence constants and helpers lib/config/ TOML config loading (system + user, merged) lib/defaults/ numeric and string constants shared across repos lib/ipc/ JSON-over-UNIX-socket RPC client/server lib/lock/ singleton lock via UNIX socket lib/log/ dual-output logger (stderr + timestamped file) lib/proc/ process groups, graceful shutdown, reaper lib/pty/ PTY session management, VT screen buffer, shell detection lib/script/ Lua VM factory (gopher-lua) + safe res-core stdlib lib/script/system/ unsafe extensions (exec, write_file, has_service) lib/tui/theme/ amber palette, lipgloss styles, TOML config, OSC sequences lib/tui/list/ scrollable cursor list, RenderListRow, FilterContains lib/tui/overlay/ help overlay rendering (HelpSection, RenderHelpOverlay) lib/tui/widget/ Widget interface for status bar widgets lib/util/ path helpers (home dir, ~ expansion, CWD shortening) lib/xdg/ freedesktop .desktop session + app discovery


docs/aesthetic.md color scheme and ui philosophy (applies to everything) docs/os.md the residual os (alpine-based, future work) docs/tooling.md original tooling overview (pre-split reference) docs/console.md console user reference docs/console-design.md console internals docs/keymap.md keybindings across all tools docs/scripting.md lua scripting api


module: git.merith.xyz/residual/core language: go 1.25

Directories

Path Synopsis
cmd
res command
res-console command
res-demo command
demo_ansi.go — demonstrates package ansi.
demo_ansi.go — demonstrates package ansi.
res-edit command
res-sh command
res-theme command
res-theme — interactive editor for the unified residual theme.
res-theme — interactive editor for the unified residual theme.
residual-init command
res-init is the residual userspace init daemon and client.
res-init is the residual userspace init daemon and client.
residual-login command
internal
libs/auth
Package auth defines interfaces for authentication and session management.
Package auth defines interfaces for authentication and session management.
libs/auth/tty
Package tty handles TTY acquisition and terminal state for the login binary.
Package tty handles TTY acquisition and terminal state for the login binary.
libs/console/script
Package script provides the Lua scripting engine for res-console.
Package script provides the Lua scripting engine for res-console.
libs/init/config
Package config holds the init-specific configuration that is loaded on top of the core config waterfall:
Package config holds the init-specific configuration that is loaded on top of the core config waterfall:
libs/init/install
Package install writes host-init service files for res-init so it can be installed as a managed service under systemd, openrc, or runit.
Package install writes host-init service files for res-init so it can be installed as a managed service under systemd, openrc, or runit.
libs/init/service
Package service implements Lua-driven service definitions, dependency resolution, and process supervision for res-init.
Package service implements Lua-driven service definitions, dependency resolution, and process supervision for res-init.
lib
ansi
Package ansi provides named constants and helpers for ANSI/VT escape sequences used across the residual terminal suite.
Package ansi provides named constants and helpers for ANSI/VT escape sequences used across the residual terminal suite.
cmd
Package cmd provides a shared command system for residual applications.
Package cmd provides a shared command system for residual applications.
cmd/lua
Package lua provides a bridge between the cmd command system and Lua scripts.
Package lua provides a bridge between the cmd command system and Lua scripts.
cmd/ui
Package ui provides prefabricated bubbletea widgets for the cmd command system.
Package ui provides prefabricated bubbletea widgets for the cmd command system.
defaults
Package defaults holds shared numeric and string constants used across the residual packages so magic numbers are not scattered through the codebase.
Package defaults holds shared numeric and string constants used across the residual packages so magic numbers are not scattered through the codebase.
help
Package help implements the res dispatcher's --res-help discovery contract.
Package help implements the res dispatcher's --res-help discovery contract.
ipc
log
Package log provides a dual-output logger for Residual programs.
Package log provides a dual-output logger for Residual programs.
pty
xdg
Package xdg parses freedesktop .desktop files and provides XDG-related helpers.
Package xdg parses freedesktop .desktop files and provides XDG-related helpers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL