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

agda-web-docs-lib

v1.0.2

Published

Library for enhancing Agda-generated HTML documentation

Readme

Agda Web Docs Library

CI npm version License: MIT

Transform your Agda HTML documentation with modern web features, responsive design, and powerful search capabilities.

✨ Features

  • 🎨 Clean, responsive design with sidebar navigation
  • 🌓 Dark/light theme with system preference detection
  • 🔍 Full-text search with Ctrl+K / Cmd+K shortcut
  • 🖱️ Line highlighting with shareable URLs (#L42, #L42-L48)
  • 💡 Type previews on hover with cross-file resolution
  • 🔗 GitHub integration for source file links
  • 📱 Mobile-friendly responsive layout

🎯 Quick Start

GitHub Actions (Recommended)

- name: 🔄 Transform Agda documentation  
  uses: will-break-it/[email protected]
  with:
    input-dir: 'html/'
    github-url: 'https://github.com/your-user/your-project'
    modules: 'Your.Module.Prefix'

CLI

npm install agda-web-docs-lib

# Process with default config
npx agda-docs process

# Custom configuration
npx agda-docs process -c config.json -i input/ -o output/

🖼️ Visual Examples

Modern Layout & Navigation

Modern Layout

Clean, responsive design with intelligent sidebar navigation, theme switching, and GitHub integration.

Powerful Search

Search Interface

Instant search across modules, functions, and code blocks with fuzzy matching and keyboard navigation.

Line Highlighting

Line Highlighting

GitHub-like line selection with shareable URLs. Click line numbers or select ranges with Shift+click.

Type Previews

Type Preview with Parameters

Rich type definition previews with documentation, parameter tables, and cross-file resolution.

⚙️ Configuration

Create agda-docs.config.json:

{
  "backButtonUrl": "/",
  "modules": ["Your.Module.Prefix"],
  "githubUrl": "https://github.com/your-user/your-project"
}

🛠️ Advanced Usage

Complete GitHub Workflow

name: Deploy Agda Documentation

on:
  push:
    branches: [main]

jobs:
  generate-docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Setup Agda
        uses: wenkokke/setup-agda@v2
        with:
          agda-version: '2.6.4'
          
      - name: Generate HTML
        run: agda --html --html-dir=html/ src/Main.agda
        
      - name: Transform documentation
        uses: will-break-it/[email protected]
        with:
          input-dir: 'html/'
          github-url: ${{ github.server_url }}/${{ github.repository }}
          modules: 'Your.Module.Prefix'
          
      - name: Deploy to GitHub Pages
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: html/

Reusable Workflow

For more complex setups, use our reusable workflow:

jobs:
  transform-docs:
    uses: will-break-it/agda-web-docs-lib/.github/workflows/[email protected]
    with:
      input-dir: 'html/'
      github-url: ${{ github.server_url }}/${{ github.repository }}
      modules: 'Your.Module.Prefix'
      artifact-name: 'my-agda-docs'

Programmatic Usage

import { AgdaDocsTransformer, AgdaDocsIndexer } from 'agda-web-docs-lib';

const config = {
  backButtonUrl: '/',
  modules: ['Your.Module'],
  githubUrl: 'https://github.com/your-user/your-project'
};

// Build position mappings
await AgdaDocsIndexer.buildPositionMappings('path/to/html');

// Transform files
const transformer = new AgdaDocsTransformer(config);
transformer.setContent(htmlContent, 'file.html');
const processed = transformer.transform();

📚 Examples

🤝 Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

📄 License

MIT