🌌 Lumina: Autonomous AI Coding Agent for VS CodeIlluminating the Path from Idea to Implementation through Local Intelligence & Complete Data Sovereignty. Features • Architecture • Quickstart • Hardware Profiles • Commands & Shortcuts • Contributing 📖 Table of Contents
🌟 Executive SummaryLumina is a professional-grade, privacy-first VS Code extension designed to transform your editor into an autonomous AI coding environment powered entirely by local models via Ollama. Unlike conventional AI plugins that act as simple cloud-dependent chatbots, Lumina functions as an autonomous agent:
🔒 Zero-Leak Data SovereigntyYour codebase is your intellectual property. Lumina is engineered from the ground up on three strict privacy axioms:
✨ Key Features1. The Nexus (Glassmorphic Sidebar)The central intelligence hub embedded directly in the VS Code Activity Bar (
2. The Prism (Floating Command Bar -
|
| Profile Tier | Hardware Specification | Recommended Models | Embedding Model | Context Window |
|---|---|---|---|---|
| Low Profile | < 12 GB RAM Integrated Graphics |
qwen2.5-coder:1.5bphi3:minitinyllama |
all-minilm:latest |
4,096 tokens |
| Balanced Profile | 12–24 GB RAM 6–12 GB VRAM / M1–M3 |
qwen2.5-coder:7bllama3.1:8bmistral:7b |
nomic-embed-text:latest |
8,192 tokens |
| Power Profile | 24+ GB Unified RAM 16+ GB VRAM / M-Max |
deepseek-coder-v2:latestqwen2.5-coder:14bcodeqwen:latest |
nomic-embed-text:latest |
16,384 tokens |
📦 Prerequisites
- VS Code: Version
1.80.0or later. - Node.js: Version
18.0.0or later (Node v20+ recommended). - Ollama: Installed and running locally.
- Install from ollama.com
- Verify server is active:
curl http://localhost:11434/api/tags
🚀 Installation & How to Run
Method 1: Run Live in VS Code with F5 (Recommended for Development)
Install dependencies and build:
npm install npm run buildLaunch the Extension:
- In VS Code, press F5 (or click Run $\rightarrow$ Start Debugging from the top menu).
- This opens a new
[Extension Development Host]VS Code window with Lumina loaded and active.
Verify it's Running:
- In the new window, click the Lumina Sparkle icon in the left Activity Bar to open the Nexus Hub.
- Open any code file, select a function, and press Cmd+K (macOS) or Ctrl+K (Windows/Linux) to trigger The Prism.
- Type code to see The Aura ghost text autocomplete appear.
Method 2: Live Watch Mode (npm run dev)
If you are modifying TypeScript or webview code:
# Starts automatic build watcher
npm run dev
# (or)
npm start
Any changes you make to src/ will automatically recompile into dist/. In the Extension Development Host window, press Cmd+R (or Ctrl+R) to reload instantly.
Method 3: Install .vsix Directly into your Local VS Code
To install Lumina permanently into your main VS Code environment without running debug mode:
# 1. Package the extension
npm run package
# 2. Install into VS Code
code --install-extension lumina-ai-agent-0.1.1.vsix
⚡ Quickstart Guide
1. Pull Your Preferred Local Model
# Recommended for balanced setups:
ollama pull qwen2.5-coder:7b
# Recommended for local embeddings (RAG):
ollama pull nomic-embed-text
2. Launch Nexus & Calibrate
- Click the Lumina Sparkle Icon in the VS Code Activity Bar.
- Navigate to the Hardware tab and click Rescan Hardware.
- Click Benchmark Model (TPS) to measure your local token generation speed.
3. Use Prism for Fast Code Editing
- Select a block of code in any editor.
- Press Cmd+K (macOS) or Ctrl+K (Windows/Linux).
- Select an action (e.g. Refactor & Clean Code) or enter your prompt.
- Review the generated changes in the side-by-side diff window and click Accept All or Reject.
4. Index Workspace for Deep Context (RAG)
- In the Nexus sidebar, open the Context Hub tab.
- Click Index Workspace Now.
- All code files are indexed into your private local vector store.
⚙️ Configuration Reference
Customize Lumina through VS Code Settings (settings.json):
{
// URL of your local Ollama server
"lumina.ollamaEndpoint": "http://localhost:11434",
// Selected primary coding model (e.g., qwen2.5-coder:7b, llama3.1:8b)
"lumina.selectedModel": "qwen2.5-coder:7b",
// Model used for vector embeddings
"lumina.embeddingModel": "nomic-embed-text",
// Enable/disable Aura Ghost Text inline autocomplete
"lumina.enableGhostText": true,
// Debounce delay in milliseconds for ghost text
"lumina.ghostTextDelay": 350,
// Sampling temperature for code generation (0.0 - 1.0)
"lumina.temperature": 0.2,
// Automatically scan hardware on startup
"lumina.autoCalibrateOnStartup": true,
// Maximum number of RAG chunks to inject into context
"lumina.maxRagChunks": 5
}
⌨️ Keyboard Shortcuts & Commands
| Command | Shortcut | Description |
|---|---|---|
lumina.prism |
Cmd+K / Ctrl+K | Open floating Prism command bar for selected code |
lumina.calibrate |
Command Palette | Run hardware telemetry and model recommendation |
lumina.benchmark |
Command Palette | Benchmark active model inference speed (tokens/sec) |
lumina.indexWorkspace |
Command Palette | Index codebase files for local RAG |
lumina.toggleGhostText |
Command Palette | Enable/disable Aura Ghost Text autocomplete |
lumina.runAutonomousLoop |
Command Palette | Start autonomous test runner & auto-patch loop |
lumina.focusNexus |
Command Palette | Reveal Nexus Sidebar Hub |
lumina.openSettings |
Command Palette | Open Lumina configuration settings |
📂 Repository Structure
lumina/
├── .vscode/ # VS Code launch and task configs
├── resources/ # Extension icons and visual assets
│ └── lumina-icon.svg
├── src/
│ ├── aura/ # The Aura (Ghost Text inline completion)
│ │ └── inlineCompletion.ts
│ ├── calibration/ # Hardware Telemetry & Recommender
│ │ ├── telemetry.ts
│ │ ├── recommender.ts
│ │ └── benchmarker.ts
│ ├── diff/ # Myers Diff Engine & Comparison Provider
│ │ ├── diffEngine.ts
│ │ ├── diffProvider.ts
│ │ └── patchManager.ts
│ ├── nexus/ # The Nexus (Glassmorphic Sidebar Webview)
│ │ ├── nexusViewProvider.ts
│ │ └── media/
│ │ ├── nexus.html
│ │ ├── nexus.css
│ │ └── nexus.js
│ ├── ollama/ # Local Ollama REST Client & Manager
│ │ ├── client.ts
│ │ └── manager.ts
│ ├── orchestrator/ # Sovereign Orchestrator & Autonomous Loop
│ │ ├── promptBuilder.ts
│ │ ├── sovereignOrchestrator.ts
│ │ └── autonomousLoop.ts
│ ├── prism/ # The Prism (Cmd+K Floating Command Bar)
│ │ └── floatingCommandBar.ts
│ ├── rag/ # Local Context Engine & Vector Store
│ │ ├── crawler.ts
│ │ ├── chunker.ts
│ │ ├── vectorStore.ts
│ │ └── contextEngine.ts
│ ├── utils/ # OutputChannel logger & StatusBar
│ │ ├── logger.ts
│ │ └── statusBar.ts
│ ├── extension.ts # Main extension activation entry point
│ └── types.ts # Core TypeScript types & message protocols
├── test/
│ └── test-suite.js # Unit and integration test suite
├── Documentation.md # Original specification & whitepaper
├── esbuild.js # Asset packaging pipeline
├── package.json # Extension manifest & contribution points
├── tsconfig.json # TypeScript compiler configuration
└── readme.md # Project documentation
🛠️ Development & Testing
Building
# Typecheck TypeScript source
npm run typecheck
# Bundle extension with esbuild
npm run build
# Watch mode for active development
npm run build:watch
Running Tests
Lumina includes a standalone verification suite covering the Diff Engine, Code Chunker, Model Recommender, and Cosine Similarity math:
npm run compile
node test/test-suite.js
❓ Troubleshooting & FAQ
Q: Lumina displays "Ollama: Offline" in the status bar.
- Ensure the Ollama daemon is running in your terminal:
ollama serve - Verify that the URL in
lumina.ollamaEndpointmatches your Ollama instance (http://localhost:11434by default).
Q: How do I speed up inline ghost text completions?
- Pull a smaller, highly optimized model such as
qwen2.5-coder:1.5borphi3:mini. - In settings, reduce
lumina.ghostTextDelayto200.
Q: Does Lumina require an internet connection?
No. Once your models are pulled via Ollama, Lumina functions 100% offline and air-gapped.
🤝 Contributing
Contributions are warmly welcomed! To contribute:
- Fork the Repository on GitHub.
- Create a Feature Branch:
git checkout -b feature/amazing-feature - Commit Your Changes:
git commit -m "feat: add amazing feature" - Push to the Branch:
git push origin feature/amazing-feature - Open a Pull Request.
Please ensure all tests pass with node test/test-suite.js before submitting.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.