Index git commits, issues, and file changes for any repository. Outputs CSV files that can be queried with DuckDB.
# Run directly with bunx
bunx @laris/origin-indexer
# Or install globally
bun install -g @laris/origin-indexer# Index current repository
origin-indexer .
# Index with CSV output (DuckDB-friendly)
origin-indexer /path/to/repo --csv
# Include GitHub issues
origin-indexer . --issues --csv
# JSON output
origin-indexer . --jsonWhen using --csv, the following files are created:
| File | Description |
|---|---|
commits.csv |
All commits with stats |
daily.csv |
Aggregated daily stats |
files.csv |
File changes per commit |
issues.csv |
GitHub issues (if --issues) |
-- Top 10 largest commits
SELECT shortHash, date, message, insertions
FROM 'commits.csv'
ORDER BY insertions DESC
LIMIT 10;
-- Daily activity chart
SELECT date, commits, insertions, deletions
FROM 'daily.csv'
ORDER BY date;
-- Most frequently changed files
SELECT fileName, COUNT(*) as changes
FROM 'files.csv'
GROUP BY fileName
ORDER BY changes DESC
LIMIT 20;
-- Find CLAUDE.md evolution
SELECT date, shortHash, message
FROM 'files.csv'
WHERE fileName LIKE '%CLAUDE.md%'
ORDER BY date;
-- File type breakdown
SELECT fileExtension, COUNT(*) as count
FROM 'files.csv'
GROUP BY fileExtension
ORDER BY count DESC;import { indexRepo } from "@laris/origin-indexer";
const result = await indexRepo("/path/to/repo", {
fetchIssues: true,
});
console.log(result.stats);
// {
// totalCommits: 467,
// totalIssues: 91,
// totalFiles: 1955,
// totalInsertions: 388707,
// totalDeletions: 70602,
// netChange: 318105,
// }This tool was created to index the Oracle origin projects:
uniserv-nft-erc721(Project 001) - NFT smart contractsliff-carbon-offset-app(Project 002) - LINE LIFF app
Together these projects represent 467 commits, 91 issues, and 318,105 net lines of code - the birthplace of the Oracle Philosophy.
MIT