Python SDK
The Python SDK provides helpers for reading the overseer context and applying consistent terminal styling.
Source: sdk/python/
Install
pip install overseer-sdkReading context
from overseer_sdk import PluginContext
ctx = PluginContext.from_env()
print(ctx.version) # overseer version string
print(ctx.config_path) # path to merged config file
# Retrieve a resolved secret declared in the sidecar manifest
token = ctx.secret("github.personal", "token")PluginContext.from_env() reads and parses the OVERSEER_CONTEXT environment variable injected by overseer at runtime.
Styling
from overseer_sdk import styles
# Section header
print(styles.section_header("Deployments", "production"))
# → ▸ Deployments · production
# Warning line
print(styles.warn_line("auth", "token expired"))
# → ⚠ auth: token expiredColor tokens
| Token | Code | Color | Usage |
|---|---|---|---|
STYLE_HEADER | 99 | Purple | Section titles (bold) |
STYLE_ACCENT | 212 | Pink | Keys, channels, usernames |
STYLE_OK | 82 | Green | Success states (bold) |
STYLE_WARN | 214 | Amber | Warnings (bold) |
STYLE_ERROR | 196 | Red | Errors (bold) |
STYLE_MUTED | 240 | Dark grey | Hints, empty state |
STYLE_DIM | 245 | Grey | Secondary info |
STYLE_NORMAL | 252 | Light | Body text |
All color codes use the xterm 256-color palette, which works in any modern terminal.
Example plugin
#!/usr/bin/env python3
from overseer_sdk import PluginContext, styles
ctx = PluginContext.from_env()
print(styles.section_header("My Plugin", ctx.version))
# ... your plugin logicMake the file executable and name it overseer-myplugin, then drop it in brain/overseer/plugins/.