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

@capyup/pi-obsidian

v0.2.0

Published

pi extension that wraps the Obsidian CLI as typed tools — read, list, search, outline, create, append, open, backlinks, tags, and daily-append against the active vault.

Readme

pi-obsidian

A pi extension that wraps the Obsidian CLI and exposes a typed family of obsidian_* tools the agent can call directly. Lets pi read, list, search, outline, create, append, and open notes in your active Obsidian vault — without dropping into shell.

Why

The raw obsidian CLI requires a vault=<id> prefix on every call (see your obsidian.json config). That id is opaque, the CLI has dozens of subcommands, and the agent has to remember argument shapes across turns. This extension does three things:

  1. Auto-resolves the active vault from obsidian.json (or PI_OBSIDIAN_VAULT_ID override).
  2. Surfaces a curated subset of CLI commands as typed tools — clean parameter schemas, no string-glue.
  3. Tells the model when to use them: each tool has a promptSnippet and promptGuidelines so pi prefers obsidian_read over the generic file-read tool when the file lives inside an Obsidian vault.

Tools

| Tool | What it does | Maps to | |---|---|---| | obsidian_read | Read a note by vault-relative path | obsidian read path=… | | obsidian_list | List files in a folder, optionally filtered by extension | obsidian files folder=… ext=… | | obsidian_search | Grep-style content search with line context, optional folder scope | obsidian search:context query=… path=… limit=… | | obsidian_outline | Heading tree of a note | obsidian outline path=… | | obsidian_create | Create a new note (optional content / overwrite / open) | obsidian create path=… content=… | | obsidian_append | Append content to a note | obsidian append path=… content=… | | obsidian_prepend | Prepend content (after frontmatter) | obsidian prepend path=… content=… | | obsidian_open | Open a note in the Obsidian app, optional new tab | obsidian open path=… | | obsidian_backlinks | List backlinks to a note | obsidian backlinks path=… | | obsidian_tags | List vault tags or per-note tags, optional counts | obsidian tags … | | obsidian_daily_append | Append to today's daily note | obsidian daily:append content=… |

Install

pi install npm:@capyup/pi-obsidian             # from npm (recommended)
pi install git:github.com/capyup/pi-obsidian   # from git
pi install /path/to/pi-obsidian                # from local checkout (dev)

Prerequisites

  • Obsidian 1.12+ with the CLI enabled: Settings → General → Command line interface
  • Obsidian app must be running with at least one vault open
  • macOS: Obsidian binary at /Applications/Obsidian.app/Contents/MacOS/obsidian (auto-detected)
  • Linux / Windows: obsidian must be on PATH, or set PI_OBSIDIAN_BIN

Vault selection

The extension auto-detects the active vault by reading obsidian.json:

| Platform | Path | |---|---| | macOS | ~/Library/Application Support/obsidian/obsidian.json | | Linux | ~/.config/obsidian/obsidian.json | | Windows | %APPDATA%/obsidian/obsidian.json |

Selection logic:

  1. PI_OBSIDIAN_VAULT_ID env var, if set
  2. The vault marked "open": true in obsidian.json
  3. Most recently opened vault (highest ts)

Environment variables

| Var | Effect | |---|---| | PI_OBSIDIAN_VAULT_ID | Force a specific vault id | | PI_OBSIDIAN_VAULT_PATH | Optional companion to the above (for diagnostics) | | PI_OBSIDIAN_BIN | Override the path to the obsidian binary |

Examples (what pi does for you)

pi> read ops/index.md from my vault
agent calls obsidian_read { path: "ops/index.md" } → returns markdown

pi> what notes mention "tailscale exit node"?
agent calls obsidian_search { query: "tailscale exit node" } → grep-style hits

pi> log this decision into today's daily note
agent calls obsidian_daily_append { content: "- decided to ..." }

pi> open the new playbook tab in Obsidian
agent calls obsidian_open { path: "ops/tailscale/tailscale-add-windows.md", newtab: true }

Development

git clone https://github.com/capyup/pi-obsidian
cd pi-obsidian
npm install
npm run typecheck         # tsc --noEmit
npm run pack:check        # npm pack --dry-run (verify files glob)

Limitations / future

  • Currently does not expose properties:* (frontmatter property) tools — TODO.
  • Does not expose command id=… (Obsidian command palette executor) — could add if useful.
  • Multi-vault: currently picks one active vault per call. If you want explicit per-call vault selection, use PI_OBSIDIAN_VAULT_ID.

License

MIT