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

@ishwarrr/docsync

v0.1.0

Published

Auto-updating documentation that stays true to your code. Detects drift between code and docs, generates AI documentation, and opens companion PRs automatically.

Downloads

78

Readme

DocSync

Auto-updating documentation that stays true to your code.

npm version License: MIT GitHub Actions

AI coding agents ship code 5–10× faster than documentation can be written. DocSync detects when your docs drift from your code — and fixes it automatically.

Get Started · How It Works · GitHub Action · CLI Reference


The Problem

// Your docs say:
async function createUser(email, password) {}

// Your code now says:
async function createUser(email, password, role, organizationId) {}

Two new required parameters. Zero documentation updates. Every developer who reads the old docs writes broken code. DocSync catches this the moment it happens.


How It Works

DocSync uses Tree-sitter AST parsing to understand your code structurally — not as text, but as a semantic tree of functions, classes, and API routes.

On every Pull Request:

  1. Parses changed JS/TS files with Tree-sitter
  2. Compares extracted signatures against your documentation baseline
  3. Calculates a Drift Score (0–100) for each changed construct
  4. If drift exceeds your threshold, generates updated docs using AI
  5. Opens a companion PR with the updated documentation

Installation

As a CLI tool:

npm install -g docsync
# or without installing:
npx docsync init

As a GitHub Action (recommended):

# .github/workflows/docsync.yml
- uses: ishwar-prog/docsync@v1
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    groq-api-key: ${{ secrets.GROQ_API_KEY }}

Quick Start

1. Initialize your repo (run once):

npx docsync init
git add .docsync/snapshot.json
git commit -m "docs: initialize DocSync baseline"

2. Check for drift anytime:

npx docsync check

3. Auto-fix with AI:

npx docsync fix

DocSync calls the AI, generates documentation for every drifted construct, and writes professional Markdown to your docs/ folder.


GitHub Action

Add DocSync to any repository in 3 lines:

name: DocSync
on: [pull_request]
permissions:
  contents: write
  pull-requests: write
jobs:
  docsync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ishwar-prog/docsync@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          groq-api-key: ${{ secrets.GROQ_API_KEY }}

Get a free Groq API key at console.groq.com — no credit card required.


CLI Reference

| Command | Description | |---------|-------------| | docsync init | Scan repo, parse all files, create baseline snapshot | | docsync check | Detect documentation drift, show drift score | | docsync fix | Generate AI documentation for all drifted constructs | | docsync check --json | Machine-readable output for CI integration |


Configuration

# docsync.yaml
version: 1

track:
  - src/**/*.ts
  - src/**/*.js

ignore:
  - "**/*.test.ts"
  - "**/node_modules/**"

output:
  format: markdown    # markdown | mdx
  dir: docs/

drift:
  threshold: 75       # 0-100. Higher = stricter
  auto_pr: true

The Drift Score

| Score | Status | What It Means | |-------|--------|---------------| | 0 | ✅ In Sync | Documentation matches code | | 1–39 | 🟡 Minor Drift | Small changes, low priority | | 40–74 | 🟠 Moderate Drift | Documentation is misleading | | 75–100 | 🔴 Severe Drift | Documentation is wrong |


Comparison

| Tool | Generates Docs | Detects Drift | Auto-PRs Fix | Works in CI | |------|:--------------:|:-------------:|:------------:|:-----------:| | Mintlify | ✅ | ❌ | ❌ | ❌ | | Swimm | ✅ | Partial | ❌ | ✅ | | GitHub Copilot | ✅ inline | ❌ | ❌ | ❌ | | DocSync | | | | |


Supported Languages

| Language | Parsing | Route Detection | |----------|---------|-----------------| | JavaScript | ✅ | ✅ Express.js | | TypeScript | ✅ | ✅ Express.js | | JSX / TSX | ✅ | ✅ | | Python | 🔜 Coming soon | 🔜 | | Go | 🔜 Coming soon | 🔜 |


Contributing

git clone https://github.com/ishwar-prog/docsync
cd docsync
npm install
npm link          # makes `docsync` available globally
docsync init      # DocSync documents itself

See CONTRIBUTING.md for guidelines.


License

MIT © Ishwar Suthar


Built with Tree-sitter · Groq Llama 3.3 · GitHub Actions · Node.js

If DocSync saves you time, give it a ⭐