NNiaHelp Center

Guide

Index Github Repo

Overview

Nia is a Search & Index API designed to help you index and explore GitHub repositories, codebases, and documentation. By indexing a repository, you unlock semantic search capabilities across the codebase, enabling you to find implementation patterns, understand architecture, and answer code-related questions without manually reviewing files. This workflow walks you through the dashboard-based indexing process. Note: the UI indexing path (described here) works reliably for both public and private repositories. If you need programmatic/API-based indexing for private repos, be aware that the API endpoint currently has a known limitation; the dashboard UI is the recommended method for private repository indexing.

Before you begin

  • A Trynia account (create one at app.trynia.ai if needed)
  • GitHub App installed in your organization or personal account — this avoids GitHub API rate limits and enables private repository access. If not yet installed, Trynia will prompt you to install it during onboarding.
  • The GitHub repository URL or owner/repo slug (e.g., facebook/react or github.com/owner/repo)

Step by step

1
ClickExplore

Navigate to the Explore section by clicking the Explore link in the top navigation. This is where you can browse, manage, and index repositories.

Step 1
2
ClickINDEX

Click the INDEX button to open the repository indexing dialog. This launches the interface for adding a new repository to your workspace.

Step 2
3
Clickowner/repo or github.com/owner/repo

Click into the repository input field labeled 'owner/repo or github.com/owner/repo' to focus it and prepare for text entry.

Step 3
4
Typeowner/repo or github.com/owner/repo

Type the GitHub repository identifier in the format owner/repo (e.g., facebook/react) or as a full GitHub URL (github.com/owner/repo). Trynia accepts both formats.

Tip. For public repositories, use the simple owner/repo format. For private repositories, ensure your GitHub App is installed with access to the repository.
5
ClickStart

Click the Start button to initiate validation of the repository URL and proceed to the filtering options.

Step 5
6
ClickFilter...

Click into the Filter input field to add optional filtering criteria. Filters allow you to exclude or include specific file patterns, branches, or paths during indexing.

Tip. Filters are optional. Common use cases include excluding test directories, node_modules, or large binary files to speed up indexing and reduce noise in search results.
Step 6
7
TypeFilter...

