█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

Sphinx

एक git hook जो protected branch पर push को तब तक रोकता है जब तक आप सही अनुमान न लगा लें कि agent द्वारा लिखा गया change क्या करता है

AI Code Review & Securityओपन सोर्स
अपडेट किया गया
16 अक्टू॰ 2026
भाषा
JavaScript
लाइसेंस
MIT
कवरेज
1 story
$npm install -g sphinx-understand

नया क्या है

16 अक्टू॰ 2026

First public release of Sphinx on npm as sphinx-understand, followed by a Show HN launch on October 18.

ताज़ा खबरें

संक्षेप में

Sphinx क्या है?

Sphinx एक git hook जो protected branch पर push को तब तक रोकता है जब तक आप सही अनुमान न लगा लें कि agent द्वारा लिखा गया change क्या करता है. यह AI Coding टूल्स की AI Code Review & Security श्रेणी में आता है; ओपन सोर्स है, JavaScript में लिखा गया है और MIT लाइसेंस के तहत है।

अपडेट किया गया Markdown वर्शन ↗
Sphinx understanding check in the browser: a payments diff beside a question asking whether a retried charge hits the gateway twice
A push to main paused on Question 1, with the changed files, the diff and the code behind the question.Sphinx repository ↗

सारांश

Sphinx agent की मदद से होने वाली development के लिए एक ओपन सोर्स comprehension checkpoint है। जब आप protected branch पर push करते हैं, तो git रुक जाता है और Sphinx आपसे अनुमान लगाने को कहता है कि change क्या करेगा। अगर कोई बात छूट जाए तो वह समझाता है और उसी concept पर नया scenario देता है। पास होने के बाद push आगे बढ़ता है। फ़र्क नहीं पड़ता कि git push आपने चलाया या coding agent ने, व्यवहार एक जैसा रहता है। प्रोजेक्ट का नारा है: “अपनी सोच आउटसोर्स करें, अपनी समझ नहीं।”

Sphinx explaining a wrong answer, asking a follow-up about a process restart, and marking the check passed after a correct reply
A miss gets an explanation and a follow-up scenario; the right answer completes the check.Sphinx repository ↗

सवाल एक अलग reviewer model बनाता है। वह commit किए गए change को केवल-पढ़ने वाले git tools से पढ़ता है और उस conversation को कभी नहीं देखता जिसमें कोड लिखा गया था। सवाल फ़ाइल या function के नामों के बजाय व्यवहार, failure modes और invariants पर होते हैं। ये ओपन-बुक होते हैं, यानी जवाब देते समय कोड देखा जा सकता है। सवालों की संख्या change के आकार के साथ बढ़ती है: छोटे change के लिए एक, और डिफ़ॉल्ट गहराई पर अधिकतम तीन। प्रश्नावली ब्राउज़र में खुलती है, जिसमें बदली हुई फ़ाइलें, लाइन की गिनती, ब्राउज़ हो सकने वाला diff और वे code locations दिखते हैं जिन्हें reviewer ने पढ़ा था।

Sphinx का अपना कोई account या hosted service नहीं है। reviewer एक signed-in Codex या Claude Code CLI, OpenRouter key या कोई भी OpenAI-compatible endpoint हो सकता है। उसे बदला हुआ कोड, संबंधित फ़ाइलें, आपके जवाब और एक वैकल्पिक project description मिलती है, जबकि ignored paths, .env फ़ाइलें और private keys कभी नहीं पढ़ी जातीं। coding agent को केवल check की स्थिति, progress और usage दिखती है, आपके जवाब कभी नहीं। README साफ़ कहता है कि यह अभ्यास है, security gate नहीं: version 0.1 केवल local pushes जाँचता है, local access वाला कोई भी व्यक्ति hooks बायपास कर सकता है, और examiner एक LLM है जो गलत हो सकता है।

यह क्या करता है

  • उन branches पर push से पहले checkpoint, जिन्हें आप protect करते हैं, चाहे push आप चलाएँ या coding agent
  • अलग reviewer model से व्यवहार, failure modes और invariants पर सवाल, जो केवल commit किया गया change पढ़ता है
  • गलत जवाब पर स्पष्टीकरण और नया scenario मिलता है। प्रश्नावली में ये नियंत्रण हैं: Explain this, Dispute question, Pause check और Skip this time
  • पास हुई जाँच 24 घंटे तक मान्य रहती है, जब तक code, destination या policy न बदले। commit के बाद सवाल अक्सर background में पहले से तैयार हो जाते हैं
  • Codex, Claude Code (MCP के ज़रिए), Cursor, OpenCode और Pi के लिए integrations, साथ ही सादा git
  • repository policy .sphinxconfig, .sphinxignore और .sphinxcontext.md में रहती है। .env फ़ाइलें और private keys डिफ़ॉल्ट रूप से बाहर रहती हैं, और हर sphinx yolo skip दर्ज होता है

