-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
635 lines (557 loc) · 17.8 KB
/
index.html
File metadata and controls
635 lines (557 loc) · 17.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Srclight — Deep code indexing for AI agents</title>
<meta name="description" content="SQLite FTS5 + tree-sitter + embeddings + MCP. Fully offline deep code indexing for AI coding agents.">
<!-- Open Graph -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://srclight.dev/">
<meta property="og:title" content="Srclight — Deep code indexing for AI agents">
<meta property="og:description" content="SQLite FTS5 + tree-sitter + embeddings + MCP. Fully offline deep code indexing for AI coding agents.">
<meta property="og:image" content="https://srclight.dev/social-preview-1280x640.png">
<meta property="og:image:width" content="1280">
<meta property="og:image:height" content="640">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Srclight — Deep code indexing for AI agents">
<meta name="twitter:description" content="SQLite FTS5 + tree-sitter + embeddings + MCP. Fully offline deep code indexing for AI coding agents.">
<meta name="twitter:image" content="https://srclight.dev/social-preview-1280x640.png">
<!-- Favicon -->
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<style>
*,
*::before,
*::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--bg: #0a0a0f;
--bg-card: #12121a;
--bg-card-hover: #1a1a25;
--amber: #f59e0b;
--amber-light: #fbbf24;
--amber-dim: rgba(245, 158, 11, 0.15);
--text: #e4e4e7;
--text-dim: #9ca3af;
--border: #1e1e2a;
--mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', 'Liberation Mono', monospace;
--sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Helvetica, Arial, sans-serif;
}
html {
font-size: 16px;
scroll-behavior: smooth;
}
body {
font-family: var(--sans);
background: var(--bg);
color: var(--text);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* -- Layout -- */
.container {
max-width: 960px;
margin: 0 auto;
padding: 0 24px;
}
/* -- Header -- */
header {
padding: 24px 0;
border-bottom: 1px solid var(--border);
}
.header-inner {
display: flex;
align-items: center;
justify-content: space-between;
}
.wordmark {
font-family: var(--mono);
font-size: 1.5rem;
font-weight: 700;
text-decoration: none;
letter-spacing: -0.02em;
}
.wordmark .src {
color: var(--amber);
}
.wordmark .light {
color: #fff;
}
.header-links {
display: flex;
gap: 24px;
align-items: center;
}
.header-links a {
color: var(--text-dim);
text-decoration: none;
font-size: 0.9rem;
transition: color 0.15s;
}
.header-links a:hover {
color: var(--amber);
}
/* -- Hero -- */
.hero {
padding: 80px 0 64px;
text-align: center;
}
.hero-logo {
width: 120px;
height: 120px;
margin: 0 auto 32px;
}
.hero h1 {
font-family: var(--mono);
font-size: 3rem;
font-weight: 700;
letter-spacing: -0.03em;
margin-bottom: 16px;
}
.hero h1 .src {
color: var(--amber);
}
.hero h1 .light {
color: #fff;
}
.hero .tagline {
font-size: 1.35rem;
color: var(--text-dim);
margin-bottom: 12px;
font-weight: 400;
}
.hero .stack {
font-family: var(--mono);
font-size: 0.9rem;
color: var(--amber);
opacity: 0.8;
margin-bottom: 40px;
}
/* -- Install block -- */
.install {
display: inline-flex;
align-items: center;
gap: 12px;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 8px;
padding: 14px 24px;
font-family: var(--mono);
font-size: 1rem;
color: var(--text);
margin-bottom: 24px;
cursor: default;
user-select: all;
}
.install .prompt {
color: var(--amber);
user-select: none;
}
.install:hover {
border-color: var(--amber);
}
.hero-actions {
display: flex;
gap: 16px;
justify-content: center;
margin-top: 24px;
}
.btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 12px 24px;
border-radius: 8px;
text-decoration: none;
font-size: 0.95rem;
font-weight: 500;
transition: all 0.15s;
}
.btn-primary {
background: var(--amber);
color: #0a0a0f;
}
.btn-primary:hover {
background: var(--amber-light);
}
.btn-secondary {
background: transparent;
color: var(--text);
border: 1px solid var(--border);
}
.btn-secondary:hover {
border-color: var(--amber);
color: var(--amber);
}
/* -- Features -- */
.features {
padding: 64px 0;
}
.features h2 {
text-align: center;
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 40px;
color: #fff;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}
.feature-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 10px;
padding: 24px;
transition: border-color 0.15s, background 0.15s;
}
.feature-card:hover {
border-color: rgba(245, 158, 11, 0.3);
background: var(--bg-card-hover);
}
.feature-card .icon {
font-size: 1.5rem;
margin-bottom: 12px;
display: block;
}
.feature-card h3 {
font-size: 1rem;
font-weight: 600;
color: #fff;
margin-bottom: 8px;
}
.feature-card p {
font-size: 0.875rem;
color: var(--text-dim);
line-height: 1.5;
}
/* -- Stats bar -- */
.stats {
padding: 32px 0;
border-top: 1px solid var(--border);
border-bottom: 1px solid var(--border);
}
.stats-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 24px;
text-align: center;
}
.stat-value {
font-family: var(--mono);
font-size: 2rem;
font-weight: 700;
color: var(--amber);
}
.stat-label {
font-size: 0.85rem;
color: var(--text-dim);
margin-top: 4px;
}
/* -- How it works -- */
.how {
padding: 64px 0;
}
.how h2 {
text-align: center;
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 40px;
color: #fff;
}
.steps {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 32px;
}
.step {
text-align: center;
}
.step-number {
display: inline-flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--amber-dim);
color: var(--amber);
font-family: var(--mono);
font-weight: 700;
font-size: 1.1rem;
margin-bottom: 16px;
}
.step h3 {
font-size: 1rem;
font-weight: 600;
color: #fff;
margin-bottom: 8px;
}
.step code {
display: block;
font-family: var(--mono);
font-size: 0.8rem;
color: var(--amber);
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 6px;
padding: 10px 14px;
margin-top: 12px;
text-align: left;
white-space: pre;
}
.step p {
font-size: 0.875rem;
color: var(--text-dim);
}
/* -- Footer -- */
footer {
padding: 32px 0;
border-top: 1px solid var(--border);
text-align: center;
}
.footer-links {
display: flex;
gap: 24px;
justify-content: center;
margin-bottom: 16px;
}
.footer-links a {
color: var(--text-dim);
text-decoration: none;
font-size: 0.85rem;
transition: color 0.15s;
}
.footer-links a:hover {
color: var(--amber);
}
.footer-copy {
font-size: 0.8rem;
color: var(--text-dim);
opacity: 0.6;
}
/* -- Responsive -- */
@media (max-width: 768px) {
.hero {
padding: 48px 0 40px;
}
.hero h1 {
font-size: 2.2rem;
}
.hero .tagline {
font-size: 1.1rem;
}
.feature-grid {
grid-template-columns: 1fr;
}
.stats-grid {
grid-template-columns: repeat(2, 1fr);
gap: 20px;
}
.steps {
grid-template-columns: 1fr;
gap: 24px;
}
.hero-actions {
flex-direction: column;
align-items: center;
}
.install {
font-size: 0.85rem;
padding: 12px 18px;
}
.header-links {
gap: 16px;
}
}
@media (max-width: 480px) {
.hero h1 {
font-size: 1.8rem;
}
.stats-grid {
grid-template-columns: 1fr 1fr;
}
}
</style>
</head>
<body>
<!-- Header -->
<header>
<div class="container header-inner">
<a href="/" class="wordmark"><span class="src">src</span><span class="light">light</span></a>
<nav class="header-links">
<a href="https://github.com/srclight/srclight">GitHub</a>
<a href="https://pypi.org/project/srclight/">PyPI</a>
</nav>
</div>
</header>
<!-- Hero -->
<section class="hero">
<div class="container">
<div class="hero-logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="120" height="120">
<defs>
<radialGradient id="glow" cx="50%" cy="42%" r="50%">
<stop offset="0%" stop-color="#fffef5"/>
<stop offset="30%" stop-color="#fef3c7" stop-opacity="0.9"/>
<stop offset="70%" stop-color="#fde68a" stop-opacity="0.5"/>
<stop offset="100%" stop-color="#fbbf24" stop-opacity="0"/>
</radialGradient>
<radialGradient id="halo" cx="50%" cy="42%" r="55%">
<stop offset="0%" stop-color="#fbbf24" stop-opacity="0.25"/>
<stop offset="100%" stop-color="#fbbf24" stop-opacity="0"/>
</radialGradient>
<linearGradient id="codeGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#fbbf24"/>
<stop offset="100%" stop-color="#f59e0b"/>
</linearGradient>
</defs>
<ellipse cx="256" cy="210" rx="220" ry="220" fill="url(#halo)"/>
<ellipse cx="256" cy="210" rx="170" ry="170" fill="url(#glow)"/>
<path d="M256,48 C168,48 100,120 100,208 C100,272 140,310 172,352 L172,380 L340,380 L340,352 C372,310 412,272 412,208 C412,120 344,48 256,48Z" fill="rgba(255,251,235,0.12)" stroke="#c8cad0" stroke-width="16" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M220,280 Q238,240 256,280 Q274,240 292,280" fill="none" stroke="#fbbf24" stroke-width="5" opacity="0.5"/>
<text x="175" y="248" font-family="'SF Mono','Fira Code','Cascadia Code','Consolas',monospace" font-size="120" font-weight="700" fill="url(#codeGrad)" text-anchor="middle"><</text>
<text x="337" y="248" font-family="'SF Mono','Fira Code','Cascadia Code','Consolas',monospace" font-size="120" font-weight="700" fill="url(#codeGrad)" text-anchor="middle">></text>
<g stroke="#fbbf24" stroke-width="6" stroke-linecap="round" opacity="0.75">
<line x1="256" y1="28" x2="256" y2="2"/>
<line x1="165" y1="55" x2="150" y2="32"/>
<line x1="347" y1="55" x2="362" y2="32"/>
<line x1="110" y1="115" x2="90" y2="100"/>
<line x1="402" y1="115" x2="422" y2="100"/>
</g>
<rect x="184" y="384" width="144" height="16" rx="6" fill="#9ca3af"/>
<rect x="192" y="404" width="128" height="14" rx="5" fill="#9ca3af"/>
<rect x="200" y="422" width="112" height="14" rx="5" fill="#9ca3af"/>
<rect x="210" y="440" width="92" height="14" rx="7" fill="#9ca3af"/>
<line x1="188" y1="400" x2="324" y2="400" stroke="#6b7280" stroke-width="2" opacity="0.5"/>
<line x1="196" y1="418" x2="316" y2="418" stroke="#6b7280" stroke-width="2" opacity="0.5"/>
<line x1="204" y1="436" x2="308" y2="436" stroke="#6b7280" stroke-width="2" opacity="0.5"/>
</svg>
</div>
<h1><span class="src">src</span><span class="light">light</span></h1>
<p class="tagline">Deep code indexing for AI agents</p>
<p class="stack">SQLite FTS5 + tree-sitter + embeddings + MCP</p>
<div class="install">
<span class="prompt">$</span> pip install srclight
</div>
<div class="hero-actions">
<a href="https://github.com/srclight/srclight" class="btn btn-primary">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/></svg>
GitHub
</a>
<a href="https://pypi.org/project/srclight/" class="btn btn-secondary">
PyPI
</a>
</div>
</div>
</section>
<!-- Stats -->
<section class="stats">
<div class="container">
<div class="stats-grid">
<div>
<div class="stat-value">25</div>
<div class="stat-label">MCP tools</div>
</div>
<div>
<div class="stat-value">7</div>
<div class="stat-label">Languages</div>
</div>
<div>
<div class="stat-value">3</div>
<div class="stat-label">FTS5 indexes</div>
</div>
<div>
<div class="stat-value">1</div>
<div class="stat-label">SQLite file</div>
</div>
</div>
</div>
</section>
<!-- Features -->
<section class="features">
<div class="container">
<h2>Why Srclight</h2>
<div class="feature-grid">
<div class="feature-card">
<span class="icon" aria-hidden="true">📦</span>
<h3>Minimal dependencies</h3>
<p>Single SQLite file per repo. No external databases, no Docker, no cloud services. Just a .srclight/ directory alongside your code.</p>
</div>
<div class="feature-card">
<span class="icon" aria-hidden="true">🔒</span>
<h3>Fully offline</h3>
<p>Local embeddings via Ollama. Your code never leaves your machine. Works on air-gapped networks and private repos.</p>
</div>
<div class="feature-card">
<span class="icon" aria-hidden="true">🔍</span>
<h3>Hybrid search</h3>
<p>Keyword (FTS5 trigram + porter stemmer) fused with semantic embeddings via Reciprocal Rank Fusion. The best of both worlds.</p>
</div>
<div class="feature-card">
<span class="icon" aria-hidden="true">🌐</span>
<h3>Multi-repo workspaces</h3>
<p>ATTACH multiple SQLite databases and UNION across schemas. Query your entire codebase as one, with batch rotation for the 10-ATTACH limit.</p>
</div>
<div class="feature-card">
<span class="icon" aria-hidden="true">🌳</span>
<h3>Tree-sitter parsing</h3>
<p>Precise symbol extraction: functions, classes, methods, interfaces, structs. With call graph edges and type hierarchies.</p>
</div>
<div class="feature-card">
<span class="icon" aria-hidden="true">⚡</span>
<h3>GPU-accelerated</h3>
<p>Optional CuPy backend for GPU-resident vector cache. Sub-3ms semantic queries over tens of thousands of symbols.</p>
</div>
</div>
</div>
</section>
<!-- How it works -->
<section class="how">
<div class="container">
<h2>Get started in 60 seconds</h2>
<div class="steps">
<div class="step">
<div class="step-number">1</div>
<h3>Install</h3>
<p>One pip install. No compilation, no system deps beyond Python 3.10+.</p>
<code>pip install srclight</code>
</div>
<div class="step">
<div class="step-number">2</div>
<h3>Index</h3>
<p>Point at any repo. Tree-sitter parses symbols, FTS5 indexes everything, optionally generate embeddings.</p>
<code>srclight index /path/to/repo
srclight index --embed \
qwen3-embedding /path/to/repo</code>
</div>
<div class="step">
<div class="step-number">3</div>
<h3>Serve</h3>
<p>Start the MCP server. Connect from Claude Code, Cursor, Windsurf, or any MCP client.</p>
<code>srclight serve \
--workspace myworkspace</code>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer>
<div class="container">
<div class="footer-links">
<a href="https://github.com/srclight/srclight">GitHub</a>
<a href="https://pypi.org/project/srclight/">PyPI</a>
<a href="https://github.com/srclight/srclight/issues">Issues</a>
<a href="https://github.com/srclight/srclight/blob/master/LICENSE">MIT License</a>
</div>
<p class="footer-copy">Srclight is open source software.</p>
</div>
</footer>
</body>
</html>