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

@agenticweb-md/validator

v1.0.0

Published

Validate agenticweb.md files against the official schema

Readme

@agenticweb-md/validator

Validate agenticweb.md files against the official schema.

Installation

npm install @agenticweb-md/validator

Or use directly with npx:

npx @agenticweb-md/validator ./agenticweb.md

CLI Usage

# Validate a local file
agenticweb-validator ./agenticweb.md

# Validate from URL
agenticweb-validator https://example.com/agenticweb.md

# Output as JSON (for CI/CD)
agenticweb-validator ./agenticweb.md --json

# Quiet mode (only show errors)
agenticweb-validator ./agenticweb.md --quiet

# Validate multiple files
for f in examples/*/agenticweb.md; do
  agenticweb-validator "$f"
done

Programmatic Usage

import { 
  validateFile, 
  validateUrl, 
  validateContent, 
  validateDocument 
} from '@agenticweb-md/validator';

// Validate a local file
const result = validateFile('./agenticweb.md');
if (result.valid) {
  console.log('Valid!', result.data);
} else {
  console.error('Errors:', result.errors);
}

// Validate from URL
const urlResult = await validateUrl('https://example.com/agenticweb.md');

// Validate raw content
const content = `---
agenticweb: "1"
name: example
description: "Example organization"
---
`;
const contentResult = validateContent(content);

// Validate parsed YAML object
const data = { agenticweb: '1', name: 'example', description: 'Example' };
const docResult = validateDocument(data);

API

validateFile(filePath: string): ValidationResult

Validate an agenticweb.md file from disk.

validateUrl(url: string): Promise<ValidationResult>

Fetch and validate an agenticweb.md file from a URL.

validateContent(content: string): ValidationResult

Validate agenticweb.md content (including YAML frontmatter).

validateDocument(data: unknown): ValidationResult

Validate a parsed YAML object against the schema.

extractFrontmatter(content: string): string | null

Extract YAML frontmatter from markdown content.

parseYamlContent(yamlContent: string): unknown

Parse YAML string to object.

Types

interface ValidationResult {
  valid: boolean;
  errors: ValidationError[];
  data?: AgenticWebDocument;
}

interface ValidationError {
  path: string;
  message: string;
  keyword: string;
  params?: Record<string, unknown>;
}

License

MIT