Skip to content

Commit 072d580

Browse files
KD-K2N2claude
andcommitted
Add launch script, deploy config, icons, newsletter draft
- scripts/launch.sh: one-shot publish + release script - packages/web/vercel.json + Dockerfile: deploy configs for cortex.sh - assets/icon.svg: app icon (purple gradient, white C, green dot) - packages/electron/assets/tray-icon.svg: menu bar icon - NEWSLETTER_ISSUE_3.md: full draft for launch announcement Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ae6d116 commit 072d580

6 files changed

Lines changed: 321 additions & 0 deletions

File tree

NEWSLETTER_ISSUE_3.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Issue #3 — Cortex: I Built Persistent Memory for Claude Code
2+
3+
## Subject line options:
4+
1. "I built the tool I wished existed for Claude Code"
5+
2. "Claude Code finally remembers (open source)"
6+
3. "Cortex: persistent memory for Claude Code — free for subscribers"
7+
8+
---
9+
10+
## Opening
11+
12+
Every morning, I open Claude Code and explain my architecture again. The same NestJS setup. The same TypeScript preferences. The same open threads from yesterday. It's like training a brilliant contractor who gets amnesia overnight.
13+
14+
Context windows are getting bigger. Models are getting smarter. But session memory? Still zero. You close a tab, the context dies. You switch machines, the context dies. You take a lunch break that runs long enough for the session to expire — the context dies. I got tired of re-explaining myself to the smartest coding tool I've ever used. So I built Cortex.
15+
16+
## What Cortex Does
17+
18+
- **Runs as a local daemon alongside Claude Code.** A lightweight background service that stays out of your way. No cloud dependency, no account signup, no telemetry.
19+
- **Captures decisions, preferences, and context as structured memories.** Every architecture decision, every "we tried X and it didn't work," every preference you have about code style — saved once, remembered forever.
20+
- **Injects relevant memories at session start via MCP.** When Claude Code starts, Cortex feeds it the memories that matter for your current project through the Model Context Protocol. Claude doesn't just know your codebase — it knows your thinking.
21+
- **Optional multi-machine sync via Turso.** Work on your desktop at the office and your laptop at the coffee shop. Same memories, same context, same continuity. You own the database.
22+
23+
## The Demo
24+
25+
Here's what happens now: I open Claude Code on my MacBook Air — a machine I haven't used in a week. I type "morning, let's continue." Claude responds with full context: the Fastify migration decision, the Deepgram latency thread, the deployment blockers. No re-explaining. No context dump. It just knows.
26+
27+
The first time this happened, I sat there for a few seconds staring at the terminal. It felt like the machine finally respected my time. That's the magic moment — not a feature demo, not a benchmark. Just the feeling that your tools actually work *with* you instead of making you repeat yourself.
28+
29+
## Install (subscriber exclusive)
30+
31+
```bash
32+
npx @cortex-memory/cli init
33+
```
34+
35+
One command. 30 seconds. That's it.
36+
37+
It detects your shell, creates the config directory, starts the daemon, and registers the MCP server with Claude Code. You'll see a confirmation in your terminal and you're done. Next time you open Claude Code, Cortex is there.
38+
39+
## What's Inside
40+
41+
This isn't a weekend hack. Cortex is a production-grade tool with real engineering behind it:
42+
43+
- **30+ CLI commands** — full CRUD for memories, sessions, threads, config, and sync
44+
- **Web dashboard at localhost:7434** — browse, search, and manage memories visually
45+
- **VS Code extension** — save memories from your editor without leaving your flow
46+
- **Native SwiftUI Mac app** — menubar access with quick-capture and status
47+
- **Session summarizer** — AI reviews completed sessions and extracts key decisions automatically
48+
- **Quality gate** — 6 rules prevent garbage memories from polluting your context (duplicate detection, minimum content length, relevance scoring)
49+
- **85+ tests, 7 docs, MIT licensed** — this is open source you can actually trust in your stack
50+
51+
## Architecture for the Curious
52+
53+
For those who want to know what's under the hood:
54+
55+
- **TypeScript monorepo** — 9 packages managed with pnpm workspaces. Shared types, shared validation, zero version drift.
56+
- **SQLite via better-sqlite3** — local-first storage. Your memories never leave your machine unless you opt into sync. No external database to provision.
57+
- **Fastify REST API + SSE** — the daemon exposes a clean API. Server-Sent Events for real-time updates to the dashboard and extensions.
58+
- **MCP protocol integration** — native support for Anthropic's Model Context Protocol. Cortex registers as a tool provider that Claude Code queries automatically.
59+
- **AES-256-GCM encrypted credentials** — sync tokens, API keys, anything sensitive is encrypted at rest. Not base64'd. Actually encrypted.
60+
- **Turso for multi-machine sync** — when you want memories to follow you across devices, Turso's embedded replicas give you local-speed reads with cloud sync. You provision the database, you own the data.
61+
62+
The entire system is designed around one principle: your context is yours. It lives on your machine, it's stored in a format you can inspect and export, and no part of the system phones home.
63+
64+
## Open Source
65+
66+
Full source: [github.com/ProductionLineHQ/cortex](https://github.com/ProductionLineHQ/cortex)
67+
68+
Star it, fork it, contribute. Good first issues are tagged and waiting. The codebase is well-documented — every package has a README, every public function has JSDoc, and the architecture doc explains why decisions were made, not just what they are.
69+
70+
## What's Next
71+
72+
- **v1.1: Semantic search with embeddings** — find memories by meaning, not just keywords. "What did we decide about authentication?" will surface the right memory even if you never used the word "auth."
73+
- **v1.2: Team memory sharing** — opt-in shared memory pools for teams. Onboard new engineers with the accumulated context of the entire project.
74+
- **v1.3: Custom memory rules** — define your own quality gates and auto-capture rules. "Always save architectural decisions." "Never save TODOs that are resolved within the same session."
75+
76+
---
77+
78+
## Closing
79+
80+
Cortex is the first tool from The Production Line — and it won't be the last. Every issue of this newsletter ships something real. Not theory. Not frameworks. Working tools that make your engineering workflow better.
81+
82+
If you use Claude Code, try Cortex. If you don't, forward this to someone who does. And if you build something cool with it — reply to this email. I read every one.
83+
84+
— Koundinya

assets/icon.svg

Lines changed: 11 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading

packages/web/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM node:22-slim
2+
WORKDIR /app
3+
COPY package.json pnpm-lock.yaml ./
4+
RUN corepack enable && pnpm install --frozen-lockfile
5+
COPY . .
6+
RUN pnpm build
7+
EXPOSE 3000
8+
CMD ["node", "dist/index.js"]

packages/web/vercel.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"buildCommand": "pnpm build",
3+
"outputDirectory": "dist",
4+
"framework": null,
5+
"rewrites": [
6+
{ "source": "/install.sh", "destination": "/api/install" },
7+
{ "source": "/api/(.*)", "destination": "/api/$1" },
8+
{ "source": "/(.*)", "destination": "/public/$1" }
9+
],
10+
"env": {
11+
"BEEHIIV_API_KEY": "@beehiiv-api-key",
12+
"BEEHIIV_PUBLICATION_ID": "@beehiiv-pub-id"
13+
}
14+
}