शुरू करें

Sphinx के लिए Node.js 22.19 या उससे नया version, git, और macOS, Linux या WSL चाहिए (native Windows अभी समर्थित नहीं है)। साथ में एक reviewer model भी चाहिए: signed-in Codex या Claude Code CLI, OpenRouter key या OpenAI-compatible endpoint। ये commands project README से लिए गए हैं।

CLI और global hook इंस्टॉल करें

sphinx install git का global core.hooksPath सेट करता है, और मौजूदा hooks फिर भी पहले चलते हैं। non-interactive रूप में आप preset और जोड़े जाने वाले agents चुन सकते हैं।

bashbash
npm install -g sphinx-understand
sphinx install

# or non-interactive
sphinx install --yes --preset claude-economy --agents claude

Repository सेट अप करें

sphinx init .sphinxconfig, .sphinxignore और .sphinxcontext.md लिखता है। पहली जाँच से पहले ignore फ़ाइल में ज़रूरी बदलाव कर लें, और policy साझा करने के लिए तीनों फ़ाइलों को commit करें।

bashbash
cd your-repo
sphinx init --yes --branches main

Setup जाँचें और push करें

doctor इंस्टॉल की जाँच करता है। इसके बाद protected branch पर push करने पर understanding check खुल जाता है।

bashbash
sphinx doctor
git push origin main

Checks हाथ से चलाएँ या बंद करें

terminal में staged commits की जाँच करें, हर check के लिए model calls की सीमा तय करें, या दर्ज किए गए वैकल्पिक कारण के साथ किसी repository के लिए checks चालू या बंद करें।

bashbash
sphinx check --staged
sphinx config --max-model-calls 30
sphinx yolo --reason "prod hotfix"

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • जब coding agents आपके ज़्यादातर changes लिखते हों और आप main तक पहुँचने से पहले हर change को समझना चाहते हों, तब इसे इस्तेमाल करें
  • जब आपको ऐसा reviewer चाहिए जो केवल diff पर टिप्पणी न करे, बल्कि retries और खोए हुए responses जैसे failure modes की आपकी समझ की जाँच करे, तब इसे इस्तेमाल करें
  • जब आप बिना hosted service के, अपनी मौजूदा Claude Code या Codex subscription के साथ एक हल्का, local अभ्यास gate चाहते हों, तब इसे इस्तेमाल करें

How Sphinx compares

Sphinx alongside other open-source ai code review & security tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
Open Code Review★ 57.9kAlibaba का code-review CLI, जो review प्रक्रिया को deterministic engineering से तय रखता है और सिर्फ़ judgement calls LLM agent पर छोड़ता है
Bend★ 26.1kएक कंपाइल होने वाली भाषा जिसका टाइप चेकर ही प्रूफ़ चेकर भी है, इसलिए AI का कोई बदलाव तभी बिल्ड होता है जब वह साबित करे कि आपके घोषित नियम अब भी सही हैं
Codex Security★ 14.5kकिसी codebase में सुरक्षा कमज़ोरियाँ (vulnerabilities) खोजने, उनकी पुष्टि (validate) करने और उन्हें ठीक करने के लिए OpenAI का CLI और TypeScript SDK
Whiteboard★ 3.6kएक ओपन सोर्स कैनवास, जहाँ कोडिंग एजेंट अपने बदलावों के डायग्राम बनाते हैं, ताकि लोग diff देखने से पहले डिज़ाइन की समीक्षा कर सकें
git-lrc★ 1.5kgit commit से जुड़ने वाला एक Go CLI, जो हर staged diff को commit होने से पहले AI review से गुज़ारता है। इसमें browser review UI है और git log में review stats भी दिखते हैं।
Sphinx★ 511एक git hook जो protected branch पर push को तब तक रोकता है जब तक आप सही अनुमान न लगा लें कि agent द्वारा लिखा गया change क्या करता है
CodeRabbit—AI pull request reviewer that analyzes diffs with full-repo context to flag bugs, security issues, and quality problems, posting inline comments and one-click fixes.
Greptile—AI code review tool that indexes your whole codebase into a graph so a swarm of agents can catch multi-file logic bugs and security risks in every PR.