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 🙏

© 2025 – Pkg Stats / Ryan Hefner

obsidian-sparql

v1.0.1

Published

Query the graph of your notes

Readme

obsidian-sparql

A SPARQL alternative to Dataview for Obsidian. Query your markdown notes using standard RDF/SPARQL, with support for cross-vault and cross-repository querying through shared triplestores.

What it does

Your markdown files are indexed as RDF triples using vault-triplifier and stored in a triplestore. You can then:

  • Run SPARQL queries in osg code blocks within your notes
  • View contextual panels showing query results for the current file you're viewing
  • Query across multiple vaults when using a shared triplestore

Unlike Dataview's custom query language, this uses standard SPARQL, making your queries interoperable with other RDF tools and enabling external systems (like MCP servers) to query your knowledge base.

Features

  • In-memory triplestore: Start immediately without external setup
  • Cross-vault querying: Query across multiple Obsidian vaults from a shared triplestore
  • Contextual panels: Automatic query results for the file you're currently viewing
  • Agent integration: External tools can query your knowledge base via SPARQL endpoints
  • RDF ecosystem: Leverage existing SPARQL tools and semantic web technologies

Installation

Download zip archive from GitHub releases page. Extract the archive into /.obsidian/plugins.

Or install the plugin via BRAT using this repository URL

Quick start

  1. Enable the plugin. (uses in-memory triplestore by default)
  2. Run the index command
  3. Query your notes using osg code blocks:
SELECT ?p ?o WHERE {
  ?s ?p ?o .
} LIMIT 5

It will display 5 random 'triples'.

To narrow down to the current note, you can use the name of the note as subject.

SELECT ?p ?o WHERE {
  [[Current Note]] ?p ?o .
}
  • For external triplestore: Configure endpoint in settings
  • Open the panel to view contextual queries for your current file

Template system

SPARQL queries will overwrite special tokens before querying

  • __THIS__: Current note name URI (urn:name:NoteName)
  • __DOC__: Current note file URI (file:///absolute/path)
  • __property__: Property placeholders (e.g., __label__<urn:property:label>)
  • [[Note Name]]: Converts to name URIs in queries

Example queries

See example-panels/ for ready-to-use SPARQL queries covering backlinks, stats, navigation, etc.

Commands

  • Open panel: View current file's RDF triples
  • Insert SPARQL template: Add query template at cursor
  • Sync current file: Sync active file with triplestore
  • Sync with triplestore: Full vault synchronization

Development

npm run dev    # Development with hot reload
npm run build  # Production build
npm test       # Run tests

See CLAUDE.md for architecture details and vault-triplifier for RDF conversion examples.