Features

View Source

Terminal interface features and framework capabilities.

Framework Features

Agent Framework

AI agents as TEA apps with OTP supervision, crash isolation, and inter-agent messaging.

Sensor Fusion

Poll sensors, fuse readings with weighted averaging and thresholds, render HUD widgets.

Distributed Swarm

CRDTs, node monitoring, topology election, tactical overlay. Automatic discovery via libcluster.

Adaptive UI

Track pilot behavior, recommend layout changes, animate transitions with a feedback loop.

Recording & Replay

Capture terminal sessions as asciinema v2 .cast files. Replay with interactive controls.

REPL

Sandboxed interactive Elixir REPL with three safety levels and persistent bindings.

Time-Travel Debugging

Snapshot every update/2 cycle. Step back, step forward, restore historical state.

Terminal Features

VIM Navigation

VIM-style keybindings: h/j/k/l, gg/G, w/b/e, search, visual mode.

vim = Vim.new(buffer)
{:ok, vim} = Vim.handle_key("j", vim)

Command Parser

CLI with tab completion, history, aliases, argument parsing.

parser = Parser.new()
  |> Parser.register_command("echo", &echo/1)
{:ok, result, _} = Parser.parse_and_execute(parser, "echo hi")

Multi-mode search: fuzzy (fzf-style), exact, regex with highlighting.

results = Fuzzy.search(buffer, "hlo", :fuzzy)  # Matches "hello"

File System

Virtual filesystem: ls, cat, cd, pwd, mkdir, rm with path resolution.

fs = FileSystem.new()
{:ok, fs} = FileSystem.mkdir(fs, "/docs")
{:ok, files, _} = FileSystem.ls(fs, "/")

Cursor Effects

Visual trails and glow: configurable colors, presets, smooth interpolation.

alias Raxol.Effects.CursorTrail

trail = CursorTrail.rainbow()
trail = CursorTrail.update(trail, {x, y})
buffer = CursorTrail.apply(trail, buffer)

Combined Example

defmodule Terminal do
  alias Raxol.Effects.CursorTrail

  defstruct [:buffer, :vim, :parser, :search, :fs, :trail]

  def new do
    buffer = Buffer.create_blank_buffer(80, 24)
    %__MODULE__{
      buffer: buffer,
      vim: Vim.new(buffer),
      parser: Parser.new(),
      search: Fuzzy.new(buffer),
      fs: FileSystem.new(),
      trail: CursorTrail.rainbow()
    }
  end

  def handle_key(state, key) do
    {:ok, vim} = Vim.handle_key(key, state.vim)
    trail = CursorTrail.update(state.trail, vim.cursor)
    %{state | vim: vim, trail: trail}
  end
end

Performance

FeatureOperationTime
VIMMovement< 1us
ParserExecute~5us
Search1000 lines~100us
FileSystemList dir~10us
TrailUpdate+apply~7us

Total: < 150us per frame (60fps = 16ms budget)