diff --git a/install/worker.js b/install/worker.js index 80b0d34..f1b3251 100644 --- a/install/worker.js +++ b/install/worker.js @@ -1,5 +1,5 @@ const GITHUB_REPO = "justrach/codedb"; -const FALLBACK_VERSION = "0.2.52"; +const FALLBACK_VERSION = "0.2.53"; const INSTALL_SCRIPT_URL = `https://raw.githubusercontent.com/${GITHUB_REPO}/main/install/install.sh`; export default { diff --git a/socials/tweet.md b/socials/tweet.md new file mode 100644 index 0000000..ceaab77 --- /dev/null +++ b/socials/tweet.md @@ -0,0 +1,74 @@ +# codedb launch tweets + +Best times to post (PST): Tue-Thu, 8-10 AM +Best times to post (SGT): Tue-Thu, 11 PM - 1 AM + +--- + +Tweet 1 (Hook) + +I built a code intelligence server in Zig that gives AI agents 469x faster queries than grep/find — and uses 92x fewer tokens. + +0.2ms lookups. 3.9ms symbol search. Indexes once, then every query hits memory. No filesystem scans. No raw text dumps. +--- + +Tweet 2 (The problem) + +Every time an AI agent runs grep or find on your codebase, it pays the full cost. + +Filesystem scan. Raw text dump. Thousands of tokens for a simple lookup. + +grep a symbol across 7k files: 763ms, 7.7KB response. +codedb: 3.9ms, 4.4KB. Same answer. 200x faster. Half the bytes. + +--- + +Tweet 3 (The numbers) + +Benchmarked on openclaw (7,364 files, 128MB): + +Word lookup: 0.2ms vs 65ms. 325x. +Symbol find: 3.9ms vs 763ms. 200x. +Reverse deps: 1.3ms vs 750ms. 469x. +Deps response: 162 bytes vs 15KB. 92x less data. + +Cold start: 2.9 seconds for 7,364 files. Then sub-millisecond everything. + +--- + +Tweet 4 (What you get) + +16 MCP tools. Not 5, not 8. Sixteen. + +tree, outline, symbol, search, word, hot, deps, read, edit, changes, status, snapshot, bundle, remote, projects, index. + +codedb_remote queries any GitHub repo without cloning. +codedb_bundle batches multiple queries in one call. +codedb_index indexes any local folder on demand. + +Pure Zig. Single binary. Zero dependencies. + +--- + +Tweet 5 (CTA) + +One command. Auto-registers in Claude Code, Codex, Gemini CLI, and Cursor. + +curl -fsSL https://codedb.codegraff.com/install.sh | sh + +BSD-3 licensed. Open source. + +https://codedb.codegraff.com +github.com/justrach/codedb + +--- + +Alt: Single tweet + +I built a code intelligence server in Zig that gives AI agents 469x faster queries and sends 92x fewer bytes than grep/find. + +16 MCP tools. Zero deps. 2.9s to index 7k files. Sub-millisecond everything after. + +Works with Claude Code, Codex, Gemini CLI, Cursor. One command install. + +curl -fsSL https://codedb.codegraff.com/install.sh | sh diff --git a/socials/tweet3.md b/socials/tweet3.md new file mode 100644 index 0000000..ae221af --- /dev/null +++ b/socials/tweet3.md @@ -0,0 +1,120 @@ +# codedb v0.2.52 update tweets + +Best times to post (PST): Tue-Thu, 8-10 AM +Best times to post (SGT): Tue-Thu, 11 PM - 1 AM + +--- + +Tweet 1 (Hook) + +codedb v0.2.52 just dropped. + +538x faster than ripgrep. 569x faster than rtk. 1,231x faster than grep. + +0.065ms code search. Pre-built trigram index. Query once, instant forever. + +21 issues closed. 14 PRs merged. 7 contributors. One weekend. + +--- + +Tweet 2 (The numbers) + +Benchmarked on rtk-ai/rtk (329 files): + +codedb search: 0.065ms +rtk: 37ms +ripgrep: 45ms +grep: 80ms + +codedb word lookup: 0.013ms. That's 13 microseconds. For an exact match across 329 files. + +First index: 126ms. Then sub-millisecond everything. Forever. + +--- + +Tweet 3 (What changed) + +36% faster indexing. 59% less CPU. 47% less memory. + +Integer doc IDs replaced string HashMaps in the trigram index. Batch-accumulate per file. Skip whitespace trigrams. Sorted merge intersection with zero allocations. + +481ms → 310ms indexing on 5,200 files. Dense queries 63% faster. Pure Zig. No magic. + +--- + +Tweet 4 (Security) + +Also shipped a full security audit this release. + +Blocked .env and credentials from MCP read/edit tools. +Fixed SSRF in codedb_remote. +Added SHA256 checksum verification to the installer. +Telemetry hardened — argv-based curl, no shell injection. + +macOS binary is now codesigned AND notarized. First time. + +--- + +Tweet 5 (Memory) + +Your MCP server was eating 2.5GB on a 5k file repo. + +Now it releases file contents after indexing. Zero-copy ContentRef for search — borrows from cache, reads from disk when evicted. + +447MB → 234MB at 40k files. -47%. + +Large repos (>1000 files) auto-release. Small repos keep everything in RAM. No config needed. + +--- + +Tweet 6 (Fixes) + +Python deps finally work. +TypeScript block comments don't produce ghost symbols. +Triple-quote docstrings don't fool the parser. +Linux installer doesn't choke on Dash. +MCP idle timeout is 2 minutes, not 30. +Duplicate MCP servers get detected. +Exit crash from double thread join — fixed. + +21 bugs. 14 PRs. Zero regressions. + +--- + +Tweet 7 (CTA) + +Update now: + +curl -fsSL https://codedb.codegraff.com/install.sh | bash + +Or just run: codedb update + +macOS (codesigned + notarized) and Linux x86_64. +SHA256 checksums included. +Auto-registers in Claude Code, Codex, Gemini CLI, Cursor. + +codedb.codegraff.com/update + +--- + +Alt: Single tweet + +codedb v0.2.52: 538x faster than ripgrep on code search. + +36% faster indexing. 47% less memory. Full security audit. Python/TS parser fixes. macOS notarized. + +21 issues closed by 7 contributors in one session. + +curl -fsSL https://codedb.codegraff.com/install.sh | bash + +--- + +Alt: Thread opener (punchy) + +538x faster than ripgrep. +569x faster than rtk. +1,231x faster than grep. + +codedb doesn't scan your files. It already knows. 0.065ms. + +Thread on what we shipped in v0.2.52 👇 diff --git a/src/main.zig b/src/main.zig index d138754..be48888 100644 --- a/src/main.zig +++ b/src/main.zig @@ -87,7 +87,7 @@ fn mainImpl() !void { // Handle --version early (no root needed) if (std.mem.eql(u8, cmd, "--version") or std.mem.eql(u8, cmd, "-v") or std.mem.eql(u8, cmd, "version")) { - out.p("codedb 0.2.52\n", .{}); + out.p("codedb 0.2.53\n", .{}); return; } diff --git a/src/telemetry.zig b/src/telemetry.zig index f9bd5cd..791b2d9 100644 --- a/src/telemetry.zig +++ b/src/telemetry.zig @@ -5,7 +5,7 @@ const index = @import("index.zig"); const RING_SIZE = 256; const CLOUD_URL = "https://codedb.codegraff.com/telemetry/ingest"; -const VERSION = "0.2.52"; +const VERSION = "0.2.53"; const PLATFORM = std.fmt.comptimePrint("{s}-{s}", .{ @tagName(builtin.os.tag), @tagName(builtin.cpu.arch) }); pub const Event = struct { diff --git a/website/app/update.zig b/website/app/update.zig new file mode 100644 index 0000000..e4fc550 --- /dev/null +++ b/website/app/update.zig @@ -0,0 +1,243 @@ +const mer = @import("mer"); + +pub const meta: mer.Meta = .{ + .title = "What's New in v0.2.52", + .description = "36% faster indexing, 59% less CPU, 47% less memory, 21 issues closed.", +}; + +pub const prerender = true; + +pub fn render(req: mer.Request) mer.Response { + _ = req; + return .{ + .status = .ok, + .content_type = .html, + .body = html, + }; +} + +const html = + \\ + \\ + \\ + \\ + \\ + \\ What's New — codedb v0.2.52 + \\ + \\ + \\ + \\ + \\ + \\ + \\ + \\ + \\
+ \\
+ \\
+ \\ 538x faster
code search. + \\
+ \\
codedb vs ripgrep vs grep on rtk-ai/rtk  ·  36% faster indexing  ·  21 issues closed  ·  7 contributors
+ \\
+ \\
+ \\
Index time
+ \\
310ms
+ \\
was 481ms (-36%)
+ \\
+ \\
+ \\
CPU usage
+ \\
59%
+ \\
less user CPU
+ \\
+ \\
+ \\
Memory
+ \\
47%
+ \\
less at 40k files
+ \\
+ \\
+ \\
Dense search
+ \\
63%
+ \\
faster queries
+ \\
+ \\
+ \\
+ \\
+ \\ + \\ + \\
+ \\
+ \\
Performance
+ \\
Before & after on 5,200 files
+ \\
+ \\
+ \\

Indexing time (ms)

+ \\ + \\
+ \\
+ \\

Peak memory (MB)

+ \\ + \\
+ \\
+ \\
+ \\
+ \\

Search latency — dense query (µs)

+ \\ + \\
+ \\
+ \\

CPU time — user (ms)

+ \\ + \\
+ \\
+ \\
+ \\
+ \\ + \\
+ \\
+ \\
Real-world benchmark
+ \\
codedb vs rtk vs ripgrep vs grep
+ \\

Searching for “agent” across 329 files. rtk is a Rust-based code search tool. codedb uses a pre-built trigram index for sub-millisecond queries after a one-time 126ms index.

+ \\
+ \\
+ \\

Search latency (ms, log scale)

+ \\ + \\
+ \\
+ \\

Speedup vs codedb

+ \\ + \\
+ \\
+ \\

codedb keeps a pre-built trigram index in memory. Other tools scan from disk on every query. Apple M4 Pro, macOS, codedb v0.2.52, rtk 0.1.0, ripgrep 15.1, GNU grep. 5 runs, median.

+ \\
+ \\
+ \\ + \\ + \\
+ \\
+ \\
Changelog
+ \\
What changed
+ \\
+ \\
security

Sensitive file blocking

codedb_read and codedb_edit now block .env, credentials, keys, .pem files via MCP tools.

+ \\
security

SSRF fix + checksum verification

codedb_remote validated against whitelist. Installer now verifies SHA256 checksums after download.

+ \\
performance

Integer doc IDs

Trigram postings use u32 doc IDs instead of string HashMaps. Sorted merge intersection with zero allocations.

+ \\
performance

Batch-accumulate trigrams

Local HashMap per file, bulk-insert to global index. Skip whitespace-only trigrams (12% of occurrences).

+ \\
performance

Memory optimization

Release file contents after indexing. Zero-copy ContentRef for search. 47% less memory at 40k files.

+ \\
fix

Python & TypeScript parsers

Triple-quote docstrings, block comments, import alias handling. Fixed dependency matching for Python imports.

+ \\
fix

MCP reliability

2-minute idle timeout. Singleton PID lock. Fixed crash on exit (duplicate thread join). Linux /bin/bash update.

+ \\
docs

16 MCP tools documented

Added codedb_bundle, codedb_remote, codedb_projects, codedb_index. CLI commands table in README.

+ \\
+ \\
+ \\
+ \\ + \\ + \\
+ \\
+ \\
Update now
+ \\
curl -fsSL https://codedb.codegraff.com/install.sh | bash
+ \\

macOS Apple Silicon (codesigned + notarized) · Linux x86_64 · SHA256 checksums

+ \\
+ \\ Thanks to @whygee-dev · + \\ @unliftedq · + \\ @riccardodm97 · + \\ @dezren39 · + \\ @sanderdewijs · + \\ @burningportra · + \\ @kenrick-g + \\
+ \\
+ \\
+ \\ + \\ + \\ + \\ + \\ + \\ + \\ +; diff --git a/website/src/generated/routes.zig b/website/src/generated/routes.zig index 22ea26b..025cbce 100644 --- a/website/src/generated/routes.zig +++ b/website/src/generated/routes.zig @@ -6,7 +6,7 @@ const app_privacy = @import("app/privacy"); const app_quickstart = @import("app/quickstart"); const app_install = @import("app/install"); const app_improvements = @import("app/improvements"); - +const app_update = @import("app/update"); pub const routes: []const Route = &.{ .{ .path = "/benchmarks", .render = app_benchmarks.render, .render_stream = if (@hasDecl(app_benchmarks, "renderStream")) app_benchmarks.renderStream else null, .meta = if (@hasDecl(app_benchmarks, "meta")) app_benchmarks.meta else .{}, .prerender = if (@hasDecl(app_benchmarks, "prerender")) app_benchmarks.prerender else false }, .{ .path = "/", .render = app_index.render, .render_stream = if (@hasDecl(app_index, "renderStream")) app_index.renderStream else null, .meta = if (@hasDecl(app_index, "meta")) app_index.meta else .{}, .prerender = if (@hasDecl(app_index, "prerender")) app_index.prerender else false }, @@ -14,6 +14,7 @@ pub const routes: []const Route = &.{ .{ .path = "/quickstart", .render = app_quickstart.render, .render_stream = if (@hasDecl(app_quickstart, "renderStream")) app_quickstart.renderStream else null, .meta = if (@hasDecl(app_quickstart, "meta")) app_quickstart.meta else .{}, .prerender = if (@hasDecl(app_quickstart, "prerender")) app_quickstart.prerender else false }, .{ .path = "/install.sh", .render = app_install.render, .render_stream = null, .meta = .{}, .prerender = if (@hasDecl(app_install, "prerender")) app_install.prerender else false }, .{ .path = "/improvements", .render = app_improvements.render, .render_stream = if (@hasDecl(app_improvements, "renderStream")) app_improvements.renderStream else null, .meta = if (@hasDecl(app_improvements, "meta")) app_improvements.meta else .{}, .prerender = if (@hasDecl(app_improvements, "prerender")) app_improvements.prerender else false }, + .{ .path = "/update", .render = app_update.render, .render_stream = if (@hasDecl(app_update, "renderStream")) app_update.renderStream else null, .meta = if (@hasDecl(app_update, "meta")) app_update.meta else .{}, .prerender = if (@hasDecl(app_update, "prerender")) app_update.prerender else false }, }; const app_layout = @import("app/layout");