{% extends "base.html" %} {% block title %}Add {{ source_type }} source β€” LynxManager{% endblock %} {% block content %}
← Back to source types
{% if source_type == "codebase" %}

πŸ“‚ Add a codebase source

Indexes a folder of source code so your AI client can search it semantically. Each chunk is one syntactic unit (function, class, doc paragraph). The file watcher reindexes on save so results stay fresh. With git integration on, Lynx can also do diff-aware searches (search_diff) β€” useful during code review when you want to find everything related to your current changes.

{% elif source_type == "webdoc" %}

🌐 Add a web-docs source

Crawls a public documentation site and stores it locally. After the initial crawl (triggered by lynx build --source <name>), searches are 100% offline. The crawl is depth-limited and same-origin by default so you don't accidentally index half the web. Re-run build manually whenever you want a refresh β€” there's no automatic re-crawl.

{% elif source_type == "pdf" %}

πŸ“„ Add a PDF source

Points at a folder of PDFs. Lynx extracts the text layer page by page and indexes one chunk per page; AI clients cite results as document.pdf p.42. Scanned PDFs (no text layer) and password-protected files are skipped automatically. The watcher is OFF by default since re-extracting a folder of PDFs is costly β€” trigger refreshes manually via lynx build --source <name>.

{% endif %}
Used as the MCP tool suffix: e.g. search_<name>. Letters, digits, underscores; must start with a letter. Max 40 chars.
{% if source_type == "codebase" or source_type == "pdf" %}
{% if source_type == "codebase" %} {% endif %}
Absolute path is recommended. Use Browse to pick visually β€” that avoids typos that send Lynx to a non-existent folder. {% if source_type == "codebase" %} Detect scans the folder and pre-fills the extension list + flags whether this is a git repo. {% endif %}
{% endif %} {% if source_type == "codebase" %}
Comma-separated. Use Detect above to fill from the actual files in your folder.
Advanced: knowledge graph layer
{% endif %} {% if source_type == "webdoc" %}
Start URL for the crawl. Should be as specific as possible β€” e.g. /reference/ not the homepage β€” so the crawler doesn't waste time on landing pages, blog posts, etc.
How many link-hops from the start URL. 3 is fine for most docs sites.
Hard cap. Crawler stops as soon as it hits this number.
Advanced: URL filters and rate limiting
URLs must contain one of these to be crawled. Leave empty = everything matches.
URLs matching any of these are skipped. Useful to dodge changelogs / blogs.
Pause between HTTP requests. Be polite β€” 0.5s is a good default.
{% endif %} {% if source_type == "pdf" %}
Advanced: extractor & file limits
"auto" is almost always what you want. Pymupdf is AGPL-licensed so it's opt-in.
PDFs above this size are skipped (extraction would take minutes).
Default **/*.pdf matches any .pdf at any depth.
{% endif %}
Cancel
{% if source_type == "codebase" or source_type == "pdf" %} {# --------------------------------------------------------------------------- Folder browser modal β€” server-rendered tree via /api/fs/browse. Hidden by default; opened by the "Browse..." button next to the path input. --------------------------------------------------------------------------- #} {% endif %} {% endblock %}