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

repo-clarity

v0.1.1

Published

Analyze any GitHub repository and generate or improve README, CONTRIBUTING, issue templates, and architecture summaries

Readme

repo-clarity

Analyze any GitHub repository and generate or improve OSS documentation — README, CONTRIBUTING, issue templates, architecture docs, and PR checks.

CI Security License: MIT npm public

Why repo-clarity?

Open-source projects live or die on clarity. repo-clarity scans your repo locally (no network required for core features) and helps you:

  • Understand languages, tests, CI, and layout
  • Diagnose missing OSS files (LICENSE, CONTRIBUTING, templates)
  • Scaffold documentation from your actual project structure
  • Generate architecture docs with dependency graphs
  • Optionally refine READMEs via OpenAI or Ollama
  • Automate OSS checks on pull requests (GitHub Action)

Install

npm install -g repo-clarity

Or run without installing:

npx repo-clarity scan

Quick start

repo-clarity scan
repo-clarity doctor
repo-clarity summary

repo-clarity generate readme
repo-clarity generate contributing
repo-clarity generate issue-templates
repo-clarity generate architecture

# Optional LLM refinement (requires API key or local Ollama)
export REPO_CLARITY_OPENAI_API_KEY="your-key"
repo-clarity refine readme --i-understand-llm-risk --dry-run
repo-clarity refine readme --i-understand-llm-risk --force

Commands

| Command | Description | | -------- | ----------- | | scan [path] | Languages, package managers, tests, CI, entry points | | doctor [path] | OSS hygiene score; exit code 1 if critical issues | | summary [path] | Architecture overview and dev commands | | generate readme | Create README.md (--force, --dry-run) | | generate contributing | Create CONTRIBUTING.md | | generate issue-templates | GitHub bug + feature templates | | generate architecture | docs/ARCHITECTURE.md with dependency table + Mermaid | | refine readme | LLM polish (--i-understand-llm-risk, --provider openai\|ollama) |

Global flag: --allow-absolute (use only for trusted absolute paths).

GitHub Action (PR comments)

This repository runs repo-clarity doctor on every pull request and posts the result as a comment.

Use in your own repo:

name: OSS check
on:
  pull_request:
jobs:
  clarity:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: actions/checkout@v4
      - uses: Sosuke1006/[email protected]
        with:
          path: .
          comment-on-pr: "true"
          version: "0.1.1"

Or run the built-in workflow pattern from .github/workflows/repo-clarity-pr.yml.

Security

  • Write paths constrained to repository root (generate --output)
  • Symlinks skipped during scans; sensitive paths blocked (.ssh, .aws, …)
  • Absolute scan paths require --allow-absolute
  • LLM: --i-understand-llm-risk, secret detection, local-only Ollama by default
  • 512 KiB read limit per file; npm audit in CI; Dependabot enabled
  • See SECURITY.md for reporting vulnerabilities

Never commit API keys. Copy .env.example and use REPO_CLARITY_OPENAI_API_KEY.

Publishing (maintainers)

This package is configured for public npm (publishConfig.access: public).

GitHub Actions (tag v*): add repository secret NPM_TOKEN (Actions secrets) — use an npm Automation token with Publish permission from npm tokens. Then push a tag:

git tag v0.1.1
git push origin v0.1.1

Manual publish (no provenance — use GitHub Release workflow for provenance):

npm login
npm run build
npm test
npm publish --access public

Create a public GitHub repository and push:

git remote add origin https://github.com/Sosuke1006/repo-clarity.git
git branch -M main
git push -u origin main

Enable Private vulnerability reporting under GitHub → Settings → Security.

Development

git clone https://github.com/Sosuke1006/repo-clarity.git
cd repo-clarity
npm install
npm run build
npm test
npm run dev -- scan ./tests/fixtures/node-lib

Example output

See examples/sample-output/.

Contributing

See CONTRIBUTING.md.

License

MIT