Skip to content

streplts package

Home > streplts

High-performance interactive Read-Eval-Print Loop (REPL) and custom execution shell engine.

Provides a modular infrastructure for constructing command-line terminal applications. Features advanced sub-namespace resolution, context-aware command auto-completion pipelines, safe isolated sandboxed execution layers, and multi-line buffer history managers with dynamic console UI overlays.

Class

Description

JSSandbox

Isolated sandboxed evaluation scope running calculations via core V8 VM contexts.

Registry

Core command resolution hierarchical routing dictionary structure.

Repl

Primary stateful orchestrator managing terminal streams, inputs, UI rendering, and script evaluation.

Function

Description

arg(name, opts)

Functional utility constructing typed and structured command option values.

buildSelectionLine(flashPrompt, input, range, ghostStr, hintStr, registry, jsMode, context, globals)

colorInput(input, registry, jsMode, context, globals)

Tokenizes, checks syntax paths, and colorizes input lines with full ANSI tags.

currentWord(input)

Extracts the final contiguous word segment token from an input text sequence line.

format(col, s)

Decorates a string sequence with a targeted ANSI formatting prefix color and clear reset code.

getCandidates(input, registry, context, globals)

Scans, processes, and extracts eligible auto-complete string arrays based on input strings.

getHintArgs(input, registry)

Identifies and isolates missing arguments definitions remaining to satisfy commands.

getJSCandidates(input, sandboxRoot)

Inspects isolated VM object models to compute predictive JavaScript property keys.

getLevenshteinDistance(a, b)

pathCompleter(options)

High-performance file path completion builder mapping real directory systems onto option choices.

render(state, registry, promptStr, jsMode, opts, stdout, context, globals)

Draws the active terminal state line and overlay menus onto the output stream.

sleep(ms)

Halts pipeline execution workflows for a designated duration span.

strip(s)

Removes all embedded ANSI terminal color format escape codes from a text segment.

validate(input, registry)

Asserts structural grammar validation, verifying sub-namespaces and ensuring all required parameters are specified.

walkNS(parts, registry)

Traverses a segmented phrase chain down hierarchical branch namespaces.

Interface

Description

ArgDefinition

Structural definition specifying configuration and validation metadata for a command parameter.

BaseCommand

Common base descriptor shared across all command nodes within the execution hierarchy.

CommandInternal

Canonical model format maintained within internal registration map storage definitions.

ExecutableCommand

Complete specification for a leaf execution target containing operational hooks and terminal arguments.

NamespaceCommand

Nested structural boundary housing child executable commands or secondary sub-namespaces.

OptionDefinition

Structural definition specifying configurations for unordered option flags or switches.

RenderOptions

UI visual overrides applied on rendering operations.

ReplOptions

Configuration options required to instantiate a interactive terminal REPL runtime environment instance.

ReplState

Data store monitoring cursor tracking, buffer inputs, and selection state offsets inside an active session.

Variable

Description

COLORS

Collection of ANSI terminal text color escape sequences. *

KEYS

Standard mapping collection identifying specialized input stream key sequences. *

Type Alias

Description

CommandDefinition

Union definition representing either a direct execution target or a structural namespace node.