Documentation
¶
Overview ¶
Package lang declares the OS-level developer toolchain that `multiversa stack` installs. These are distinct from the curated agentic engines in internal/stack (Engram, Graphify, …): tools here are foundational languages and runtimes (Go, Rust, Python, Node, pnpm).
Every Tool installs into the user's home directory by default so a portable USB lab can carry its own toolchain without sudo.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupportedOS = errors.New("not supported on this OS — use the bash fallback or platform-native installer")
ErrUnsupportedOS is returned by a Tool when the current host has no install path defined (e.g. asking for pyenv on Windows).
Functions ¶
This section is empty.
Types ¶
type Docker ¶
type Docker struct{}
Docker is system-level on Linux (apt/dnf/pacman repo) and a desktop app on macOS/Windows. We don't auto-launch the GUI installer; we surface the right command and let the user click through. This keeps the consultive contract honest: the wizard never silently swallows a GUI prompt.
func (Docker) Description ¶
func (Docker) DisplayName ¶
type Go ¶
type Go struct{}
Go (the language) uses the package manager when available. We don't install from the official tarball by default because that requires writing to /usr/local without sudo, which breaks the no-sudo portability promise.
func (Go) Description ¶
func (Go) DisplayName ¶
type Node ¶
type Node struct{}
Node uses nvm on Unix and the official MSI on Windows. We prefer nvm because it lets Moshe pin per-project Node versions without root. The install drops nvm into ~/.nvm; activating it requires sourcing nvm.sh, which the post-install message reminds the user to do.
func (Node) Description ¶
func (Node) DisplayName ¶
type Plan ¶
type Plan struct {
Program string // executable to run ("sh", "brew", "apt", …)
Args []string // arguments
Shell string // optional: full shell pipeline (e.g. "curl … | sh")
Notes string // human-readable note about what happens
}
Plan describes how a Tool will be installed on the current host. The shell field, when non-empty, is a single command piped into sh (used by rustup, pnpm install, pyenv, nvm). When empty, Args is run directly via internal/exec.
type Pnpm ¶
type Pnpm struct{}
Pnpm installs pnpm via the official standalone script. This is the only Node package manager Multiversa supports — `npm` is banned by policy (see CONSTITUTION.md). The standalone installer does not require Node to be present yet; it brings its own bundled runtime.
func (Pnpm) Description ¶
func (Pnpm) DisplayName ¶
type Python ¶
type Python struct{}
Python uses pyenv on Unix for per-project version management. On Windows we install the latest official Python via winget — pyenv-win exists but adds an extra dependency we don't currently audit.
func (Python) Description ¶
func (Python) DisplayName ¶
type Rust ¶
type Rust struct{}
Rust installs the official rustup toolchain. rustup is the canonical way to manage Rust across every OS, including Windows (with the rustup-init.exe shim). User-mode install into ~/.cargo and ~/.rustup keeps it portable and avoids sudo.
func (Rust) Description ¶
func (Rust) DisplayName ¶
type Tool ¶
type Tool interface {
ID() string // stable kebab-case identifier
DisplayName() string // human label
Description() string // one-line purpose
Probe() string // binary name to check on PATH (matches detect)
// PlanFor returns the install Plan for the given OS kind ("darwin",
// "linux", "windows") and pkgMgr ("brew", "apt", "dnf", …). It returns
// (Plan{}, ErrUnsupportedOS) when no path is defined.
PlanFor(osKind, pkgMgr string) (Plan, error)
// Installed reports whether the tool is already on PATH.
Installed() bool
}
Tool is one OS-level developer dependency.