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

effect-herdr

v0.1.0

Published

A typed Effect SDK for herdr, the terminal-native agent multiplexer.

Readme

effect-herdr

A typed Effect SDK for herdr, the terminal-native agent multiplexer. Script sibling panes, split workspaces, and react to focus changes — all as composable, typed Effects.

Install

bun add effect-herdr effect

Quickstart

Run this from inside a herdr-managed pane (HERDR_ENV=1):

import { BunFileSystem } from "@effect/platform-bun"
import { Effect, Option } from "effect"
import { currentPane, runInPane, splitPane, HerdrSession } from "effect-herdr"

const program = Effect.gen(function* () {
  const pane = yield* currentPane
  if (Option.isNone(pane)) return yield* Effect.log("not running inside herdr")

  const sibling = yield* splitPane(pane.value, { direction: "right" })
  yield* runInPane(sibling, "echo hello from effect-herdr")
})

program.pipe(
  Effect.provide(HerdrSession.Live),
  Effect.provide(BunFileSystem.layer),
  Effect.runPromise,
)

HerdrSession.Live resolves the socket path the same way the herdr CLI itself does (env var, then ~/.config/herdr/herdr.sock) and fails loud at startup if nothing is listening there — no silent no-ops. BunFileSystem is the one platform layer this quickstart needs; see Platform runtime below for why.

A full runnable version of this — split, run a command, wait, close — is examples/parrot.ts:

bun run examples/parrot.ts   # run from inside a herdr pane

What's here

  • HerdrSession — the ergonomic entry point. One Layer, sound defaults.
  • Pane controlsplitPane, focusPane, closePane, runInPane (batch string or streaming Stream<string> input), waitForOutput (blocks on a substring/regex match, returned as a Stream).
  • Focus trackingactivePane/activeTab (per-container, always resolves), focusedPane/focusedTab/focusedWorkspace (global, Option-wrapped), focusedPaneRef (a live SubscriptionRef that updates as focus changes anywhere in herdr).
  • Identity vs. statePane/Tab/Workspace are stable references you can hold onto; PaneSnapshot/TabSnapshot/WorkspaceSnapshot are point-in-time reads with their own capturedAt.
  • Raw protocol escape hatch — every ergonomic combinator is built on HerdrConnection's typed rpc client. Drop to session.rpc["workspace.list"]() whenever the service layer doesn't cover your case; there's no hidden state that makes mixing the two incoherent.

Not every herdr RPC method has an ergonomic wrapper yet — see TODO.md for the coverage gap and other known limitations (PTY control-key input, real-time pane-output tailing).

Platform runtime

effect-herdr uses Effect's platform primitives (FileSystem, ChildProcessSpawner, Crypto, Socket) instead of Node/Bun stdlib calls directly, so it works the same way under Bun or Node. Provide whichever platform layer matches your runtime once, at your program's entrypoint — e.g. @effect/platform-bun's BunServices.layer.

Development

bun install
bun run typecheck
bun run test            # unit tests, packages/core only
bun run test:e2e        # E2E, spins private herdr servers per test
bun run test:all        # both
bun run schema:refresh  # re-capture scripts/herdr-schema.json after upgrading herdr

The E2E suite shells out to a real herdr binary to spawn isolated named-session servers — the SDK-under-test is never in that bootstrap path. Requires herdr on PATH.

Release

Versioning and publishing go through Changesets: run bun run changeset to describe a change, merge it, and CI opens a release PR that publishes to npm on merge. bun run build produces the published dist/ output (ESM + .d.ts) via tsdown.