CandidDevelopers
cd ../setup-guides
$catzed-setup.md

// Zed

High-performance native code editor with built-in AI. Agent Panel, Inline Assistant, and native Claude Code integration via Terminal Threads — all in an editor built from the ground up for speed.

v1.0|8 sections|IDE|free + subscription

01# Overview

Zed is a next-generation code editor built natively in Rust. It's fast — not Electron, not a fork. From the creators of Atom and Tree-sitter, Zed is designed from scratch for performance and modern development workflows, with AI built in as a first-class feature.

What makes Zed special for AI-assisted development: you get a built-in Agent Panel, an Inline Assistant for direct code transformations, and native Claude Code integration — including Terminal Threads that let you use your Claude subscription without burning through Agent SDK credits.

Native Performance

Built in Rust — instant startup, butter-smooth scrolling, no Electron overhead

Agent Panel

Multi-turn AI conversations with file context, tools, and code generation

Inline Assistant

Transform code in-place with Ctrl+Enter — parallel model suggestions

Claude Code Terminal

Run Claude Code in Terminal Threads under your subscription limits

Any LLM Provider

OpenAI, Anthropic, local models via Ollama, or any OpenAI-compatible API

MCP Support

Model Context Protocol for external tools and knowledge sources

02# Installation

Zed is available for macOS and Linux. Download from the official site or install via package managers:

macOS

install-macos.sh
bash
# Download from zed.dev (recommended)
# Or install via Homebrew:
brew install --cask zed

# Launch Zed:
open -a Zed

Linux

install-linux.sh
bash
# Install script (recommended):
curl -f https://zed.dev/install.sh | sh

# Or via package managers:
# Arch Linux:
pacman -S zed

# Launch Zed:
zed
📌Platform Support
Zed is currently available on macOS and Linux. Windows support is in development. Check zed.dev for the latest availability.

03# AI Provider Setup

Zed supports multiple AI providers. You can configure them via the Agent Settings panel (visual) or directly in settings.json.

Option A: Agent Settings Panel (easiest)

01

Open the Agent Panel: Cmd+Shift+A (macOS) or Ctrl+Shift+A (Linux)

02

Click the settings icon in the top-right corner

03

Click "+ Add Provider" and select your provider

04

Enter your API key when prompted — stored securely in system keychain

Option B: settings.json (OpenAI-compatible API)

Open settings with Cmd+, and add your provider. This works with any OpenAI-compatible API (DeepSeek, Kimi K2.6, etc.):

settings.json
json
{
  "language_models": {
    "openai_compatible": {
      "MyProvider": {
        "api_url": "https://api.example.com/v1",
        "available_models": [
          {
            "name": "model-id",
            "display_name": "My Model",
            "max_tokens": 128000,
            "capabilities": {
              "tools": true,
              "images": true
            }
          }
        ]
      }
    }
  }
}

After saving, Zed will prompt you for the API key. Keys are stored in your system keychain, not in plaintext.

Option C: Local Models via Ollama

settings.json (Ollama)
json
{
  "language_models": {
    "ollama": {
      "api_url": "http://localhost:11434",
      "available_models": [
        {
          "name": "codellama:34b",
          "display_name": "Code Llama 34B"
        }
      ]
    }
  }
}
💡Reset Credentials
If you need to change an API key, open the command palette (Cmd+Shift+P) and search for language model: reset credentials.

04# Agent Panel

The Agent Panel is Zed's primary AI interface — a chat-based coding assistant that can read your codebase, edit files, run commands, and create multi-step plans.

Opening the Agent Panel

bash
# Keyboard shortcut:
Cmd+Shift+A  (macOS)
Ctrl+Shift+A (Linux)

# Or via command palette:
Cmd+Shift+P → "agent: new thread"

# Or click the sparkle icon (✨) in the status bar

Context with @-mentions

Give the agent context by referencing files, symbols, and more:

@filename

Include a specific file in the conversation context

@terminal

Share recent terminal output with the agent

@symbol

Reference a function, class, or variable by name

@thread

Reference a previous conversation thread

Key Features

Multi-turn conversations with full codebase awareness

File editing with diff view — review and approve changes hunk-by-hunk

Built-in tool usage (file read/write, terminal commands, search)

Thread management — archive, revisit, and fork conversations

Checkpoints to revert code to its state before an AI edit

05# Inline Assistant

The Inline Assistant transforms code directly in your editor. Select code (or place your cursor on a line), press Ctrl+Enter, type your instruction, and the AI rewrites the code in-place.

bash
# How to use:
# 1. Select code (or place cursor on a line)
# 2. Press Ctrl+Enter
# 3. Type your instruction (e.g., "add error handling")
# 4. AI replaces the selection with the result

# Also works in the terminal panel!
# Select a command → Ctrl+Enter → describe what you want

Parallel Model Suggestions

Configure multiple models to generate suggestions simultaneously. Cycle through them and pick the best:

