Back to browse
GitHub Repository

Auto-generate docs from code. Detect drift. Keep docs alive. 40+ languages, tree-sitter powered, 100% local.

2 starsShell

DocSync – Git hooks that block commits with stale documentation

by suhteevah·Feb 15, 2026·4 points·0 comments

AI Analysis

●●SolidSolve My ProblemNiche GemBig Brain

Blocks commits with undocumented code, but doc rot is solved elsewhere (Cursor, GitHub Copilot, type stubs).

Strengths
  • Tree-sitter AST parsing across 40+ languages with regex fallback; genuinely robust.
  • 100% local processing, zero telemetry, offline license validation—privacy-first design.
  • Clever git hook integration (lefthook) that runs only on staged files, not full repo.
Weaknesses
  • Documentation enforcement is a solved problem for most teams; adoption depends on team discipline.
  • Free tier locked to one-shot generation; meaningful value requires $29/user/mo Pro tier.
Target Audience

Backend and full-stack developers, engineering teams with documentation quality standards

Similar To

GitHub Advanced Security documentation checks · Cursor's built-in doc generation · TypeScript JSDoc tooling

Post Description

Hi HN,

I built DocSync because every team I've worked on has the same problem: documentation that was accurate when it was written and never updated after.

DocSync uses tree-sitter to parse your code and extract symbols (functions, classes, types). On every commit, a pre-commit hook compares those symbols against existing docs. If you added a function without documenting it, the commit is blocked.

How it works:

1. `clawhub install docsync` (free) 2. `docsync generate .` — generates docs from your code 3. `docsync hooks install` — installs a lefthook pre-commit hook 4. From now on, every commit checks for doc drift

Key design decisions: - 100% local — no code leaves your machine. Uses tree-sitter for AST parsing, not an LLM. - Falls back to regex if tree-sitter isn't installed - Uses lefthook (not husky) for git hooks — it's faster and language-agnostic - License validation is offline (signed JWT, no phone-home) - Free tier does one-shot doc generation. Pro ($29/user/mo) adds hooks and drift detection.

Supports TypeScript, JavaScript, Python, Rust, Go, Java, C/C++, Ruby, PHP, C#, Swift, Kotlin.

Landing page: https://docsync-1q4.pages.dev

Would love feedback on the approach. Is doc drift detection something your team would actually use?

Similar Projects

Developer Tools●●Solid

VibeDiff – Blocks Claude Code from shipping breaking changes

Claude Code safety gate that blocks breaking changes; solves real foot-gun but limited to one AI tool.

Solve My ProblemShip It
Boussettah
103mo ago