@cachly-dev/sdk
v0.1.1
Published
Cachly SDK for Node.js/TypeScript — managed Redis/Valkey cache, semantic cache, and AI memory storage for your apps.
Downloads
379
Maintainers
Readme
Stop Rebuilding Context. Start Shipping Faster.
cachly JavaScript & TypeScript SDK — The cache that remembers everything so your AI assistant doesn't have to start from scratch every morning.
The Problem Nobody Talks About
You open Cursor. You ask it to continue where you left off. It doesn't know what "where you left off" means.
You explain your architecture. Again.
You explain why you use that pattern. Again.
You explain the bug you fixed last Tuesday. Again.
The average developer wastes 45 minutes per day just re-establishing context with their AI assistant. That's 3.5 hours a week. 180 hours a year. Gone.
And then there's the infrastructure tax: your AI hits your database for every request. Your LLM bills are exploding. Your p99 is embarrassing. Your GDPR officer won't stop emailing you about US data residency.
cachly fixes both.
Two products. One connection string. Zero ops.
🧠 AI Dev Brain — Your AI Assistant's Permanent Memory
Give Claude Code, Cursor, GitHub Copilot, and Windsurf a brain that persists across every session, every machine, every restart:
npx @cachly-dev/initFrom this moment, your AI assistant will:
- Remember every bug fix and the exact command that solved it
- Know your architecture without you explaining it again
- Resume work exactly where you left off, every single session
- Reuse known solutions instead of re-researching — saving ~1,200 tokens per recall
Before cachly: "Let me analyze your codebase... reading 47 files..."
After cachly: "Last session: deployed blue/green API, 23 lessons stored. Ready."
Configure in ~/.vscode/mcp.json, .cursor/mcp.json, or .mcp.json:
{
"servers": {
"cachly": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cachly-dev/mcp-server"],
"env": { "CACHLY_JWT": "your-jwt-token" }
}
}
}→ Full docs: cachly.dev/docs/ai-memory
⚡ Managed Cache — Sub-millisecond, GDPR-Compliant, German Servers
Installation
npm install @cachly-dev/sdk
# or
pnpm add @cachly-dev/sdkQuick Start
import { createClient } from '@cachly-dev/sdk'
const cache = createClient({ url: process.env.CACHLY_URL! })
// Cache LLM responses, user sessions, computed results
await cache.set('user:42', { name: 'Alice' }, { ttl: 300 })
const user = await cache.get<{ name: string }>('user:42')
// Get-or-Set: never hit the DB twice for the same data
const report = await cache.getOrSet('report:monthly', () => db.runExpensiveReport(), { ttl: 3600 })
// Atomic counter
const views = await cache.incr('page:views')
await cache.close()Create your free instance → No credit card. Live in 30 seconds.
With vs. Without cachly
| Situation | Without cachly | With cachly | |-----------|----------------|-------------| | AI session start | 5–10 min re-explaining context | < 10 sec, full context loaded | | Same DB query, 1000 req/s | 1,000 DB hits | 1 DB hit, 999 cache hits | | LLM API costs for repeated prompts | Pay every time | Pay once, cache the rest | | GDPR compliance for EU users | Data leaves EU (US Redis) | Data stays in Germany, always | | Infra setup | Days of ops work | 30 seconds, zero ops | | Architecture knowledge after holiday | Starts from zero | Fully briefed in seconds | | Debugging a known issue | Re-research from scratch | Instant: "you fixed this on March 12" | | p99 latency (uncached) | 200–800ms (DB) | < 1ms (cache hit) |
Semantic Cache — Cut LLM Costs by 40–70%
Stop paying for the same answer twice:
const sem = cache.semanticCache({ embedFn: openai.embed, threshold: 0.92, ttl: 86400 })
const { value, hit } = await sem.get(userQuery)
if (!hit) {
const answer = await callYourLLM(userQuery)
await sem.set(userQuery, answer)
}👥 Team Brain — Shared AI Memory for Your Whole Team
One shared instance. Every developer gets smarter every day.
// .env — same instance for the whole team
// CACHLY_INSTANCE_ID=your-shared-team-instance
// Alice fixes a bug, stores the lesson:
await brain.learnFromAttempts({
topic: "deploy:k8s-timeout",
outcome: "success",
whatWorked: "Increase readinessProbe.failureThreshold to 10",
author: "alice",
})
// Bob starts a session the next day:
await brain.sessionStart()
// → "💡 alice solved deploy:k8s-timeout 1d ago: Increase readinessProbe..."Set up a team org at cachly.dev/teams — Team €99/mo · 10 seats · Business €299/mo · 50 seats.
Pricing
| Tier | RAM | Price | Best for | |------|-----|-------|----------| | Free | 25 MB | €0/mo | Dev & side projects | | Dev | 200 MB | €19/mo | Startups, small apps | | Pro | 900 MB | €49/mo | Production workloads | | Speed | 900 MB Dragonfly + Semantic Cache | €79/mo | AI apps, high QPS | | Business | 7 GB | €199/mo | Scale-ups |
All plans: German servers · GDPR-compliant · No US data transfer · 99.9% SLA
Links
- cachly.dev — Dashboard & free signup
- npm — Package
- AI Brain docs — MCP server setup
- GitHub
