cli

package
v0.68.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package cli is shared command plumbing for the stellad binary: dotenv loading and log-level parsing. It is not a user-facing chat CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDotEnv

func LoadDotEnv()

LoadDotEnv reads $STELLA_HOME/.env and sets any key that is not already present in the environment. Existing OS/service-injected variables win. Missing file is silently ignored; parse errors are skipped per line.

func NewMinLevelHandler

func NewMinLevelHandler(min slog.Level, next slog.Handler) slog.Handler

NewMinLevelHandler wraps next and drops records below min, regardless of what next would accept. It exists so chatty subsystem loggers (e.g. the River job queue, which heartbeats at DEBUG/INFO every few seconds) can be capped independently of the process-wide LOG_LEVEL.

func ParseLogLevel

func ParseLogLevel(raw string) slog.Level

ParseLogLevel maps a LOG_LEVEL value to slog.Level. Supported values: TRACE, DEBUG, INFO, WARN, ERROR (case-insensitive). Defaults to INFO if empty or unrecognized. It is a pure function of its argument: logging is configured before the server config is parsed, so the caller (main) passes the raw environment value.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL