Detect current environment context from the running system.
Supports: Git repository, working directory, OS, and custom context.
All detector functions are pure — no side effects, easy to test.
Summary
Functions
List available detectors.
Check if a given entry's context hints match the current context.
Detect all available context signals.
Detect only git context (safe to call even outside a repo).
Detect the operating system.
Detect the current working directory.
Functions
List available detectors.
Check if a given entry's context hints match the current context.
Returns the number of matching keys.
Detect all available context signals.
Returns a map with detected context values: %{ repo: "owner/repo", branch: "main", path_prefix: "/home/user/project", os: "linux" }
Detect only git context (safe to call even outside a repo).
Detect the operating system.
Detect the current working directory.