NodeProfile class

A node's environment profile, persisted at ~/.omnyshell/profile.yaml and applied as the baseEnvironment of every shell/exec session the node serves.

Sessions run the node's shell non-interactively, so no rc file (.zshrc, .bashrc, ...) is sourced; this profile is how a node carries a prepared PATH (and any other env the operator adds) into every session.

File shape:

env:
  PATH: "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"
  EDITOR: vim

Values may reference other variables with ${VAR}/$VAR; these are expanded at load time against the node's own environment, because the resulting strings are passed verbatim to Process.start (no shell interprets them).

Constructors

NodeProfile(Map<String, String> env)
const

Properties

env Map<String, String>
Environment variables overlaid on every session, fully expanded.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

defaultPath({String? home}) String
The default profile path, ~/.omnyshell/profile.yaml (honoring OMNYSHELL_HOME/HOME). home overrides the base directory in tests.
load({String? path, String? home, Map<String, String>? environment}) NodeProfile
Loads the profile from path (defaults to defaultPath).
writePath(String path, String pathValue) → void
Writes the PATH entry of path's profile to pathValue, preserving any other env entries and surrounding comments. Creates the file (and its parent directory) from a template when it does not yet exist.

Constants

empty → const NodeProfile
An empty profile (no overrides).