Skillpedia
برمجة عامة260k · #553

gitnexus-explorer

ما الذي تفعله

تحوّل هذه المهارة بنية مشروع برمجي إلى خريطة قابلة للنقر، وتقدمها في صفحة ويب. وهي للمطورين الذين يريدون رؤية كيفية ترابط شيفرتهم ومشاركة هذه الرؤية مع الآخرين.

متى تستخدمها

  • ✓عندما تريد استكشاف بنية شيفرة برمجية بطريقة مرئية.
  • ✓عندما تريد رسم اعتماديات أو رسمًا معرفيًا لمستودع.
  • ✓عندما تريد مشاركة مستكشف تفاعلي لمستودع مع شخص آخر.

رابط المهارة

https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/research/gitnexus-explorer/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/research/gitnexus-explorer/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“ابنِ لي خريطة مرئية لبنية كود مشروعي، وأعطني رابطًا أشاركه مع فريقي.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تفهرس المهارة الشيفرة في رسم بياني، وتبني تطبيق GitNexus الويب وتشغّله، ثم توصله عبر نفق Cloudflare ليصبح قابلًا للفتح عن بُعد.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

GitNexus Explorer

Index any codebase into a knowledge graph and serve an interactive web UI for exploring symbols, call chains, clusters, and execution flows. Tunneled via Cloudflare for remote access.

When to Use

  • User wants to visually explore a codebase's architecture
  • User asks for a knowledge graph / dependency graph of a repo
  • User wants to share an interactive codebase explorer with someone

Prerequisites

  • Node.js (v18+) — required for GitNexus and the proxy
  • git — repo must have a .git directory
  • cloudflared — for tunneling (auto-installed to ~/.local/bin if missing)

Size Warning

The web UI renders all nodes in the browser. Repos under ~5,000 files work well. Large repos (30k+ nodes) will be sluggish or crash the browser tab. The CLI/MCP tools work at any scale — only the web visualization has this limit.

Steps

1. Clone and Build GitNexus (one-time setup)

GITNEXUS_DIR="${GITNEXUS_DIR:-$HOME/.local/share/gitnexus}"

if [ ! -d "$GITNEXUS_DIR/gitnexus-web/dist" ]; then
  git clone https://github.com/abhigyanpatwari/GitNexus.git "$GITNEXUS_DIR"
  cd "$GITNEXUS_DIR/gitnexus-shared" && npm install && npm run build
  cd "$GITNEXUS_DIR/gitnexus-web" && npm install
fi

2. Patch the Web UI for Remote Access

The web UI defaults to localhost:4747 for API calls. Patch it to use same-origin so it works through a tunnel/proxy:

File: $GITNEXUS_DIR/gitnexus-web/src/config/ui-constants.ts Change:

export const DEFAULT_BACKEND_URL = 'http://localhost:4747';

To:

export const DEFAULT_BACKEND_URL = typeof window !== 'undefined' && window.location.hostname !== 'localhost' ? window.location.origin : 'http://localhost:4747';

File: $GITNEXUS_DIR/gitnexus-web/vite.config.ts Add allowedHosts: true inside the server: { } block (only needed if running dev mode instead of production build):

server: {
    allowedHosts: true,
    // ... existing config
},

Then build the production bundle:

cd "$GITNEXUS_DIR/gitnexus-web" && npx vite build

3. Index the Target Repo

cd /path/to/target-repo
npx gitnexus analyze --skip-agents-md
rm -rf .claude/    # remove Claude Code-specific artifacts

Add --embeddings for semantic search (slower — minutes instead of seconds).

The index lives in .gitnexus/ inside the repo (auto-gitignored).

4. Create the Proxy Script

Write this to a file (e.g., $GITNEXUS_DIR/proxy.mjs). It serves the production web UI and proxies /api/* to the GitNexus backend — same origin, no CORS issues, no sudo, no nginx.

import http from 'node:http';
import fs from 'node:fs';
import path from 'node:path';

const API_PORT = parseInt(process.env.API_PORT || '4747');
const DIST_DIR = process.argv[2] || './dist';
const PORT = parseInt(process.argv[3] || '8888');

const MIME = {
  '.html': 'text/html', '.js': 'application/javascript', '.css': 'text/css',
  '.json': 'application/json', '.png': 'image/png', '.svg': 'image/svg+xml',
  '.ico': 'image/x-icon', '.woff2': 'font/woff2', '.woff': 'font/woff',
  '.wasm': 'application/wasm',
};

function proxyToApi(req, res) {
  const opts = {
    hostname: '127.0.0.1', port: API_PORT,
    path: req.url, method: req.method, headers: req.headers,
  };
  const proxy = http.request(opts, (upstream) => {
    res.writeHead(upstream.statusCode, upstream.headers);
    upstream.pipe(res, { end: true });
  });
  proxy.on('error', () => { res.writeHead(502); res.end('Backend unavailable'); });
  req.pipe(proxy, { end: true });
}

function serveStatic(req, res) {
  let filePath = path.join(DIST_DIR, req.url === '/' ? 'index.html' : req.url.split('?')[0]);
  if (!fs.existsSync(filePath)) filePath = path.join(DIST_DIR, 'index.html');
  const ext = path.extname(filePath);
  const mime = MIME[ext] || 'application/octet-stream';
  try {
    const data = fs.readFileSync(filePath);
    res.writeHead(200, { 'Content-Type': mime, 'Cache-Control': 'public, max-age=3600' });
    res.end(data);
  } catch { res.writeHead(404); res.end('Not found'); }
}

http.createServer((req, res) => {
  if (req.url.startsWith('/api')) proxyToApi(req, res);
  else serveStatic(req, res);
}).listen(PORT, () => console.log(`GitNexus proxy on http://localhost:${PORT}`));

5. Start the Services

# Terminal 1: GitNexus backend API
npx gitnexus serve &

# Terminal 2: Proxy (web UI + API on one port)
node "$GITNEXUS_DIR/proxy.mjs" "$GITNEXUS_D
الأسئلة الشائعة

ما حجم المشروع الذي تستطيع معالجته؟

تقول المهارة إن المستودعات التي تقل عن نحو 5000 ملف تعمل بشكل جيد، وقد تكون المستودعات الأكبر بطيئة أو تتسبب في تعطل المتصفح.

ماذا أحتاج إلى تثبيته؟

تحتاج إلى Node.js الإصدار 18 أو أحدث، وgit، وcloudflared، وتثبّته المهارة إن كان مفقودًا.

هل صفحة الويب خاصة؟

تُعدّ المهارة نفقًا للوصول عن بُعد، لذا قد يستطيع أي شخص يملك الرابط فتحها.

التفاصيل

الوصف الأصلي من المؤلف

Serve an interactive codebase knowledge graph web UI.

repo: NousResearch/hermes-agent

الشعبية

نجوم GitHub
260k
الترتيب
#553
الترخيص
MIT
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة