DEV Community

Amritanshu Amar
Amritanshu Amar

Posted on

PunamIDE — I Built a Full AI-Powered Desktop Code Editor From Scratch

DEV Weekend Challenge: Passion Edition Submission

This is a submission for Weekend Challenge: Passion Edition

What I Built

PunamIDE is a fully native AI-powered desktop code editor built with Tauri 2, React 19, and Monaco Editor — the same editor engine that powers VS Code.

This isn't a chat wrapper or a plugin. It's a complete IDE with:

  • Multi-provider AI — 7 providers (Gemini, Anthropic, OpenAI, Groq, OpenRouter, Ollama, Mistral) with real-time cost tracking in USD and INR
  • Agentic tool-calling — AI can autonomously read files, write code, apply patches, run commands, and iterate until the task is done
  • Multi-agent orchestration — spawn specialized agents (implementation, test, security, architecture, refactor) running in parallel with strict permission boundaries
  • Technical debt analyzer — AST-powered analysis using Tree-sitter for JS, TS, Python, and Rust — dependency graphs, dead code detection, circular dep finder, coupling analyzer, debt scoring
  • Architecture engine — define your own rules, validate every AI-proposed patch against them before it touches disk
  • Real PTY terminal — actual shell via Rust's portable-pty, not a fake simulation
  • Full GitHub integration — repos, issues, PRs, Actions, gists — all from inside the editor
  • Local embeddings — 100% offline semantic search via @xenova/transformers, no API key needed
  • Inline autocomplete — FIM / chat-fallback ghost text completion with per-model auto-detection
  • DAP debugger — Debug Adapter Protocol via Rust backend

My goal was to build the IDE I always wanted — one where AI is deeply integrated at every layer, not bolted on as an afterthought, and where everything runs locally on your machine.

Demo

🌐 Website: punamide.com
📦 Download v2.1.2: github.com/punamide/punamide-downloads/releases/tag/v2.1.2
💬 Discord: discord.gg/PFp9KWY3eY
🐦 X: @PunamIDE

Main Interface
PunamIDE Main Interface

AI Agent in Action
AI Agent

Technical Debt Dashboard
Technical Debt

Architecture Dependency Graph
Architecture Graph

GitHub Integration
GitHub Panel

Debugger
Debugger

Snapshot Manager
Snapshots

BYOK — Bring Your Own Key
Providers

Code

GitHub logo mandaloriantrader / PunamIDE

AI-powered native desktop code editor — Tauri 2, React 19, Monaco Editor. Multi-provider AI, agentic tool-calling, technical debt analysis, and full IDE features.

PunamIDE Logo

PunamIDE v2.1.2

A native AI-powered code editor built with Tauri 2, React 19, and Monaco Editor.
Multi-provider AI, agentic tool-calling, technical debt analysis, and a full IDE experience — all running locally on your machine.


Version License Tauri React Rust TypeScript Monaco Platform


Download Website Discord X


AI Providers Agent Tools Components Tests


PunamIDE is not just a chat wrapper around an AI — it's a full desktop IDE with a native Rust backend, real terminal, Git integration, GitHub management, DAP debugger, local embeddings, architecture analysis, and a multi-agent system that can autonomously read, write, and refactor your codebase.


Table of Contents


Screenshots

Main Interface

PunamIDE Main Interface

BYOK — Bring Your Own Key (Multi-Provider)

AI Providers

Technical Debt Analysis

Technical Debt Dashboard

Technical Debt — File Details

Technical Debt — Metrics

Architecture & Dependency Graph

Architectural Dependency Graph

Architecture Graph View

GitHub Integration

GitHub Panel

Git Source

How I Built It

The stack:

Layer Technology
Desktop shell Tauri 2 (Rust + WebView)
Frontend React 19, TypeScript 6, Vite 8
Editor Monaco Editor 0.55
State Zustand 5
Styling Tailwind CSS v4
Backend Rust — Tokio, git2, rusqlite, portable-pty
AI (local) @xenova/transformers (WebAssembly)
AST parsing web-tree-sitter (JS, TS, Python, Rust)
Graph UI @xyflow/react
Testing Vitest + fast-check (property-based)

The interesting technical decisions:

1. Multi-provider tool-calling without a framework
Each AI provider handles tool-calling differently. Anthropic has native tool-use, Gemini has function calling, but most OpenAI-compatible providers need a JSON fallback. I built separate tool loop implementations (anthropicLoop, geminiLoop, openaiLoop, jsonFallbackLoop) that share a common interface — the agent code never knows which provider it's talking to.

2. Agent safety layers
Before any AI-proposed file write lands on disk it goes through: architecture rule validation → security scan → user approval gate. The AgentApplyGuard is the final checkpoint. Even a fully autonomous agent can't violate your architectural rules or introduce known vulnerability patterns.

3. Local embeddings with zero API cost
@xenova/transformers runs entirely in the browser via WebAssembly. The embedding generator runs in a Web Worker so it never blocks the UI. Combined with a Rust-side embedding pipeline for batch processing, semantic search over the codebase costs nothing and works fully offline.

4. Technical debt analysis via Tree-sitter
Instead of sending code to an API, everything runs locally. Tree-sitter parses JS/TS/Python/Rust into ASTs. The debt analyzer Web Worker extracts metrics, builds dependency graphs, detects cycles, measures coupling — all off the main thread. Results appear in seconds even on large codebases.

5. Context management
One of the hardest problems in coding AI is fitting the right context into a limited token window. I built a ContextAssembler that pulls from open files, git diff, LSP diagnostics, and symbol index, then a ContextCompressor that smart-truncates while preserving the most relevant sections. The context sidebar shows exactly what's going into each AI request.

This project is the thing I'm most passionate about. Every feature exists because I hit a real limitation in existing tools and decided to build past it.

Prize Categories

Best Use of Google AI — PunamIDE has deep native integration with Google Gemini (2.5 Pro, 2.5 Flash, 2.5 Flash-Lite, 2.0 Flash) including streaming, vision input, native function calling for agentic tool loops, and per-model cost tracking in USD and INR. Gemini is the recommended default provider for new users due to its generous free tier and strong coding performance.

Top comments (0)