Type your filter expression in the Filter field. This may use glob patterns (e.g., **/*.test.js to exclude tests) or other filter syntax supported by Trynia.

Tip. Check Trynia documentation for the exact filter syntax supported. Multiple filters can often be applied by separating them with commas or using advanced filter grammar.
8
ClickINDEX SOURCE

Click the INDEX SOURCE button to finalize your configuration and begin the indexing process. This submits the repository and filters to Trynia's indexing service.

Warning. Once initiated, the indexing job cannot be paused through the UI. Large repositories may take considerable time to complete. Check the Activity section to monitor progress.
Step 8
9
Clickowner/repo or github.com/owner/repo

Click into the repository input field again (in case you need to add another repository or verify the entry). This step may occur if you're adding multiple repositories or if the workflow requires re-entry.

Step 9
10
Typeowner/repo or github.com/owner/repo

Type the repository identifier again if entering a second or alternative repository, using the same owner/repo or github.com/owner/repo format.

11
ClickStart

Click the Start button to validate and proceed with the second repository, if applicable.

Step 11
12
Clickowner/repo or github.com/owner/repo

Click into the repository input field to focus it for potential editing or correction of the repository name.

Step 12
13
Clickowner/repo or github.com/owner/repo

Click into the repository input field again to ensure focus, allowing you to select and manipulate the text if needed.

Step 13
14
Clickowner/repo or github.com/owner/repo

Click into the repository input field once more to prepare for text selection or editing operations.

Step 14
15
Keyboard

Press Cmd+C to copy the currently selected or highlighted text in the repository field. This is useful if you need to preserve the repository name for use elsewhere.

Step 15
16
Keyboard

Press Cmd+C again to copy the text (repeated action, possibly to ensure the clipboard contains the correct value).

Step 16
17
Keyboard

Press Cmd+C once more to copy the text (third repetition, may indicate double-checking or clipboard verification).

Step 17
18
Keyboard

Press Cmd+C to copy the text a fourth time (additional verification or clipboard operation).

Step 18
19
Typeowner/repo or github.com/owner/repo

Type a new or corrected repository identifier into the input field, replacing any previous content. This may be used if you're switching to a different repository or correcting a typo.

20
Keyboard

Press Cmd+X to cut the text in the repository field, removing it and placing it on the clipboard. Use this if you need to clear the field and move its content elsewhere.

Step 20
21
Typeowner/repo or github.com/owner/repo

Type a repository identifier into the input field (entering new text after a cut operation or from scratch).

22
Keyboard

Press Cmd+V to paste the content from the clipboard into the repository field. This completes a cut-and-paste operation if you copied a repository name earlier.

Step 22
23
Clickowner/repo or github.com/owner/repo

Click into the repository input field to focus it, readying the field for text entry or selection.

Step 23
24
Clickowner/repo or github.com/owner/repo

Click into the repository input field again to ensure it has focus before performing any text operations.

Step 24
25
Typeowner/repo or github.com/owner/repo

Type the final or corrected repository identifier into the field (e.g., owner/repo).

26
Keyboard

Press Enter to submit the repository identifier. This confirms the entry and may proceed to the next stage of indexing configuration.

Step 26
27
ClickStart

Click the Start button to validate and proceed with the indexing workflow. This confirms your repository selection and moves forward to filtering or final submission.

Step 27
28
ClickBrowzer Home KNOWLEDGE Vaults OVERVIEW Overview Activity Explore Contexts PLAYGROUND Research Search Documents Datasets API API Keys Docs BILLING Billing SETTINGS Organization Integrations Answer Model Local Sync Context Transfer Referral Discord Fee

Click on the main page body or background area (which contains the navigation menu: Home, Knowledge, Vaults, Overview, Activity, Explore, Contexts, Playground, Research, Search, Documents, Datasets, API, Settings, Billing, etc.). This may dismiss a dialog or reset focus.

Step 28
29
ClickBrowzer Home KNOWLEDGE Vaults OVERVIEW Overview Activity Explore Contexts PLAYGROUND Research Search Documents Datasets API API Keys Docs BILLING Billing SETTINGS Organization Integrations Answer Model Local Sync Context Transfer Referral Discord Fee

Click on the page body again to dismiss any open dialogs or to deselect focused elements and return to the main view.

Step 29
30
Clickowner/repo or github.com/owner/repo

Click into the repository input field to re-focus it, in case you need to make additional entries or corrections.

Step 30
31
Clickowner/repo or github.com/owner/repo

Click into the repository input field again to ensure focus before typing or editing the repository name.

Step 31
32
Clickowner/repo or github.com/owner/repo

Click into the repository input field once more to prepare for text entry or selection.

Step 32
33
Typeowner/repo or github.com/owner/repo

Type a repository identifier into the field (potentially a different repository or a corrected name).

34
ClickClose

Click the Close button to dismiss the indexing dialog or any open modal. This exits the current indexing workflow without submitting, or confirms the completion of the indexing job.

Step 34
35
ClickFilter...

Click into the Filter input field to add or modify filtering criteria for the repository indexing.

Step 35
36
ClickFilter...

Click into the Filter field again to re-focus it, ensuring the field is active before typing filter expressions.

Step 36
37
ClickFilter...

Click into the Filter field once more to confirm focus and prepare for filter text entry.

Step 37
38
TypeFilter...

Type your filter expression into the Filter field to exclude or include specific file patterns, directories, or branches during indexing.

Tip. Common filters include patterns like **/*.md (to include only markdown) or **/*.test.js (to exclude tests). Consult Trynia's documentation for the complete filter syntax.

Confirm it worked

  1. 1After clicking Start, the indexing job begins — you should see a confirmation or status message indicating that indexing has been initiated
  2. 2Navigate to the Explore section and search for your repository — it should appear in the indexed sources list
  3. 3Once indexing completes (this may take minutes to hours depending on repository size), you can run semantic searches across the codebase and retrieve code snippets, file trees, and search results

Common issues

Keep reading

API Guide - Nia AI Documentation

### Index a Repository [...] ```bash curl -X POST https://apigcp.trynia.ai/v2/sources \ -H "Authorization: Bearer $NIA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"type": "repository", "repository": "vercel/ai"}' [...] ```bash curl -X POST https://apigcp.trynia.ai/v2/sandbox/search \ [...] _KEY" [...] -d [...] "repository": [...] ://github. [...] /ai", "ref": "main", "query": "How does [...] Text relate to the data [...] protocol?" }' [...] structured output, citations) | [...] | `POST /extract [...] structured data from [...] | | `POST /oracle/jobs` | Start [...] Oracle research job | | `POST /github/tracer` | Live GitHub code search agent | | `POST /packages/search` | Semantic search in package source code | | `POST /packages/grep` | Regex search in package source code | | `POST /contexts` | Save cross-agent conversation context | | `GET /sources-summary` | Quick inventory of all source types | | `GET /usage` | API usage statistics and limits |

docs.trynia.ai

Examples - Nia AI Documentation

## Repository Operations [...] ### Index a Repository [...] ```python from nia_py import AuthenticatedClient from nia_py.api.v2_api import index_repository_v2_v2_repositories_post from nia_py.models import RepositoryRequest [...] client = AuthenticatedClient( base_url="https://apigcp.trynia.ai/v2", token=os.environ["NIA_API_KEY"], ) [...] result = index_repository_v2_v2_repositories_post.sync( client=client, body=RepositoryRequest(repository="vercel/ai", branch="main"), ) [...] print(f"Indexing started: {result}") [...] Or with the high-level SDK: [...] ```python sdk.sources.create({"url": "https://github.com/vercel/ai", "branch": "main"}) [...] result = await [...] 2ApiRepositories [...] .indexRepositoryV [...] RepositoriesPost({ repository: "vercel/ [...] ", branch: "main [...] with the high [...] ```typescript await sdk.sources.create({ url: "https://github.com/vercel/ai", branch: "main" }); [...] ## GitHub Tracer

docs.trynia.ai