xerj-org/xerj
XERJ is the new way for AI to search data. Its autoindex capability activates agents to know your data without the token waste of grep and sed. One command indexes code, docs, logs and PDFs for search, RAG, security audits and agent memory, using 40x fewer tokens than grep. Elasticsearch compatible, so existing clients just work.
The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
Most complex files
- engine/crates/xerj-engine/src/aggs.rs2821 cx
- landing/playground/app.bundle.js1501 cx
- engine/crates/xerj-engine/src/fast_aggs.rs1262 cx
- engine/crates/xerj-query/src/parser.rs1202 cx
- engine/crates/xerj-autoindex/src/lib.rs1184 cx
- engine/crates/xerj-storage/src/index_store.rs845 cx
- xerj-ux/src/app.js729 cx
- engine/crates/xerj-storage/src/stored_codec.rs725 cx
- engine/crates/xerj-engine/src/painless.rs696 cx
- engine/crates/xerj-engine/src/memtable.rs675 cx
Dead code 28.69% unused · 91 findings
- landing/playground/app.bundle.jsunused-file
- xerj-ux/src/app.jsunused-file
- landing/playground/src/app.jsunused-file
- landing/playground/src/data/mock.jsunused-file
- xerj-ux/share/share.jsunused-file
- demo/usecases/doc-index/compare.mjsunused-file
- landing/charts.jsunused-file
- docs/design/second_brain_graph_wf.jsunused-file
- docs/design/second_brain_finish_wf.jsunused-file
- demo/usecases/doc-index/grep-baseline.mjsunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 5 generated files: .github/scripts/prev_tag.sh, engine/crates/xerj-engine/src/secret_hash.rs, landing/chart-data.js, landing/playground/src/data/feedback-citations.js, xerj-ux/src/data/feedback-citations.js.
Largest clones in the code
- 342 lines in 2 placesjavascript3,050 tokens
10import { esc, fmt } from './text.js'; 11 12const minMax = (xs) => { 13 let mn = Infinity, mx = -Infinity; 14 for (const x of xs) { if (x < mn) mn = x; if (x > mx) mx = x; } 15 return [mn === Infinity ? 0 : mn, mx === -Infinity ? 0 : mx]; 16}; 17 18// Andrew's monotone chain — O(n log n) convex hull. 19function convexHull(points) {First 10 of 342 lines.
- 343 lines in 2 placesjavascript2,597 tokens
14import { Num, fmt } from './text.js'; 15import { Spark, Series, Dist, Heatmap, Multiples } from './charts.js'; 16import { VBar, Hist, Gauge, Scatter, Stacked, Treemap } from './charts-ext.js'; 17import { EmbedSpace, Ribbon3D, ChordArcs, ParallelCoords, AttentionMap, FlowBand } from './charts-ai.js'; 18import { Table, Markdown } from './tables.js'; 19import { TopN, Events } from './layout.js'; 20 21// ---------- demo data (deterministic) --------------------- 22const demoSeries = Array.from({ length: 48 }, (_, i) => 23 50 + Math.sin(i / 5.5) * 22 + Math.cos(i / 3.2) * 9 + ((i * 37) % 7)First 10 of 343 lines.
- 332 lines in 2 placesjavascript2,317 tokens
748const secA = e.target.closest('[data-section]'); 749if (secA) { 750 e.preventDefault(); 751 const sid = secA.getAttribute('data-section'); 752 if (sid === 'dashboards') { 753 location.hash = '#/dashboards'; 754 } else { 755 location.hash = '#/' + sid; 756 } 757 return;First 10 of 332 lines.
7 more
- 189 lines in 2 placesjavascript1,856 tokens
- 10 lines in 19 placesrust99 tokensengine/crates/xerj-autoindex/src/failure_resume_http_tests.rs:1150–1159engine/crates/xerj-autoindex/src/failure_resume_http_tests.rs:1215–1224engine/crates/xerj-autoindex/src/failure_resume_http_tests.rs:1235–1244engine/crates/xerj-autoindex/src/failure_resume_http_tests.rs:1289–1298engine/crates/xerj-autoindex/src/failure_resume_http_tests.rs:1342–1351and 14 more
- 179 lines in 2 placesjavascript1,751 tokens
- 205 lines in 2 placesjavascript1,616 tokens
- 143 lines in 2 placesjavascript1,561 tokens
- 7 lines in 20 placesrust76 tokensengine/crates/xerj-autoindex/src/incremental_reconcile_http_tests.rs:1261–1267engine/crates/xerj-autoindex/src/incremental_reconcile_http_tests.rs:1318–1324engine/crates/xerj-autoindex/src/incremental_reconcile_http_tests.rs:1346–1352engine/crates/xerj-autoindex/src/incremental_reconcile_http_tests.rs:1384–1390engine/crates/xerj-autoindex/src/incremental_reconcile_http_tests.rs:1473–1479and 15 more
- 171 lines in 2 placesjavascript1,414 tokens
Largest clones over all files, tests and data included
- 80 lines in 25 placesmarkupdocs and examples2,353 tokenslanding/docs/aggregations.html:392–471landing/docs/analyzers.html:318–397landing/docs/api-es-compat.html:421–500landing/docs/cli.html:397–476landing/docs/clustering.html:391–470and 20 more
392 <span><a href="/">HOME</a> · <a href="/product">PRODUCT</a> · <a href="/brand">BRAND</a> · <a href="/playground">DASHBOARDS</a> · <a href="/llms.txt">… 393</footer> 394 395<script type="application/json" id="docs-index">[{"title":"Corpus Hub","slug":"/docs/corpus-hub","kicker":"CORPUS HUB","snip":"Registry of corpora for agents —… 396 397<script> 398 // IIFE — js-auth navigates between decrypted pages in the same 399 // JS realm, so const bindings must be lexically scoped. 400 (function () { 401 const root = document.documentElement;First 10 of 80 lines.
- 33 lines in 83 placesmarkupmarkup675 tokenslanding/answers/agent-memory-without-postgres-qdrant.html:124–156landing/answers/audit-php-codebase-with-an-index.html:124–156landing/answers/autoindex-dataset-refused-by-server.html:124–156landing/answers/autoindex-exit-codes.html:124–156landing/answers/autoindex-says-extract-the-archive-first.html:124–156and 78 more
124<a href="/case-studies">CASE STUDIES</a> 125<a href="/benchmarks/">BENCHMARKS</a> 126<span class="spacer"></span> 127<a href="/for-agents">FOR AGENTS</a> 128<a href="/docs/" class="active">DOCS</a> 129<a href="/docs/recipes/">RECIPES</a> 130<a href="/playground">DASHBOARDS</a> 131<a href="https://hub.xerj.org" rel="external">HUB</a> 132<a href="https://github.com/xerj-org/xerj" rel="external">GITHUB</a> 133<a href="https://x.com/xerj_org" rel="external" title="XERJ on X" style="display:inline-flex;align-items:center"><svg width="15" height="15" viewBox="0 0 24 24…First 10 of 33 lines.
- 8893 lines in 2 placesjsondata files35,383 tokensbenchmarks/decide-model/pinned/tokenizer.json:1–8893benchmarks/decide-model/published/xerj-decide-v1/tokenizer.json:1–8893
1{ 2 "version": "1.0", 3 "truncation": { 4 "direction": "Right", 5 "max_length": 512, 6 "strategy": "LongestFirst", 7 "stride": 0 8 }, 9 "padding": null, 10 "added_tokens": [First 10 of 8893 lines.
- 15 lines in 2 placesmarkupmarkup33,689 tokens
- 138 lines in 3 placesmarkupdocs and examples16,579 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| rust | 317 | 336,731 | 1,257 | 12,372 | 3.67% |
| javascript | 105 | 28,796 | 106 | 5,843 | 20.29% |
| python | 96 | 22,879 | 32 | 273 | 1.19% |
| bash | 50 | 6,805 | 9 | 96 | 1.41% |
| perl | 1 | 168 | 0 | 0 | 0% |
| powershell | 1 | 158 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| markup | 202 | 86,377 | 2,553 | 60,364 | 69.88% |
| rust | 551 | 431,625 | 2,178 | 23,623 | 5.47% |
| yaml | 325 | 59,913 | 595 | 12,360 | 20.63% |
| log | 34 | 9,522 | 320 | 6,140 | 64.48% |
| markdown | 702 | 131,703 | 292 | 13,404 | 10.18% |
| javascript | 156 | 48,787 | 287 | 8,096 | 16.59% |
| json | 269 | 108,868 | 219 | 14,663 | 13.47% |
| text | 216 | 10,528 | 125 | 3,797 | 36.07% |
| python | 187 | 37,552 | 76 | 1,297 | 3.45% |
| css | 7 | 7,310 | 67 | 1,978 | 27.06% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Oct 16, 2026 | #3 | 5,902 (+715) | 3,046 | 964,097 | 6,781 | 15.18% | 4.7% | D 40.2 | 4556557 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.