Skip to content

"For AI by AI" - Autonomous AI agents that write, refactor, and debug code across multiple repositories

License

Notifications You must be signed in to change notification settings

sandeepuppalapati/project-ka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

AI IDE - Multi-Repo AI Development Environment

"For AI by AI" - An AI-powered IDE where AI agents autonomously code across multiple repositories

Version License Electron React


🎯 What is AI IDE?

AI IDE is a next-generation development environment that revolutionizes how you work with code. Unlike traditional IDEs where AI merely assists, AI IDE features autonomous AI agents that perform coding tasks across multiple repositories simultaneously.

Key Features

βœ… Workspace Management - Organize projects with virtual groupings of repositories βœ… Multi-Repository Management - Work with multiple repos in a single workspace βœ… Autonomous AI Agents - AI writes, refactors, and debugs code independently βœ… Agent Collaboration - Multiple AI agents coordinate via a shared message bridge βœ… Streaming Responses - Real-time feedback as AI works βœ… Git Integration - Stage, commit, and push directly from the IDE βœ… Session Persistence - All workspace data encrypted and saved automatically βœ… Smart Search - Find workspaces by name, description, or tags βœ… Modern UI - Beautiful blue-themed interface with Monaco editor βœ… File Watching - Auto-refresh file tree when files change externally βœ… Voice Input - Push-to-talk voice input with OpenAI Whisper βœ… Terminal Integration - Built-in terminal with xterm.js βœ… Quick Open - Fuzzy search files with Cmd/Ctrl+P βœ… Global Search - Search across all files with Cmd/Ctrl+Shift+F βœ… Find & Replace - Find and replace across all files with Cmd/Ctrl+Shift+H βœ… Recent Files - Quick access to recently opened files with Cmd/Ctrl+E βœ… AI Context Menu - Right-click code to explain, refactor, fix, comment, or optimize βœ… Test Runner - Run tests with integrated results display βœ… Screen Recording - Built-in screen capture for creating tutorials and demos βœ… Line Navigation - Jump to specific lines from search results βœ… High Performance - Virtual scrolling, lazy loading, and React optimizations βœ… Logging System - Built-in logging with log viewer for debugging βœ… Production Ready - DevTools disabled, error handling, security hardening


πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Anthropic API Key (Get one here)
  • Git installed on your system

Installation

  1. Clone the repository

    git clone https://github.com/sandeepuppalapati/project-ka.git
    cd project-ka
  2. Install dependencies

    npm install
  3. Set up your API key

    Create a .env file in the root directory:

    ANTHROPIC_API_KEY=your_api_key_here
    ANTHROPIC_MODEL=claude-sonnet-4-20250514
  4. Run the application

    npm run dev

The IDE will launch in development mode with hot reloading enabled.


πŸ“– How It Works

1. Create or Open a Workspace

On first launch, you'll see a welcome screen where you can:

  • Create a new workspace - Give it a name, description, and optional tags
  • Open an existing workspace - Select from your list of workspaces
  • Search workspaces - Filter by name, description, or tags

All workspace data (repos, chats, settings) is encrypted and stored locally.

2. Add Repositories

Click the "Manage Repos" button to add local repositories to your workspace. You can add multiple repos and work with them simultaneously. Each workspace maintains its own set of repositories.

3. Chat with AI Agents

  • Bridge Tab: Coordinate between multiple AI agents working on different repos (workspace-specific)
  • Repo Tabs: Each repository gets its own AI agent with repo-specific context
  • All chat history is saved per workspace and persists across sessions

4. AI Does the Work

Give natural language commands:

  • "Add user authentication to the API"
  • "Fix the bug in the checkout flow"
  • "Refactor the database layer to use TypeORM"

The AI agent will:

  1. Read relevant files
  2. Execute commands as needed
  3. Write/modify code
  4. Provide explanations and updates

5. Review & Commit

  • View changes in the file tree (modified files highlighted)
  • Stage files in the Git panel
  • Write commit messages and push to remote

6. Switch Workspaces

Click the workspace selector in the header to switch between workspaces. Each workspace remembers:

  • Open files and cursor positions
  • Expanded folders in the file tree
  • Chat history with AI agents
  • UI layout preferences

🎨 Interface Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  [⚑ My Workspace β–Ό] [Edit] [Manage Repos]    [βš™οΈ Settings] β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚          β”‚                      β”‚                           β”‚
β”‚  File    β”‚   Code Editor        β”‚    Chat with AI           β”‚
β”‚  Tree    β”‚   (Monaco)           β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚          β”‚                      β”‚    β”‚ Bridge  β”‚ Repo1 β”‚   β”‚
β”‚  πŸ“ repo1β”‚                      β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  πŸ“ repo2β”‚                      β”‚    [Chat Messages]        β”‚
β”‚          β”‚                      β”‚    [Bridge Activity]      β”‚
β”‚          β”‚                      β”‚    [Input Area]           β”‚
β”‚  Git     β”‚                      β”‚                           β”‚
β”‚  Panel   β”‚                      β”‚                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

⌨️ Keyboard Shortcuts

Shortcut Action
Cmd/Ctrl + Enter Send message
Cmd/Ctrl + K Focus chat input
Cmd/Ctrl + B Toggle sidebar
Cmd/Ctrl + / Show shortcuts modal
Escape Cancel operation

πŸ—οΈ Architecture

Technology Stack

  • Frontend: React 18 + TypeScript
  • Desktop: Electron 34
  • Editor: Monaco Editor
  • Git: isomorphic-git
  • AI: Anthropic Claude API (Sonnet 4)
  • Build: Vite + TypeScript

How AI Agents Work

AI agents use Anthropic's Tool Use API to:

  • read_file - Read file contents
  • write_file - Create or modify files
  • execute_command - Run shell commands
  • post_to_bridge - Communicate with other agents

Agents work autonomously in a multi-step loop:

  1. Receive task from user
  2. Plan approach
  3. Use tools to gather info and make changes
  4. Verify results
  5. Report completion

πŸ”§ Configuration

API Settings

You can configure your AI settings in two ways:

  1. Environment Variables (.env file)

    ANTHROPIC_API_KEY=your_key
    ANTHROPIC_MODEL=claude-sonnet-4-20250514
    
  2. Settings Panel (βš™οΈ button in header)

    • Update Anthropic API key
    • Switch between Claude models
    • Configure OpenAI API key (for voice input)
    • Adjust log level (debug, info, warn, error)
    • View, download, and clear application logs
    • Settings persist globally across all workspaces

Model Options

  • claude-sonnet-4-20250514 - Latest and most capable (recommended)
  • claude-3-5-sonnet-20241022 - Previous generation

Workspace Settings

Configure where workspace data is stored:

  • Default Path: ~/Documents/ai-ide-workspaces/ (configurable)
  • Data Storage: All workspace files are encrypted at rest using OS-level encryption
    • macOS: Keychain
    • Windows: DPAPI
    • Linux: Secret Service API / libsecret

πŸš€ Performance & Logging

Performance Optimizations

AI IDE is optimized for large codebases and long-running sessions:

  • Virtual Scrolling: Only visible file tree nodes are rendered (react-window)
  • React Optimizations: Memoization with React.memo, useCallback, useMemo
  • Lazy Loading: Monaco editor loads only when opening files
  • Debouncing: Git panel and file watcher refreshes are debounced
  • Reduced Re-renders: Timer intervals optimized (5s instead of 1s)

Logging System

Built-in logging for debugging and monitoring:

  • 4 Log Levels: debug, info, warn, error (default: error)
  • File Rotation: Logs kept for 7 days, automatically deleted
  • Log Viewer: View, search, and download logs from Settings
  • Performance Metrics: File operations, AI requests, and startup times tracked
  • JSON Format: Structured logs with timestamps, categories, and metadata

Access logs via Settings β†’ Application Logs section.


πŸ“ Project Structure

ai-ide/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/                # Electron main process
β”‚   β”‚   β”œβ”€β”€ main.ts          # App entry point, IPC handlers
β”‚   β”‚   β”œβ”€β”€ preload.ts       # Secure IPC bridge
β”‚   β”‚   β”œβ”€β”€ workspace.ts     # Workspace file operations (encrypted)
β”‚   β”‚   β”œβ”€β”€ logger.ts        # Logging system with file rotation
β”‚   β”‚   β”œβ”€β”€ terminal.ts      # Terminal integration with node-pty
β”‚   β”‚   └── fileWatcher.ts   # File watching with chokidar
β”‚   └── renderer/            # React UI
β”‚       β”œβ”€β”€ components/
β”‚       β”‚   β”œβ”€β”€ WorkspaceWelcome.tsx
β”‚       β”‚   β”œβ”€β”€ CreateWorkspace.tsx
β”‚       β”‚   β”œβ”€β”€ EditWorkspace.tsx
β”‚       β”‚   β”œβ”€β”€ Settings.tsx
β”‚       β”‚   β”œβ”€β”€ Terminal.tsx
β”‚       β”‚   └── ...
β”‚       β”œβ”€β”€ hooks/
β”‚       β”œβ”€β”€ contexts/
β”‚       β”‚   β”œβ”€β”€ BridgeContext.tsx
β”‚       β”‚   └── ThemeContext.tsx
β”‚       β”œβ”€β”€ types/
β”‚       β”‚   β”œβ”€β”€ workspace.d.ts
β”‚       β”‚   └── electron.d.ts
β”‚       └── App.tsx
β”œβ”€β”€ docs/                    # Design documentation
β”‚   └── WORKSPACE_DESIGN.md  # Workspace architecture
β”œβ”€β”€ dist/                    # Build output
└── package.json