scripts/launch.sh

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
#!/bin/bash
2+
# ═══════════════════════════════════════════════════════
3+
# CORTEX LAUNCH SCRIPT
4+
# Run this once to publish everything and go live.
5+
# ═══════════════════════════════════════════════════════
6+
7+
set -e
8+
9+
GREEN='\033[0;32m'
10+
RED='\033[0;31m'
11+
YELLOW='\033[0;33m'
12+
DIM='\033[0;90m'
13+
NC='\033[0m'
14+
15+
pass() { echo -e "${GREEN}${NC} $1"; }
16+
fail() { echo -e "${RED}${NC} $1"; exit 1; }
17+
info() { echo -e "${DIM}·${NC} $1"; }
18+
warn() { echo -e "${YELLOW}${NC} $1"; }
19+
header() { echo -e "\n${YELLOW}═══ $1 ═══${NC}\n"; }
20+
21+
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
22+
cd "$REPO_ROOT"
23+
24+
echo ""
25+
echo " ╔═══════════════════════════════════════╗"
26+
echo " ║ CORTEX v1.0.0 — LAUNCH SCRIPT ║"
27+
echo " ╚═══════════════════════════════════════╝"
28+
echo ""
29+
30+
# ── Pre-flight checks ──
31+
header "PRE-FLIGHT CHECKS"
32+
33+
# Check npm login
34+
if npm whoami 2>/dev/null; then
35+
pass "npm: logged in as $(npm whoami)"
36+
else
37+
warn "npm: not logged in"
38+
echo " Run: npm login"
39+
echo " Then re-run this script."
40+
exit 1
41+
fi
42+
43+
# Check gh CLI
44+
if gh auth status 2>/dev/null | grep -q "Logged in"; then
45+
pass "GitHub CLI: authenticated"
46+
else
47+
warn "GitHub CLI: not authenticated"
48+
echo " Run: gh auth login"
49+
exit 1
50+
fi
51+
52+
# Check build
53+
header "BUILD"
54+
info "Building all packages..."
55+
pnpm install --no-frozen-lockfile 2>&1 | tail -1
56+
pnpm --filter @cortex/shared build 2>&1 | tail -1
57+
pnpm --filter @cortex/server build 2>&1 | tail -1
58+
pnpm --filter @cortex/cli build 2>&1 | tail -1
59+
pass "All packages built"
60+
61+
# ── Step 1: Publish to npm ──
62+
header "STEP 1: NPM PUBLISH"
63+
64+
info "Publishing @cortex-memory/shared..."
65+
cd packages/shared
66+
npm publish --access public 2>&1 | tail -3
67+
pass "@cortex-memory/shared published"
68+
cd "$REPO_ROOT"
69+
70+
info "Publishing @cortex-memory/server..."
71+
cd packages/server
72+
npm publish --access public 2>&1 | tail -3
73+
pass "@cortex-memory/server published"
74+
cd "$REPO_ROOT"
75+
76+
info "Publishing @cortex-memory/cli..."
77+
cd packages/cli
78+
npm publish --access public 2>&1 | tail -3
79+
pass "@cortex-memory/cli published"
80+
cd "$REPO_ROOT"
81+
82+
# ── Step 2: Verify npm install works ──
83+
header "STEP 2: VERIFY NPM INSTALL"
84+
info "Testing: npx @cortex-memory/cli --version"
85+
NPM_VERSION=$(npx --yes @cortex-memory/cli --version 2>/dev/null || echo "FAILED")
86+
if [ "$NPM_VERSION" = "FAILED" ]; then
87+
fail "npx install failed — check npm publish output above"
88+
else
89+
pass "npx works: v${NPM_VERSION}"
90+
fi
91+
92+
# ── Step 3: Compute Homebrew SHA ──
93+
header "STEP 3: HOMEBREW SHA"
94+
info "Downloading tarball from npm..."
95+
TARBALL_URL=$(npm view @cortex-memory/cli dist.tarball 2>/dev/null)
96+
if [ -n "$TARBALL_URL" ]; then
97+
curl -sO "$TARBALL_URL"
98+
TARBALL_FILE=$(basename "$TARBALL_URL")
99+
SHA=$(shasum -a 256 "$TARBALL_FILE" | cut -d' ' -f1)
100+
rm -f "$TARBALL_FILE"
101+
pass "SHA256: $SHA"
102+
103+
# Update formula
104+
sed -i '' "s/PLACEHOLDER_SHA256_COMPUTE_AFTER_NPM_PUBLISH/$SHA/" packages/installer/homebrew/cortex.rb
105+
pass "Homebrew formula updated with SHA256"
106+
else
107+
warn "Could not get tarball URL — update SHA manually later"
108+
fi
109+
110+
# ── Step 4: Create GitHub Release ──
111+
header "STEP 4: GITHUB RELEASE"
112+
info "Creating v1.0.0 release..."
113+
gh release create v1.0.0 \
114+
--repo ProductionLineHQ/cortex \
115+
--title "Cortex v1.0.0 — Persistent Memory for Claude Code" \
116+
--notes "$(cat <<'NOTES'
117+
## 🧠 Cortex v1.0.0
118+
119+
The first release of Cortex — persistent memory for Claude Code.
120+
121+
### Install
122+
123+
```bash
124+
npx @cortex-memory/cli init
125+
```
126+
127+
### What's included
128+
129+
- **MCP Server** — 7 tools for Claude Code integration
130+
- **CLI** — 30+ commands for memory management
131+
- **Dashboard** — Next.js web UI at localhost:7434
132+
- **VS Code Extension** — Save memories from your editor
133+
- **Native Mac App** — SwiftUI desktop application
134+
- **Electron App** — Cross-platform desktop wrapper
135+
- **Multi-machine Sync** — Turso-powered, you own the database
136+
- **Quality Gate** — 6-rule engine for memory quality
137+
- **Session Summarizer** — AI reviews what you missed
138+
- **85+ tests** across 15 test files
139+
140+
### Security
141+
142+
- AES-256-GCM encrypted credentials
143+
- Zod validation on all API inputs
144+
- Rate limiting (100/min global)
145+
- SQL injection protection
146+
- Localhost-only binding
147+
148+
### Docs
149+
150+
- [Architecture](docs/ARCHITECTURE.md)
151+
- [CLI Reference](docs/CLI.md)
152+
- [API Reference](docs/API.md)
153+
- [Sync Guide](docs/SYNC.md)
154+
- [Security Model](docs/SECURITY-MODEL.md)
155+
- [FAQ](docs/FAQ.md)
156+
157+
MIT Licensed — The Production Line
158+
NOTES
159+
)" 2>&1
160+
pass "GitHub release v1.0.0 created"
161+
162+
# ── Step 5: Commit SHA update ──
163+
header "STEP 5: COMMIT & PUSH"
164+
if git diff --quiet packages/installer/homebrew/cortex.rb 2>/dev/null; then
165+
info "No SHA changes to commit"
166+
else
167+
git add packages/installer/homebrew/cortex.rb
168+
git commit -m "Update Homebrew SHA256 after npm publish" 2>&1 | tail -1
169+
git push origin main 2>&1 | tail -1
170+
pass "SHA256 committed and pushed"
171+
fi
172+
173+
# ── Step 6: Set GitHub repo topics ──
174+
header "STEP 6: REPO OPTIMIZATION"
175+
gh repo edit ProductionLineHQ/cortex \
176+
--add-topic claude --add-topic claude-code --add-topic mcp \
177+
--add-topic persistent-memory --add-topic ai-memory \
178+
--add-topic developer-tools --add-topic typescript \
179+
--add-topic sqlite --add-topic open-source 2>/dev/null
180+
pass "GitHub topics set"
181+
182+
# ── Done ──
183+
header "LAUNCH COMPLETE"
184+
echo ""
185+
echo " ╔═══════════════════════════════════════════════════╗"
186+
echo " ║ ║"
187+
echo " ║ Cortex v1.0.0 is LIVE ║"
188+
echo " ║ ║"
189+
echo " ║ npm: @cortex-memory/cli ║"
190+
echo " ║ repo: github.com/ProductionLineHQ/cortex ║"
191+
echo " ║ install: npx @cortex-memory/cli init ║"
192+
echo " ║ ║"
193+
echo " ╚═══════════════════════════════════════════════════╝"
194+
echo ""
195+
echo " Next steps:"
196+
echo " 1. Deploy cortex.sh (Vercel: cd packages/web && vercel)"
197+
echo " 2. Publish VS Code extension (cd packages/vscode && vsce publish)"
198+
echo " 3. Send Newsletter Issue #3 (see NEWSLETTER_ISSUE_3.md)"
199+
echo " 4. Post to HN, Reddit, X (see LAUNCH.md)"
200+
echo ""

0 commit comments

Comments
 (0)