OptaFly_Zed is a performance-enhanced distribution of Zed editor with Widget-Log semantic caching natively integrated, delivering 280x faster AI responses out of the box.
OptaFly_Zed comes with intelligent AI caching that automatically provides:
- ⚡ 280x faster responses on cache hits (43ms vs 12,201ms)
- 💰 60% cost reduction on Claude API usage
- 🎯 95% semantic similarity accuracy - catches rephrased questions
- 🔒 Secure localhost-only HTTPS proxy with token authentication
- 🚀 Zero configuration required - works immediately on first run
- 🌐 Cross-platform - Linux, macOS, and Windows support
| Metric | Value |
|---|---|
| Cache Hit Speedup | 280-1122x faster |
| Response Time (Hit) | 37-43ms |
| Response Time (Miss) | 10,000-57,000ms |
| Semantic Matching | 93-95% accuracy |
| Cache Hit Rate | 57-60% typical |
| API Cost Savings | 60% reduction |
| Tokens Saved/Hit | 900-3300 tokens |
Real-World Impact:
- First query: 12 seconds → Repeated query: 45ms (280x faster, free)
- Similar query: Automatic fuzzy match at 95% similarity
- Monthly savings: $270 at 10 sessions/day
OptaFly_Zed v1.0.0 is now available! This release includes:
- ✅ Pinned Dependencies: Rust 1.91.1, Python 3.12+ with exact package versions
- ✅ Cross-Platform Installers: One-click setup for Linux, macOS, and Windows
- ✅ Comprehensive Documentation: Complete INSTALL.md with troubleshooting guides
- ✅ Production Ready: All Phase 2.5 features stable and tested
Installation:
git clone https://github.com/Optaquan/OptaFly_Zed.git
cd OptaFly_Zed
# Linux
./install.sh
# macOS
./install-macos.sh
# Windows (PowerShell as Administrator)
.\install-windows.ps1See INSTALL.md for detailed platform-specific instructions.
For the fastest setup with automatic dependency management:
git clone https://github.com/Optaquan/OptaFly_Zed.git
cd OptaFly_Zed
chmod +x install.sh
./install.shThis script automatically:
- ✅ Checks and installs system dependencies (Rust, Python, Graphviz)
- ✅ Builds OptaFly_Zed in release mode
- ✅ Sets up Widget-Log with Python virtual environment
- ✅ Configures API keys and authentication
- ✅ Starts the semantic caching proxy
- ✅ Launches OptaFly_Zed editor
See PHASE25_PARALLEL_INSTALL.md for detailed installation documentation.
Before installing, ensure you have:
| Dependency | Version | Purpose | Installation |
|---|---|---|---|
| Rust | 1.82+ | Core editor build | rustup.rs |
| Python | 3.8+ | Widget-Log proxy | System package manager |
| Graphviz | Any recent | DOT diagram rendering (optional) | apt/brew/pacman |
| Git | 2.0+ | Clone repository | System package manager |
| Build Tools | - | gcc, clang, pkg-config | System package manager |
Platform-Specific Requirements:
Linux:
# Ubuntu/Debian
sudo apt install build-essential pkg-config libssl-dev python3 python3-pip python3-venv graphviz
# Fedora/RHEL
sudo dnf install gcc gcc-c++ pkg-config openssl-devel python3 python3-pip graphviz
# Arch Linux
sudo pacman -S base-devel openssl python python-pip graphvizmacOS:
# Install Homebrew if needed: https://brew.sh
brew install python graphviz
# Rust via rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shWindows:
# Install via Chocolatey
choco install rust python graphviz
# Or use rustup-init.exe and Python installer from python.org-
Clone OptaFly_Zed:
git clone https://github.com/Optaquan/OptaFly_Zed.git cd OptaFly_Zed -
Build OptaFly_Zed:
cargo build --release
Build time: ~10-30 minutes depending on hardware.
-
Set Up Widget-Log:
cd widget-log python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Configure API Key:
Create or edit
~/.local/share/optafly-zed/widget-log/.env:ANTHROPIC_API_KEY=your_key_here
Get your API key from: console.anthropic.com
-
Start Widget-Log Proxy:
cd widget-log ./start-proxy.sh -
Run OptaFly_Zed:
cd .. ./target/release/zed
That's it! Widget-Log starts automatically and begins caching your AI interactions. 🎉
flowchart TD
A[Clone OptaFly_Zed] --> B{Dependencies Installed?}
B -->|No| C[Run install.sh]
B -->|Yes| D[cargo build --release]
C --> E{Auto-install Success?}
E -->|Yes| D
E -->|No| F[Manual Install: See Prerequisites]
F --> D
D --> G[Configure API Key in ~/.local/share/optafly-zed/widget-log/.env]
G --> H[Start Widget-Log: ./widget-log/start-proxy.sh]
H --> I[Launch OptaFly_Zed: ./target/release/zed]
I --> J{Proxy Running?}
J -->|Yes| K[✅ Semantic Caching Active - Ready!]
J -->|No| L[Check logs: tail -f ~/.local/share/optafly-zed/widget-log/logs/widget-log.log]
L --> M[Fix issues, restart proxy]
M --> J
style K fill:#90EE90
style L fill:#FFB6C1
On first run, OptaFly_Zed automatically:
- ✅ Initializes Widget-Log cache directories
- ✅ Generates secure authentication token
- ✅ Creates SSL certificates for localhost
- ✅ Configures Zed settings for optimal caching
- ✅ Starts the caching proxy server
No manual configuration needed!
OptaFly_Zed Editor
↓ (Claude API Request)
Widget-Log Proxy (127.0.0.1:8443)
↓
[Semantic Cache Check]
├─→ Cache HIT (43ms) → Return Cached Response ⚡
└─→ Cache MISS (12s) → Claude API → Store in Cache
- Semantic Matching: Detects similar questions even with different wording
- Multi-Project Intelligence: Separate caches per project maintain context boundaries
- Default Fallback: OptaFly_Zed project auto-created for immediate caching
- Fuzzy Detection: "How do I optimize?" ≈ "What's the best way to optimize?"
- 384-dim Embeddings: Using sentence-transformers for semantic understanding
- FAISS Search: Fast similarity lookup across thousands of cached queries
- Widget-Log Integration Guide - Complete integration documentation
- Native Integration Plan - Technical architecture
- Widget-Log Repository - Standalone project
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
ps aux | grep secure_proxycurl -k -H "Authorization: Bearer $(grep WIDGET_LOG_AUTH_TOKEN ~/.local/share/optafly-zed/widget-log/.env | cut -d= -f2)" \
https://127.0.0.1:8443/stats | jq '.'Example output:
{
"queries": 12,
"cache_hits": 7,
"cache_misses": 5,
"cache_hit_rate_percent": 58.33,
"tokens_saved": 10143
}tail -f ~/.local/share/optafly-zed/widget-log/logs/widget-log.log- Localhost-Only: Proxy binds to
127.0.0.1:8443(cannot be accessed from network) - 256-bit Authentication: Secure Bearer token required for all requests
- SSL/TLS Encryption: Self-signed certificate for HTTPS
- Dedicated Port: Port 8443 exclusively for Widget-Log
- Auto-Generated Credentials: Tokens created on first run
If the proxy doesn't start automatically:
# Check Python installation
python3 --version # Should be 3.8+
# Manually start Widget-Log
cd widget-log
./start-proxy.sh# Verify proxy is running
ps aux | grep secure_proxy
# Test connection
curl -k https://127.0.0.1:8443/health
# Check Zed settings
cat ~/.config/zed/settings.json | grep "127.0.0.1:8443"# Verify API key is set
grep ANTHROPIC_API_KEY ~/.local/share/optafly-zed/widget-log/.envWhat's the difference between OptaFly_Zed and standard Zed?
OptaFly_Zed adds three major enhancements to Zed:
- Widget-Log Semantic Caching: 280x faster AI responses through intelligent caching
- OptaCore Architecture Engine: Tensor-based architecture modeling and visualization
- Performance Optimizations: Enhanced build configurations and ML foundations
Standard Zed is an excellent editor, but OptaFly_Zed specifically targets AI-heavy workflows and architecture design.
Is OptaFly_Zed free to use?
Yes! OptaFly_Zed is open source:
- For personal/internal use: Completely free under AGPL-3.0
- For extracting OptaFly components (Widget-Log, OptaCore): Free under MIT or Apache-2.0
- For commercial SaaS deployment: Free, but requires source disclosure (AGPL-3.0)
See LICENSE.md for complete licensing details.
Do I need an Anthropic API key?
Yes, Widget-Log caches Claude API responses, so you need:
- An Anthropic account: console.anthropic.com
- An API key with Claude access
- API credits (pay-as-you-go)
Cost Savings: Widget-Log typically reduces API costs by 60% through caching!
Can I use OptaFly_Zed without Widget-Log?
Yes! OptaFly_Zed works as a standard Zed editor even without Widget-Log active. You'll lose the semantic caching benefits but gain:
- OptaCore architecture modeling
- Performance optimizations
- All standard Zed features
To disable Widget-Log, simply don't start the proxy or remove the proxy configuration from Zed settings.
Why is the initial build taking so long?
Rust compiles to native code, which takes time:
- First build: 10-30 minutes (compiles all dependencies)
- Subsequent builds: 1-5 minutes (incremental compilation)
Tips to speed up builds:
# Use more CPU cores (replace 8 with your core count)
cargo build --release -j 8
# Use mold linker (Linux)
sudo apt install mold
export RUSTFLAGS="-C link-arg=-fuse-ld=mold"What if the proxy fails to start?
Common issues and solutions:
Port 8443 already in use:
# Find what's using port 8443
sudo lsof -i :8443
# Kill the process or change Widget-Log port in configurationPython dependencies missing:
cd widget-log
pip install -r requirements.txt --upgradePermission errors:
# Ensure proxy script is executable
chmod +x widget-log/start-proxy.sh
# Check directory permissions
ls -la ~/.local/share/optafly-zed/widget-log/Still not working? Run proxy manually to see error messages:
cd widget-log
source venv/bin/activate
python secure_proxy.pyHow do I verify Widget-Log is working?
Check these indicators:
1. Proxy is running:
ps aux | grep secure_proxy
# Should show: python3 secure_proxy.py2. Health check passes:
curl -k https://127.0.0.1:8443/health
# Should return: {"status": "ok"}3. Cache statistics available:
# Get auth token
TOKEN=$(grep WIDGET_LOG_AUTH_TOKEN ~/.local/share/optafly-zed/widget-log/.env | cut -d= -f2)
# Check stats
curl -k -H "Authorization: Bearer $TOKEN" https://127.0.0.1:8443/stats | jq '.'4. Logs show activity:
tail -f ~/.local/share/optafly-zed/widget-log/logs/widget-log.logHow does semantic caching work?
Widget-Log uses 384-dimensional sentence embeddings to detect similar queries:
- Query arrives: "How do I optimize my code?"
- Embedding generated: Converted to vector using sentence-transformers
- FAISS search: Finds similar cached queries (cosine similarity)
- Threshold check: If similarity > 93%, it's a cache hit
- Return cached response: 43ms instead of 12,000ms!
Example matches:
- "How do I optimize?" ≈ "What's the best way to optimize?" (95% similar)
- "Fix this bug" ≈ "Debug this issue" (94% similar)
- "Explain classes" ≈ "What are classes?" (91% similar - cache miss at 93% threshold)
Does caching work across projects?
Yes! Widget-Log maintains separate caches per project:
- Project-specific cache: Queries about "MyProject" stay separate from "OtherProject"
- Default fallback: If no project detected, uses "OptaFly_Zed" cache
- Cross-project learning: General programming questions (syntax, patterns) can match across projects
You can view per-project stats in the cache statistics endpoint.
How much disk space does the cache use?
Typical cache sizes:
- Small project (100 queries): ~5-10 MB
- Medium project (1000 queries): ~50-100 MB
- Large project (10,000 queries): ~500 MB - 1 GB
Cache is stored in: ~/.local/share/optafly-zed/widget-log/cache/
To clear cache:
rm -rf ~/.local/share/optafly-zed/widget-log/cache/*
# Proxy will rebuild on next queryCan I use OptaFly_Zed commercially?
Yes, but understand the licensing:
Internal company use (developers on your team):
- ✅ Fully permitted under AGPL-3.0
- ❌ No source disclosure required
- ✅ Free to use
SaaS/network deployment (users access remotely):
- ✅ Permitted under AGPL-3.0
⚠️ Must disclose source code to users⚠️ Modifications must remain open source
Using only OptaFly components (Widget-Log, OptaCore):
- ✅ Fully commercial-friendly (MIT/Apache-2.0)
- ✅ Can be closed-source
- ✅ No disclosure requirements
See LICENSE.md for detailed scenarios.
Do I need to contribute my changes back?
Legally required:
- ❌ No, you don't have to contribute upstream
- ✅ But if you deploy over a network, you must provide source to users
Encouraged but optional:
- We welcome contributions to OptaFly_Zed!
- Upstream Zed contributions require signing the Zed CLA
- OptaFly-specific improvements can be PRs to our repo
Community benefits: Contributions help everyone, reduce maintenance burden, and build reputation.
What is OptaCore and when should I use it?
OptaCore is a tensor-based architecture modeling engine for visualizing and analyzing software architectures.
Use OptaCore when you need to:
- Visualize C4 architecture diagrams
- Detect anti-patterns (cycles, bottlenecks, over-coupling)
- Optimize diagram layouts automatically
- Export to Graphviz DOT format
- Integrate with Structurizr via JNI
Quick start:
cargo build --release --package optacore_jni
# See crates/optacore_jni/QUICKSTART.md for Java integrationHow does OptaCore compare to Structurizr?
OptaCore complements Structurizr:
| Feature | Structurizr | OptaCore |
|---|---|---|
| DSL Parsing | Full support | MVP regex-based |
| Layout Engine | Manual/auto | Force-directed (Fruchterman-Reingold) |
| Anti-Patterns | No | Yes (cycles, bottlenecks) |
| Export Formats | PlantUML, WebView | Graphviz DOT |
| Language | Java/Kotlin | Rust (JNI bridge available) |
| GPU Acceleration | No | Planned (WGPU) |
Best approach: Use Structurizr for authoring, OptaCore for optimization and analysis.
How can I contribute to OptaFly_Zed?
We welcome contributions! Here's how:
1. Report issues:
2. Submit pull requests:
- Fork the repository
- Create feature branch:
git checkout -b feature/my-improvement - Make changes with tests
- Submit PR with clear description
3. Improve documentation:
- Fix typos, clarify instructions
- Add examples and tutorials
- Translate to other languages
4. Upstream contributions:
- For Zed base improvements, contribute to zed-industries/zed
- Sign the Zed CLA
See CONTRIBUTING.md for detailed guidelines.
How do I sync with upstream Zed updates?
OptaFly_Zed periodically merges upstream Zed releases:
Current status:
- Last sync: Zed v0.217.4 (2026-01-01)
- Next planned: Zed v0.220.x (Q1 2026)
To manually sync (advanced):
# Add upstream remote
git remote add upstream https://github.com/zed-industries/zed.git
# Fetch upstream changes
git fetch upstream
# Merge specific tag
git merge v0.220.0 --no-ff
# Resolve conflicts (OptaFly components should take precedence)
git mergetool
# Test build
cargo build --releaseNote: Upstream syncs may require resolving conflicts in OptaFly-modified files.
Where can I get support?
For OptaFly_Zed questions:
- 🐛 GitHub Issues: Optaquan/OptaFly_Zed/issues
- 📧 Email: See repository for contact information
- 💬 Discussions: GitHub Discussions
For upstream Zed questions:
- 📚 Zed Docs: zed.dev/docs
- 💬 Zed Discord: discord.gg/zed
- 🐛 Zed Issues: zed-industries/zed/issues
For Widget-Log questions:
- 🐛 Widget-Log Issues: Optaquan/Widget-Log/issues
When reporting issues, please include:
- Operating system and version
- Rust/Python versions
- Error messages and logs
- Steps to reproduce
From real-world testing with complex architectural queries:
| Test | Cache Status | Response Time | Speedup |
|---|---|---|---|
| Architecture query #1 | MISS | 45,551ms | baseline |
| Exact repeat | HIT | 30ms | 1518x |
| Semantic variant | HIT | 45ms | 1012x |
| Different query | MISS | 21,780ms | baseline |
| Repeat different | HIT | 38ms | 573x |
Cache hit rate: 57-60% typical
Average speedup: 1122x faster
- OptaFly_Zed specific: https://github.com/Optaquan/OptaFly_Zed/issues
- Widget-Log specific: https://github.com/Optaquan/Widget-Log/issues
- Upstream Zed: https://github.com/zed-industries/zed/issues
See CONTRIBUTING.md for ways you can contribute to OptaFly_Zed.
- Fork the repository
- Create feature branch:
git checkout -b feature/my-improvement - Make changes and test
- Submit pull request
- OptaFly_Zed: Inherits Zed's license (see LICENSE)
- Widget-Log Integration: MIT/Apache 2.0 Dual License
- Upstream Zed: See zed-industries/zed
OptaFly_Zed enhances Zed with:
| Feature | Standard Zed | OptaFly_Zed |
|---|---|---|
| AI Response Time | 10-12 seconds | 43ms (cached) |
| Semantic Caching | ❌ None | ✅ Built-in |
| Cost Savings | Full API cost | 60% reduction |
| Similar Query Detection | ❌ No | ✅ 95% accuracy |
| Multi-Project Cache | ❌ No | ✅ Automatic |
| Configuration | Manual | Zero-config |
| Cache Hit Rate | N/A | 57-60% |
OptaFly_Zed is maintained by Optaquan as an enhanced distribution of Zed editor, focused on performance optimization and intelligent caching for AI-assisted development.
Built for developers who want:
- ⚡ Instant AI responses through semantic caching
- 💰 Reduced API costs without sacrificing quality
- 🎯 Smart detection of similar queries
- 🔒 Secure, localhost-only operation
- 🚀 Zero-configuration setup
Start using OptaFly_Zed today and experience the future of AI-assisted coding with intelligent caching!
OptaFly_Zed also includes OptaCore, a tensor-based architecture modeling and optimization engine for C4 diagrams and software architecture visualization.
- Force-Directed Layout: Automatic diagram optimization using Fruchterman-Reingold algorithm
- Anti-Pattern Detection: Identifies cycles, bottlenecks, over-coupling, and isolated components
- Structurizr Integration: JNI bridge for seamless Java/Kotlin integration
- GPU Acceleration: Optional WGPU backend for large architectures (1000+ nodes)
- Production-Grade Visualization: C4-compliant Graphviz DOT export
- ML Foundation: Telemetry infrastructure for training neural layout models
# Build OptaCore library
cargo build --release --package optacore_struct
# Build JNI bridge (requires Java JDK 11+)
cargo build --release --package optacore_jni
# Run tests
cargo test --package optacore_struct
cargo test --package optacore_jni
# Output: target/release/liboptacore_jni.so (Linux/macOS/Windows)| Nodes | Edges | Layout Time | Anti-Patterns | Visualization |
|---|---|---|---|---|
| 10 | 15 | 8ms | 2ms | 1ms |
| 100 | 200 | 95ms | 15ms | 12ms |
| 500 | 1000 | 580ms | 85ms | 70ms |
- Complete Guide: crates/optacore_jni/README.md
- Quick Start: crates/optacore_jni/QUICKSTART.md
- Roadmap: crates/optacore_jni/ROADMAP.md
- Build Instructions: BUILD_INSTRUCTIONS.md
import com.optafly.structurizr.OptaCoreJNI;
String dsl = """
system MySystem {
container WebApp {}
container Database {}
}
WebApp -> Database "queries"
""";
// Parse and optimize
String model = OptaCoreJNI.parseDsl(dsl);
String optimized = OptaCoreJNI.optimizeLayout(model);
// Detect anti-patterns
String patterns = OptaCoreJNI.detectAntiPatterns(optimized, "");
// Export visualization
String dot = OptaCoreJNI.generateDot(optimized, "");