Connection methods
OAuth
Recommended for most users. Authorizes through GitHub’s standard OAuth flow in a few clicks.
Personal Access Token
For self-hosted deployments, CI environments, or anywhere an OAuth app isn’t practical.
OAuth (recommended)
Authorize on GitHub
You’ll be redirected to GitHub’s authorization page. Grant access to the repositories you want to index.
| Scope | Why Waterline needs it |
|---|---|
repo | Read access to code, commits, and pull requests — including private repos |
read:user | Read your GitHub username |
user:email | Read your email address |
Personal Access Token
PAT support is available for self-hosted deployments where an OAuth app isn’t practical — for example, CI environments or local development.Create a token
Go to github.com/settings/tokens and create a new token. Grant the same scopes:
repo, read:user, and user:email.Webhook setup
When you connect a repository, Waterline automatically registers a webhook on GitHub pointing to:push events. Each push triggers an incremental re-index of only the files that changed — your index stays current without a full repository crawl.
For webhooks to work, your Waterline API must be reachable from GitHub’s servers. During local development, use a tunnel like ngrok to expose your local server, then set
API_BASE_URL in your .env to the tunnel URL.What gets indexed
Waterline processes every source file in the repository up to the configured limits. What’s extracted per symbol:- Name, file path, and line range
- LLM-generated semantic summary
- Embedding vector for semantic search
- Binary files
- Lock files (
package-lock.json,yarn.lock,Pipfile.lock) node_modules/,.git/, and build artifact directories
| Limit | Default | Environment variable |
|---|---|---|
| Max files per repository | 2,000 | REPO_MAX_FILES |
| Max symbols per repository | 15,000 | REPO_MAX_SYMBOLS |
.env file if your repository is large.
Incremental sync
Every push webhook triggers a targeted sync pipeline — only changed files are re-processed, regardless of repository size:Re-index changed files
For each changed file, Waterline re-extracts symbols, regenerates LLM summaries, and updates the search index.
Re-index dependents
Files that import any changed symbol are re-indexed too (one hop of dependency traversal).
Self-hosted OAuth app setup
If you’re running Waterline yourself, create a GitHub OAuth app at github.com/settings/developers:| Field | Value |
|---|---|
| Application name | Waterline (or your organization’s name) |
| Homepage URL | https://your-domain.com |
| Authorization callback URL | https://your-api.com/api/connect/github/callback |
.env: