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

busy-cli

v0.5.1

Published

CLI for BUSY document framework - parse, validate, and manage BUSY workspaces

Readme

@busy/parser

TypeScript library + CLI that parses Busy markdown workspaces into a typed graph.

Features

  • ✅ Parse Busy markdown files with YAML frontmatter
  • ✅ Build hierarchical section trees
  • ✅ Extract Local Definitions with inheritance
  • ✅ Resolve reference-style imports
  • ✅ Create typed edge graph (ref, calls, extends, imports)
  • ✅ Build minimal execution contexts for operations
  • ✅ Export to JSON and DOT graph formats

Installation

npm install @busy/parser

CLI Usage

Load and validate workspace

busyctx load "busy-v2/**/*.busy.md" --dump repo.json

Build operation context

busyctx context "Document#evaluatedocument" -o context.json --maxDefChars 2000

Export graph

busyctx graph --format dot > repo.dot

API Usage

import { loadRepo, buildContext } from '@busy/parser';

// Load workspace
const repo = await loadRepo(['busy-v2/**/*.busy.md']);

console.log(`Loaded ${repo.docs.length} documents`);
console.log(`Found ${Object.keys(repo.localdefs).length} local definitions`);
console.log(`Created ${repo.edges.length} edges`);

// Build execution context for an operation
const context = buildContext(repo, 'Document#evaluatedocument', {
  maxDefChars: 2000,
  includeChildren: true
});

console.log(`Operation: ${context.operation.title}`);
console.log(`Definitions: ${context.defs.length}`);
console.log(`Calls: ${context.calls.length}`);

Data Model

Documents & Sections

  • BusyDocument: Top-level markdown file with frontmatter
  • Section: Hierarchical heading structure (# - ######)
  • LocalDef: Definitions under "Local Definitions" section

Edges

  • imports: Document imports another document
  • calls: Section/operation calls another operation
  • extends: LocalDef extends another definition
  • ref: General reference link

Context Payload

Minimal execution context for an operation:

  • Operation section (ref, title, content)
  • Required local definitions (with transitive closure)
  • Callable sub-operations
  • Symbol table for imports

Frontmatter Support

Handles both plain strings and markdown link syntax:

---
Name: Document
Type: [Concept]
Description: The core document type
Tags: [core, foundation]
Extends: [ConceptBase]
---

Automatically strips brackets: [Concept]Concept

File Extensions

Supports both .md and .busy.md extensions. Import references to .md files automatically resolve to .busy.md files.

Example Output

For busy-v2/**/*.busy.md:

  • ✓ 15 documents loaded
  • ✓ 45 local definitions
  • ✓ 137 imports resolved
  • ✓ 173 edges created
    • 137 import edges
    • 26 call edges
    • 10 ref edges

Development

npm install
npm run build
npm run dev  # watch mode
npm test

License

ISC