Python SDK for building Overseer plugins
Project description
overseer-sdk (Python)
Python SDK for building external plugins for overseer — a personal developer CLI that unifies daily workflows.
What is an overseer plugin?
overseer supports external plugins: any executable named overseer-<name> on PATH or in brain/overseer/plugins/ is automatically registered as overseer <name>. Plugins can also hook into the daily briefing and status health-check commands.
This SDK gives you the context, helpers, and styling primitives to write those plugins in Python.
Install
pip install overseer-sdk
Or with uv:
uv add overseer-sdk
Quick start
#!/usr/bin/env python3
from overseer_sdk import PluginContext, StatusResult, run_main, section_header, ok_line
def daily(ctx: PluginContext) -> str:
token = ctx.secret("myservice", "token")
# ... fetch data using token ...
lines = [str(section_header("My Service", "2 items"))]
lines.append(str(ok_line("all good")))
return "\n".join(lines)
def status(ctx: PluginContext) -> list[StatusResult]:
return [StatusResult(name="myservice", ok=True, message="connected")]
if __name__ == "__main__":
run_main(daily_fn=daily, status_fn=status)
Save it as overseer-myservice, make it executable, and drop it in brain/overseer/plugins/. Add a sidecar manifest:
// overseer-myservice.json
{
"description": "My service integration",
"secrets": ["myservice"],
"hooks": ["daily", "status"]
}
API reference
PluginContext
Loaded from the OVERSEER_CONTEXT environment variable that overseer injects before calling your plugin.
from overseer_sdk import PluginContext
ctx = PluginContext.from_env()
ctx.version # str — overseer version
ctx.config_path # str — path to the active config.yaml
ctx.secrets # dict[str, dict[str, str]] — resolved secrets
ctx.secret(ref, key) -> str
Return a resolved secret value by integration ref and key. Raises KeyError if the ref or key is not found — this usually means the secret wasn't declared in the plugin manifest.
token = ctx.secret("github.personal", "token")
run_main(daily_fn, status_fn)
Wire up your plugin's hooks from CLI arguments. Call this at the bottom of your script.
from overseer_sdk import run_main
run_main(daily_fn=my_daily, status_fn=my_status)
- When called with
daily: runsdaily_fn(ctx), prints the returned string to stdout. - When called with
status: runsstatus_fn(ctx), serialises the returned list to JSON on stdout. - Either argument can be omitted if your plugin only implements one hook.
StatusResult
from overseer_sdk import StatusResult
StatusResult(name="github", ok=True, message="authenticated as user@example.com")
StatusResult(name="jira", ok=False, message="token expired")
notify(title, message, subtitle="")
Fire a native desktop notification via overseer notify.
from overseer_sdk import notify
notify("Deploy done", "my-service v1.2.3 is live")
notify("Build failed", "see CI logs", subtitle="my-repo")
Styling
The SDK exposes the same colour palette and helpers used by the overseer CLI itself, built on rich.
from rich.console import Console
from overseer_sdk import (
section_header, # ▸ Label · badge
ok_line, # ✓ label: message
warn_line, # ⚠ label: message
error_line, # ✗ label: message
STYLE_HEADER, STYLE_ACCENT, STYLE_OK, STYLE_WARN,
STYLE_ERROR, STYLE_MUTED, STYLE_DIM, STYLE_NORMAL,
)
console = Console()
console.print(section_header("GitHub", "3 open PRs"))
console.print(ok_line("auth", "user@example.com"))
console.print(warn_line("rate limit", "80% used"))
console.print(error_line("token", "expired"))
How overseer calls your plugin
overseer sets the OVERSEER_CONTEXT environment variable to a JSON object before invoking your plugin binary:
{
"version": "1.2.3",
"config_path": "/Users/you/brain/overseer/config.yaml",
"secrets": {
"myservice": {
"token": "resolved-secret-value"
}
}
}
Secrets listed in the manifest are pre-resolved (including op:// 1Password references) before the plugin is called. Your plugin never needs to touch the op CLI directly.
Links
- overseer — the main CLI
- TypeScript SDK — same SDK for TypeScript plugins
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file overseer_sdk-0.1.2.tar.gz.
File metadata
- Download URL: overseer_sdk-0.1.2.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51422d5910926b9ac743eefe7f7a9efb28c7b0c5235f01d51990101e9ecac3c6
|
|
| MD5 |
fa61d14895e7fa23f7d57949309260f0
|
|
| BLAKE2b-256 |
8ec91ef7709cfe8869243a20d9bb36a3552b99d542b643aa8c9f8fd2e7d2efbc
|
File details
Details for the file overseer_sdk-0.1.2-py3-none-any.whl.
File metadata
- Download URL: overseer_sdk-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
261ecdacc0dcaf20229930bf9304ab2567e9e3b3e813f941a5d29a3fac33aeb1
|
|
| MD5 |
42aa109010f132ae843c58b09bdba124
|
|
| BLAKE2b-256 |
6d8d129cdb449fd7901a9e8cba3edef462baa8fb06c81f0b26b3a19aeb1a40c4
|