Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/clyrisai/gitresolve/llms.txt

Use this file to discover all available pages before exploring further.

The GitResolve programmatic API gives you direct access to every stage of the resolution pipeline — input classification, portfolio scraping, resume parsing, owner disambiguation, and browser provider management — so you can integrate candidate profile extraction into any Node.js application. While the CLI is ideal for one-off or shell-based workflows, the library API is designed for systems that need to process multiple candidates concurrently, persist results, or compose custom pipelines.

Installation

npm install @clyrisai/gitresolve
GitResolve requires Node.js 18 or later (native fetch and ReadableStream are used internally). For full JavaScript-rendered portfolio scraping you will also want a browser peer dependency:
# Option A — local headless Chrome
npm install puppeteer

# Option B — point at a running Browserless instance (no extra npm dep)
export BROWSERLESS_URL=http://localhost:3000

Canonical integration pattern

The most common production pattern combines createProvider, scrapePortfolio, and parseResume. Always call provider.cleanup() in a finally block so browser processes are never left dangling.
import {
  createProvider,
  scrapePortfolio,
  parseResume,
} from '@clyrisai/gitresolve';

const provider = await createProvider(); // auto-detects best available

try {
  const [portfolioResult, resumeResult] = await Promise.all([
    scrapePortfolio('https://janedoe.dev', provider),
    parseResume('./resumes/janedoe.pdf'),
  ]);

  console.log('Portfolio owner:', portfolioResult.ownerProfile?.username);
  console.log('Confidence:',     portfolioResult.confidence);
  console.log('Owned repos:',    portfolioResult.ownedRepos.length);

  console.log('Resume owner:',   resumeResult.ownerProfile?.username);
  console.log('Warnings:',       resumeResult.warnings);
} finally {
  await provider.cleanup();
}
Neither scrapePortfolio nor parseResume ever throws. Any failure is captured in result.error so a try/finally around cleanup() is sufficient — you do not need a catch block for the resolution functions themselves.

Export reference

All public exports are grouped below. Click any category to jump to the dedicated reference page.

Classifier

ExportKindDescription
classifyInputfunctionCategorise any string as a repo URL, git profile, portfolio, resume file, etc.
parseRepoUrlfunctionFully parse a GitHub / GitLab / Bitbucket repo URL into structured data
parseGitLinkfunctionClassify a raw git-provider URL as profile, repo, gist, PR, or issue
extractGitUrlsFromTextfunctionRegex-extract all git provider URLs from a block of plain text
isGitProviderUrlfunctionBoolean check — is this URL on a supported git host?
GIT_HOSTSconstantMap of recognised hostnames to GitProvider values

Portfolio Scraper

ExportKindDescription
scrapePortfolioasync functionFetch a portfolio page and return a full ResolverResult
extractLinksFromHtmlfunctionPull all href values and git URLs out of raw HTML

Resume Parser

ExportKindDescription
parseResumeasync functionParse a local PDF resume and return a full ResolverResult

Disambiguator

ExportKindDescription
resolveOwnerAndCategorizefunctionDetermine the candidate owner from a list of ExtractedGitLink objects
dedupeProfilesByUsernamefunctionRemove duplicate profile links with the same username (case-insensitive)

Browser providers

ExportKindDescription
createProviderasync functionAuto-detect or explicitly select a BrowserProvider
FetchProviderclassPlain fetch-based provider, always available
PuppeteerProviderclassFull headless Chrome via Puppeteer
BrowserlessProviderclassFull JS rendering via a Browserless REST endpoint
BrowserProviderinterfaceThe common contract every provider implements
BrowserProviderOptionsinterfacetimeout and waitUntil options passed to getPageContent
ProviderNametype'puppeteer' | 'browserless' | 'fetch'

Types

ExportKindDescription
InputTypetypeUnion of possible input classifications
GitProvidertype'github' | 'gitlab' | 'bitbucket'
GitLinkTypetypeUnion of link classifications (profile, repo, gist, PR, issue, other)
ParsedRepointerfaceStructured data from a parsed repo URL
ExtractedGitLinkinterfaceA single classified git URL with username, repo, and type
ResolverResultinterfaceComplete resolution output for one source

API pages

Classifier

classifyInput, parseRepoUrl, parseGitLink, extractGitUrlsFromText, isGitProviderUrl, and GIT_HOSTS

Portfolio Scraper

scrapePortfolio and extractLinksFromHtml

Resume Parser

parseResume — dual-method PDF extraction with unpdf

Disambiguator

resolveOwnerAndCategorize and dedupeProfilesByUsername

createProvider

Browser provider factory, all three provider classes, and the BrowserProvider interface

Types

Complete TypeScript type reference for every exported interface and union type

Build docs developers (and LLMs) love