πŸ› οΈ Development

Build Commands

# Development mode with hot reload
npm run dev

# Production build
npm run build

# Type checking
npm run type-check

# Run production build
npm start

Development Workflow

  1. Main process (npm run dev:main): Compiles TypeScript and launches Electron
  2. Renderer process (npm run dev:renderer): Vite dev server for React UI
  3. Both run concurrently via npm run dev

πŸ§ͺ Testing

Test the IDE with a real multi-repo project:

  1. Create a workspace with a descriptive name and tags
  2. Add 2-3 related repositories to the workspace
  3. Ask the AI to make a change that spans repos
  4. Verify the AI coordinates across repos via the Bridge
  5. Test git operations (stage, commit, push)
  6. Switch to another workspace and verify state isolation
  7. Search for workspaces by name or tags

🎯 Roadmap

v0.1-0.3 - Foundation βœ…

  • Multi-repository support
  • Autonomous AI agents
  • Agent coordination via Bridge
  • Session persistence
  • Git integration
  • Keyboard shortcuts
  • Error handling & retry logic
  • Improved UI and loading states

v0.4 - Workspaces βœ…

  • Workspace creation and management
  • Encrypted workspace storage
  • Workspace metadata (description, tags, lastAccessed)
  • Search and filter workspaces
  • Edit workspace details
  • Workspace-specific Bridge chat
  • State persistence per workspace

v0.5 - Visual Enhancements βœ…

  • Visual diff viewer
  • File watching & auto-refresh
  • Workspace deletion with confirmation
  • Full state persistence (open tabs, file tree state)

v0.6 - Audio & Terminal βœ…

  • Voice input (push-to-talk with OpenAI Whisper)
  • Terminal integration (xterm.js with node-pty)
  • Voice recorder UI with waveform

v0.7 - UI Polish βœ…

  • Icon replacement (emojis β†’ Lucide React icons)
  • Color scheme refresh (teal β†’ soft blue)
  • Improved visual consistency

v0.8 - Performance βœ…

  • Virtual scrolling for large file trees
  • React optimizations (memo, useCallback, useMemo)
  • Timer optimizations (reduced re-renders)
  • Monaco editor lazy loading
  • Debounced git panel refresh

v0.9 - Production Hardening βœ…

  • Comprehensive logging system with log viewer
  • DevTools disabled in production
  • Performance instrumentation
  • Dynamic version display from package.json
  • Error log level default for production

v1.0 - Stable Release βœ… (Current)

  • Remove redundant localStorage usage
  • Disk-only storage architecture
  • Single source of truth for all data
  • OS-level encryption for sensitive data
  • Unlimited storage (no localStorage quota limits)
  • Clean codebase (-290 lines)

v1.1 - Multi-Model Support (Planned)

  • OpenAI API integration
  • Ollama local model support
  • Model provider abstraction layer
  • Per-agent model selection
  • Model switching UI

v1.2 - Analytics & Management (Planned)

  • Cost tracking dashboard
  • API usage analytics per workspace
  • Token usage visualization
  • Workspace import/export
  • Search across repos within workspace

Future Versions

  • Multiple workspace windows
  • Plugin system
  • Workspace templates
  • Collaborative workspaces (team sharing)
  • Code review workflow
  • Testing integration

🀝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Anthropic for the Claude API and Tool Use capabilities
  • Monaco Editor team for the excellent code editor
  • Electron and React communities

πŸ“ž Support & Community


⚠️ Important Notes

API Costs

AI IDE uses the Anthropic Claude API (bring your own key). Costs vary based on usage:

  • Sonnet 4: ~$3 per million input tokens, ~$15 per million output tokens
  • Average session: $0.10-$0.50
  • Monitor your usage at console.anthropic.com

Security

  • Never commit your .env file
  • Keep your API key secure
  • Review AI-generated code before committing
  • Use git carefully - AI has full file system access within repos
  • All workspace data is encrypted at rest using OS-level security
  • Workspaces are stored locally on your machine only

Built with ❀️ for developers who want AI to do the heavy lifting

About

"For AI by AI" - Autonomous AI agents that write, refactor, and debug code across multiple repositories

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •