Dynamic Variables (vars)
Structured key-value store for global parameters, build configuration, and software metadata.
The vars module provides a centralized memory store for application-wide settings. It supports both built-in system properties (like version and root path) and user-defined dynamic variables with full IntelliSense support.
Built-in Global Properties
These formal properties are initialized by the framework and reflect the core identity of the executing instance.
Variable Management
.get(key, defaultValue?)
Securely retrieves a value. It automatically checks explicit global properties before searching the dynamic map.
const theme = __sys__.vars.get("theme", "standard-dark");
const root = __sys__.vars.get("__root__");.set(key, value)
Instantiates or overwrites a dynamic variable in application memory.
__sys__.vars.set("max_retries", 5);.update(data)
Iteratively merges a complex data block into the store.
__sys__.vars.update({
cache_ttl: 3600,
allow_guests: false
});Extraction & Utilities
.all() / .toJSON()
Generates a consolidated representation of the entire current store.
.clone()
Creates a robust, unlinked memory copy to prevent collateral mutation.
vars store is volatile and resides in memory. For persistent configuration across restarts, use the fs module to write to a JSON file or the __env__ module for environment-level settings.Go back to the introduction or jump to the installation guide.