settings.json
json
// In settings.json:
{
  "assistant": {
    "inline_alternatives": [
      {
        "provider": "anthropic",
        "model": "claude-sonnet-4-20250514"
      },
      {
        "provider": "openai",
        "model": "gpt-4o"
      }
    ]
  }
}
💡Edit Predictions
Zed also has Edit Predictions — automatic, context-aware suggestions that appear as you type (similar to Copilot). These are separate from the Inline Assistant and can be enabled in settings under edit_predictions.

06# Claude Code in Zed

This is the killer feature: Zed lets you run Claude Code directly inside the editor, and with Terminal Threads, your usage stays under your Claude subscription limits — no Agent SDK credits burned.

Why This Matters

Since June 15, 2026, Anthropic split Claude billing into two pools:

Interactive (subscription)

Running claude CLI in a terminal, Claude web chat, Claude desktop. Covered by your Pro/Max subscription.

SDK/Programmatic (credits)

Agent SDK, ACP integrations, claude -p, GitHub Actions. Uses a capped monthly credit, then API rates.

⚠️Terminal Threads = Subscription Usage
When you run Claude Code via Terminal Threads in Zed, it counts as interactive/first-party usage — covered by your regular Claude subscription, not the capped Agent SDK credits. This is the most cost-effective way to use Claude Code in an IDE.

Setting Up Terminal Threads

bash
# 1. Make sure Claude Code CLI is installed:
claude --version

# 2. In Zed, open a new terminal thread:
#    Cmd+Shift+P → "terminal: new thread"
#    Or use the Agent Panel → Terminal tab

# 3. Claude Code runs in the terminal with full
#    editor integration — file access, syntax
#    highlighting, and change previews.

# Your subscription covers all usage here.

Alternative: ACP Integration

Zed also offers native ACP (Agent Client Protocol) integration with Claude Code, which provides richer UI features like hunk-by-hunk change approval and sidebar task management. However, ACP usage draws from Agent SDK credits, not your subscription.

bash
# Install Claude Agent via ACP Registry:
# Cmd+Shift+P → "zed: acp registry"
# Select "Claude Code" → Install

# Or via Agent Settings panel:
# Agent Panel → Settings → External Agents → Add
📌Choose Your Path
Terminal Threads = subscription-friendly, CLI experience inside Zed. ACP = richer UI with diffs and task management, but uses Agent SDK credits. Both give you Claude Code's full capabilities — pick based on your budget and workflow preference.

07# MCP & Extensions

Zed supports the Model Context Protocol (MCP) for extending the AI agent's capabilities with external tools and knowledge sources.

Configuring MCP Servers

settings.json
json
// In settings.json:
{
  "context_servers": {
    "my-mcp-server": {
      "command": "npx",
      "args": ["-y", "@my-org/mcp-server"],
      "env": {
        "API_KEY": "your-key-here"
      }
    }
  }
}

Custom Slash Commands

Define reusable prompts for common tasks:

settings.json
json
// In settings.json:
{
  "assistant": {
    "slash_commands": {
      "/review": "Review this code for bugs, security issues, and performance problems. Be specific.",
      "/test": "Write comprehensive unit tests for the selected code. Use the testing framework already in the project.",
      "/refactor": "Refactor this code to improve readability and maintainability without changing behavior."
    }
  }
}

Feature-Specific Models

Assign different models to different tasks — use a fast model for commit messages, a powerful one for the agent:

settings.json
json
// In settings.json:
{
  "assistant": {
    "default_model": {
      "provider": "anthropic",
      "model": "claude-sonnet-4-20250514"
    },
    "inline_assistant_model": {
      "provider": "openai",
      "model": "gpt-4o"
    },
    "commit_message_model": {
      "provider": "anthropic",
      "model": "claude-haiku-3-5"
    }
  }
}

08# Best Practices

Use Terminal Threads for Claude Code

If you have a Claude Pro/Max subscription, use Terminal Threads to run Claude Code under your subscription limits. Save your Agent SDK credits for ACP-specific workflows.

Leverage @-mentions for context

Always give the agent context with @filename, @terminal, and @symbol mentions. The more specific context you provide, the better the results.

Use checkpoints before risky edits

Zed creates checkpoints before AI edits. If the agent makes a change you don’t like, you can revert to the checkpoint instead of undoing manually.

Assign models by task

Use a fast model (e.g., Haiku) for commit messages and thread summaries, and a powerful model (e.g., Sonnet/Opus) for the main agent. This optimizes both speed and cost.

Define custom slash commands

Create reusable slash commands for your most common tasks (/review, /test, /refactor). Consistent prompts lead to consistent results.

Try Inline Assistant for quick edits

For small, targeted changes (add error handling, rename variables, add types), the Inline Assistant (Ctrl+Enter) is faster than opening a full agent conversation.

💡Learn More
Check out the full documentation at zed.dev/docs/ai, the Anthropic subscription changes breakdown at zed.dev/blog, and the source code at github.com/zed-industries/zed.

09# Terminal Compatibility

💡Works with Claude Code & Codex via Terminal
Beyond Zed's built-in Terminal Threads, you can run Claude Code or Codex CLI directly in Zed's integrated terminal — giving you the full power of these agentic tools alongside Zed's native AI. This does not break any terms of service; you're simply using the terminal as you would any other shell. Check our Claude Code and Codex setup guides to get started.