English
Get started

← All templates · AI and agents

Deploy GitNexus in one click

Index a code repository into a knowledge graph and explore it, or let an agent query it over MCP

A self-hosted alternative to DeepWiki.

What is GitNexus?

GitNexus is a source-available code intelligence engine, an alternative to DeepWiki that indexes a codebase into a knowledge graph instead of writing documentation about it. It reads a GitHub, GitLab or Azure DevOps URL or an uploaded folder, and traces imports, calls, inheritance and execution flows across 16 languages. In the browser, each file, class and function is a node to click, search or ask Nexus AI about. Coding agents such as Claude Code and Cursor query the same graph over MCP.

Self-hosting it keeps your source and its indexes on your own server, where your browser and every agent you connect read the same index. GitNexus suits anyone facing a large, unfamiliar codebase, or whose agent edits functions without seeing their callers: its impact tool lists what depends on a symbol before the change. The catch is the license, which allows noncommercial use only.

Hosting GitNexus on Pethost

  1. You sign in to Pethost with a passkey, GitHub or Google. No machine yet? You pick a plan, and the link waits until it is ready.
  2. New project opens at GitNexus, and you click Create project.
  3. In a minute or two GitNexus is live at its own address with HTTPS. Its secrets are made at random, and its data is in the nightly backup.
  4. It is a project like any other: you or your agent can change it, roll it back or restore it.

Questions about GitNexus

Is GitNexus open source?

Not in the usual sense. Its code is public under the PolyForm Noncommercial 1.0.0 license, which allows personal and other noncommercial use; commercial use needs a license from Akon Labs, the company behind GitNexus.

GitNexus vs DeepWiki: what is the difference?

DeepWiki is a hosted service that generates documentation and diagrams for a repository. GitNexus builds a graph of the code's symbols and how they connect, runs on your own server, and lets agents check what a change affects.

How do I connect GitNexus to Claude Code or Cursor?

On Pethost, add it as a remote MCP server at your app's address plus /api/mcp, with the header Authorization: Bearer followed by the TOKEN from the project's .env. The agent then gets tools such as query, context and impact.

Can GitNexus index private repositories?

Yes. With a GitHub URL, add a Personal Access Token with the repo scope or the fine-grained Contents read permission; the token is sent once and not stored. Private code from elsewhere can be uploaded as a folder.

Does GitNexus need an OpenAI API key?

Only for the Nexus AI chat, which uses your own key for OpenAI, Anthropic, Gemini, OpenRouter, DeepSeek, Ollama or another supported provider. Indexing, the graph, search and the MCP tools need no key.

How much memory and disk does GitNexus need?

GitNexus is light: about 100 MB at rest, and indexing a large repository takes a gigabyte or so for a while. On Pethost the Starter plan is enough for it, with room for other apps beside it.

GitNexus Docker Compose file

The template is this compose.yaml and the variables written into the project’s .env as it is created. Pethost runs the file as it is written.

Containers: web (ghcr.io/abhigyanpatwari/gitnexus-web:1.6.12), server (ghcr.io/abhigyanpatwari/gitnexus:1.6.12).

Volumes, in the nightly backup: data.

services:
  # The UI, and the one way in: it forwards /api to the server only with the token.
  web:
    image: ghcr.io/abhigyanpatwari/gitnexus-web:1.6.12
    restart: unless-stopped
    environment:
      GITNEXUS_BACKEND_URL: ${URL}
      GITNEXUS_UPSTREAM_URL: http://server:4747
      GITNEXUS_SERVE_AUTH_TOKEN: ${TOKEN}
      GITNEXUS_PROXY_TRUST_XFF: 1
    depends_on:
      - server

  # Indexes repositories into a knowledge graph; it has no address of its own.
  server:
    image: ghcr.io/abhigyanpatwari/gitnexus:1.6.12
    restart: unless-stopped
    environment:
      GITNEXUS_TRUST_PROXY: 1
    # The registry, the indexes and the cloned repositories.
    volumes:
      - data:/data/gitnexus

volumes:
  data:

More in AI and agents