Sourcegull GitHub
Apache-2.0 · no paid tier, ever

Find code across thousands of repositories in milliseconds

Self-hosted code search and code intelligence for GitLab, GitHub and Gitea, written in Rust. For you and your agents.

Typing the query lang:rust serde::Deserialize; 119 results from axum, serde and tokio arrive in a few milliseconds
5–70×fewer tokens for an agent than cloning and grepping: 5× on a question about one repository, 70× for references to a common name across about 1,400 repositories 3 min 21 sto make 1,007 repositories (5.2 GB of source) searchable, cloning included, on 6 CPUs 84 msmedian regex search across all 1,007 of them
1Rust binary; PostgreSQL is the only dependency

Features

Everything a code search platform needs. All of it free.

No enterprise edition, no licence key. The features other products sell separately are in the same Apache-2.0 repository.

Search that keeps up

Literal, regexp, keyword (BM25) and structural search over a trigram index of its own. After a push, only changed paths are re-indexed, so new commits are searchable within seconds. Any branch, tag or commit that isn't indexed is searched straight from git. Results stream as they're found.

  • regexp
  • BM25
  • structural
  • any revision
  • search jobs → CSV

Precise code navigation

Go to definition, find references and implementations from SCIP indexes, across repositories and package versions. Search-based results fill in where there's no index.

Built for AI agents

A built-in MCP server lets coding agents search, read files, jump to definitions and read history, with the caller's permissions, in output sized for a model's context.

SSO, SCIM, RBAC, audit

OAuth, OpenID Connect or an auth proxy; SCIM provisioning; roles; an audit log. Repository permissions are synced from the code host and enforced on every read.

Bulk changes

One YAML spec changes many repositories, then opens and tracks the GitLab merge requests.

Trends and watches

Chart how code changes over time, such as how many files still use a deprecated API, and get notified when new commits match a search.

Every code host at once

gitlab.com, self-managed GitLab, GitHub and Gitea side by side; one search covers them all, each with its own permissions.

Code intelligence

From a search hit to every caller in two clicks

Hover any symbol for its signature and docs. Definitions and references open in a panel below the code, across every repository the index knows about.

Code navigation in tokio: the hover card for asyncify, and its definition and 55 references in the panel below

AI agents

Your agents read the answer, not the repository

Connected over MCP, an agent reads only the lines that answer its question: 5× to 70× fewer tokens than cloning and grepping. Any agent that speaks MCP can connect with just the server URL and a sign-in or access token, and every tool runs with that user's repository permissions.

Operations

Ready for production

Few moving partsOne binary and PostgreSQL 16+. Nothing else to run, back up or upgrade.
Scales outRepository storage spreads across repo nodes, added or removed without downtime.
No telemetryNothing is sent to a vendor cloud. Usage analytics stay on the instance.
ObservableGrafana dashboards and Prometheus alerts included.
Configuration as codeSign-in, code hosts and admins from files in git; secrets from the environment.
Tested upgradesEvery release is tested by upgrading from the previous one.

Install

Running in about a minute

one host
curl -fsSL https://github.com/sourcegull/sourcegull/releases/latest/download/sourcegull-compose.tar.gz | tar -xz
cd sourcegull-compose
echo "POSTGRES_PASSWORD=$(openssl rand -hex 24)" > .env
docker compose up -d

Open http://localhost:7080. The first user to sign up becomes the site admin; add a code host under Site admin → Code host connections.

Installing for production

Docker Compose guide One host: the production layout with one container per role, upgrades, backups and monitoring. Read the guide → Kubernetes (Helm) guide Larger installs and several repo nodes: size presets, an external PostgreSQL and every chart value. Read the guide →

Free for good.

Sourcegull is Apache-2.0. There is no paid tier, and there will not be one.

Star on GitHub Read the docs