Install
openclaw skills install @psyb0t/goenvGo library that reads the ENV variable and returns "dev" only if exactly "dev", otherwise "prod" with boolean helpers and fail-safe defaults.
openclaw skills install @psyb0t/goenvA Go library that reads a single environment variable — ENV — and answers one question: are you in prod or dev? That's the whole package. os.Getenv("ENV") with a fail-safe default and three named helpers, zero dependencies. Import it and call goenv.Get().
For install, the exact match/default behavior, and a worked example, see references/setup.md.
ENV — and nothing else. No other env vars are read, nothing is written to disk, no network calls are made at runtime, and no data leaves your process. Its only import is the stdlib os.ENV resolves to prod, so a misconfigured environment errs toward production-grade behavior rather than accidentally enabling dev-only shortcuts.github.com/psyb0t/goenv and you want to add or read a prod/dev check consistently (goenv.IsProd() / goenv.IsDev() instead of hand-rolled os.Getenv comparisons).dev and prod; everything that isn't exactly "dev" collapses to prod.ENV, or a configurable variable name — goenv reads the hardcoded ENV and nothing else. Reach for a real config library (e.g. gonfiguration) for anything richer.Type type — it's a string alias, so goenv.Type is string; the constants are conveniences, not an enum, and any string is assignable. If you need a distinct nominal type, this isn't it.import "github.com/psyb0t/goenv"
// The current environment as a string ("prod" or "dev"):
switch goenv.Get() {
case goenv.Dev:
// dev-only behavior
default: // goenv.Prod
// prod behavior
}
// Or the boolean shortcuts:
if goenv.IsDev() {
logger.SetLevel("debug")
}
if goenv.IsProd() {
enableStrictMode()
}
// The recognized values and the variable name are exported constants:
_ = goenv.Prod // "prod"
_ = goenv.Dev // "dev"
_ = goenv.EnvVarName // "ENV"
The mapping is exact: Get() returns Dev only when ENV is precisely "dev"; every other value — unset, empty, "DEV", "development", "prod", or anything else — returns Prod. Set it before your process starts:
ENV=dev ./yourapp # dev
ENV=prod ./yourapp # prod
./yourapp # ENV unset → prod (the default)
For the module path, supported Go version, and the full behavior table, see references/setup.md.