🛠️

Setting Up Zed with AIDR for AI

Sep 2, 2024

Setting Up Zed with AIDR for Enhanced AI Features

Introduction

  • Previous overview of Zed's local setup
  • Issue with Zed: No support for multi-file editing
  • Cursor has this feature (paid and not great)
  • Objective: Set up a comparable free/open-source solution using Zed and AIDR

Zed Overview

  • Main editor for AI features
  • Good for single-file editing and file context conversations
  • Local models supported
  • Anthropic model recommended (currently free without limits)
  • Alternative: Using Ollama models

AIDR Overview

  • AIDR enables automated multi-file editing
  • Terminal interface can be accessed within Zed's terminal
  • Workflow: Zed for simple edits, AIDR for complex multi-file tasks

Installation Steps

  1. Install Zed

    • Download from Zed's website
    • Sign in with a Zed account to access Clawed 3.5 Sonnet
  2. Set Up AI in Zed

    • Access AI options and select Clawed 3.5 Sonnet
    • Use inline assist for code generation
  3. Install AIDR

    • Open terminal in Zed
    • Run command: pip install AIDR chat
    • Export API keys for OpenAI or Anthropic
    • Optionally, set up with Ollama

Using AIDR

  • Run AIDR command to start interface

  • Example: Create a to-do list application with HTML, CSS, and JS

    • Prompt AIDR for application creation
    • Observe generated files and preview app
  • Example: Modify application with Zed

    • Use inline assist to add a heading
    • Approve changes and save

Workflow Integration

  • Use AIDR for initial code generation
  • Use Zed's AI for simple edits and chat interface to discuss code
  • Changes can be finalized in Zed using the inline assist
    • Chat and inline assist share the same context
  • Customization and key bindings possible for smoother workflow

Conclusion

  • Combination of AIDR and Zed offers powerful features
  • AIDR is highly functional, ZED is improving
  • Recommended model for local usage: QEN27B
  • Encourage viewer engagement in comments, likes, and subscriptions