Raxol.Minimal (Raxol v2.0.1)
View SourceMinimal Raxol terminal interface for ultra-fast startup.
This module provides a stripped-down version of Raxol optimized for minimal startup time and memory footprint while still providing core terminal functionality.
Features Included
- Core terminal emulation with full ANSI/CSI support
- Efficient buffer management with scrollback
- Keyboard/mouse input handling
- Performance telemetry
- Character sets (UTF-8, ASCII)
- Color support (16/256/RGB)
Features Excluded
- Web interface (Phoenix)
- Database layer
- Advanced animations
- Plugin system (unless explicitly enabled)
- Audit logging
- Enterprise features
Usage
# Start minimal terminal
{:ok, terminal} = Raxol.Minimal.start_terminal()
# Or start with options
{:ok, terminal} = Raxol.Minimal.start_terminal(
width: 80,
height: 24,
mode: :raw,
features: [:colors, :scrollback]
)Configuration
The minimal terminal can be configured via application environment:
config :raxol, Raxol.Minimal,
default_width: 80,
default_height: 24,
max_scrollback: 1000,
enable_telemetry: true
Summary
Functions
Returns a specification to start this module under a supervisor.
Clear the terminal screen.
Get terminal dimensions.
Get performance metrics.
Get current terminal state for debugging.
Reset terminal to initial state.
Resize the terminal.
Send input to terminal.
Start a minimal terminal session with ultra-fast startup.
Types
@type color_mode() :: :none | :ansi16 | :ansi256 | :rgb
@type feature() ::
:colors | :scrollback | :mouse | :bracketed_paste | :alternate_screen
@type terminal_mode() :: :raw | :cooked | :cbreak
@type terminal_options() :: [ width: pos_integer(), height: pos_integer(), mode: terminal_mode(), color_mode: color_mode(), features: [feature()], scrollback_lines: non_neg_integer(), charset: :utf8 | :ascii, telemetry: boolean(), hibernate_after: timeout() ]
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec clear(pid()) :: :ok
Clear the terminal screen.
@spec get_dimensions(pid()) :: {pos_integer(), pos_integer()}
Get terminal dimensions.
Get performance metrics.
Get current terminal state for debugging.
@spec reset(pid()) :: :ok
Reset terminal to initial state.
@spec resize(pid(), pos_integer(), pos_integer()) :: :ok
Resize the terminal.
Send input to terminal.
@spec start_terminal(terminal_options()) :: {:ok, pid()} | {:error, term()}
Start a minimal terminal session with ultra-fast startup.
Returns {:ok, pid} on success.