npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

overseer-sdk

v0.1.1

Published

TypeScript SDK for building Overseer plugins

Downloads

233

Readme

@overseer/sdk (TypeScript)

npm Node Tests

TypeScript 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 TypeScript/JavaScript.


Install

npm install overseer-sdk

Quick start

#!/usr/bin/env node
import { loadContext, runMain, sectionHeader, okLine } from "overseer-sdk";
import type { PluginContext, StatusResult } from "overseer-sdk";

async function daily(ctx: PluginContext): Promise<string> {
  const token = getSecret(ctx, "myservice", "token");
  // ... fetch data using token ...
  const lines = [
    sectionHeader("My Service", "2 items"),
    okLine("all good"),
  ];
  return lines.join("\n");
}

async function status(ctx: PluginContext): Promise<StatusResult[]> {
  return [{ name: "myservice", ok: true, message: "connected" }];
}

runMain({ daily, status });

Save it as overseer-myservice (compiled or via tsx/node --loader), 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

loadContext(): PluginContext

Load the plugin context from the OVERSEER_CONTEXT environment variable that overseer injects before calling your plugin. Throws if the variable is not set.

import { loadContext } from "@overseer/sdk";

const ctx = loadContext();

ctx.version      // string — overseer version
ctx.config_path  // string — path to the active config.yaml
ctx.secrets      // PluginSecrets — resolved secrets map

getSecret(ctx, ref, key): string

Return a resolved secret value by integration ref and key. Throws if the ref or key is not found — this usually means the secret wasn't declared in the plugin manifest.

import { getSecret } from "@overseer/sdk";

const token = getSecret(ctx, "github.personal", "token");

runMain(hooks: PluginHooks): Promise<void>

Wire up your plugin's hooks from CLI arguments. Call this at the entry point of your script.

import { runMain } from "@overseer/sdk";

runMain({ daily: myDaily, status: myStatus });
  • When called with daily: runs hooks.daily(ctx), writes the returned string to stdout.
  • When called with status: runs hooks.status(ctx), serialises the returned array to JSON on stdout.
  • Either hook can be omitted if your plugin only implements one.

PluginHooks

interface PluginHooks {
  daily?: (ctx: PluginContext) => string | Promise<string>;
  status?: (ctx: PluginContext) => StatusResult[] | Promise<StatusResult[]>;
}

StatusResult

interface StatusResult {
  name: string;
  ok: boolean;
  message: string;
}

// Example
const results: StatusResult[] = [
  { name: "github", ok: true, message: "authenticated as [email protected]" },
  { name: "jira", ok: false, message: "token expired" },
];

notify(title, message, subtitle?)

Fire a native desktop notification via overseer notify.

import { notify } from "overseer-sdk";

notify("Deploy done", "my-service v1.2.3 is live");
notify("Build failed", "see CI logs", "my-repo");

Styling

The SDK exposes the same colour palette and helpers used by the overseer CLI itself, built on chalk.

import {
  styles,
  sectionHeader, // "▸ Label  ·  badge"
  okLine,         // "✓  label: message"
  warnLine,       // "⚠  label: message"
  errorLine,      // "✗  label: message"
} from "overseer-sdk";

console.log(sectionHeader("GitHub", "3 open PRs"));
console.log(okLine("auth", "[email protected]"));
console.log(warnLine("rate limit", "80% used"));
console.log(errorLine("token", "expired"));

// Raw style functions
console.log(styles.header("Section title"));
console.log(styles.accent("username"));
console.log(styles.muted("hint text"));

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