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

@ryansann/okftool

v0.2.4

Published

WebAssembly bindings for okftool-core (the @ryansann/okftool npm package).

Downloads

44

Readme

okftool

CI License: Apache-2.0

A fast, embeddable validator and linter for OKF (Open Knowledge Format) bundles, written in Rust.

One core, three surfaces:

| Surface | Crate | Use | |---|---|---| | Native CLI | okftool-cliokftool | CI, local okftool validate / okftool lint | | wasm / npm | okftool-wasm@ryansann/okftool npm package | embed in JS hosts (a desktop app, a Node/edge API, the browser) | | Rust crate | okftool-core | embed directly in a Rust host |

The brain — parsing, spec validation, and the lint engine — lives in okftool-core and is filesystem-agnostic (callers pass (path, content)), so it compiles unchanged to native and wasm32. There is exactly one implementation.

Two layers

okftool mirrors the OKF spec's MUST/SHOULD split:

  • validate enforces what the spec says MUST be true (§9 conformance: parseable frontmatter, a non-empty type). These are non-disableable errors.
  • lint enforces what SHOULD be true plus everything the spec leaves to judgment. Every lint rule is configurable and disableable. A lint rule may never flag something the spec mandates tolerating (broken links, unknown type values, missing optional fields) as a non-disableable error.

Install

# from source (requires a Rust toolchain)
cargo install --path crates/okftool-cli
# or, once published
cargo install okftool-cli

Prebuilt binaries for macOS/Linux/Windows are attached to each GitHub release.

Usage

okftool validate <bundle>      # §9 conformance only (exit 1 if non-conformant)
okftool lint <bundle>          # spec + lint rules; --config, --format pretty|json|sarif
okftool rules                  # list all rules by category
okftool explain <rule>         # a rule's rationale, category, default severity
okftool init [dir]             # scaffold a .okftool.yaml
okftool build <bundle>         # package the bundle as <name>.tar.gz (-o, --prefix)

lint reads <bundle>/.okftool.yaml (or --config), else the okf-recommended profile. Exit is non-zero on non-conformance or any diagnostic at/above ci.fail-on (default error). --format sarif emits SARIF 2.1.0 for inline GitHub PR annotations.

Rules & configuration

okftool ships 28 lint rules across seven categories (frontmatter, type-vocabulary, linking, topology, graph-structure, body, index/log). .okftool.yaml selects a profile with extends, sets per-rule severity/options, scopes rules with glob overrides, and gates CI with ci.fail-on. Concepts can opt out inline via an okf-lint-disable frontmatter list.

# .okftool.yaml
extends: okf-recommended           # or okf-strict / okf-minimal
rules:
  linking/no-dangling-links: warn          # off | info | warn | error
  topology/max-out-degree: { severity: warn, options: { max: 20 } }
graph:
  neighborhoods:
    graph-authoring:
      paths: [principles/local-neighborhoods.md, rules/graph-coherence.md]
ci:
  fail-on: error

The full format, every rule, and the okf-recommended / okf-strict / okf-minimal profiles are documented in okftool's own OKF bundle (it dogfoods itself) — see docs/okf, in particular reference/configuration, reference/profiles, and reference/rules.

Develop

make ci          # fmt + clippy + test + wasm build + dogfood lint
make lint-self   # lint okftool's own OKF docs bundle under the strict profile
make help        # list all targets

See CONTRIBUTING.md for how to add a rule.

License

Licensed under the Apache License, Version 2.0.