概述
Windsurf 是 Codeium 于 2024 年发布的 AI 原生 IDE;2026 年它与 Cursor 并列为顶级 AI 原生 IDE。它并非简单地在 VS Code 上加装插件,而是对平台进行了深度重构。其核心功能 Cascade 是一个同时理解编辑器和终端上下文的 Agent,实现了"编辑器写代码 + 终端跑命令"的协作工作流,让 AI 像真正的开发者一样调试和迭代。
核心特性:AI 原生 IDE、Cascade agent、编辑器/终端协作、超越代码补全。
安装
从官网下载安装包;支持 Windows、macOS 和 Linux。安装后可一键导入你的 VS Code 配置和扩展,迁移成本极低。
# Download links
# Official site: https://windsurf.com
# Download page: https://windsurf.com/download
# Windows: download the .exe installer and run it
# macOS: download the .dmg and drag it into Applications
# Linux: download the .tar.gz or .deb
# First launch → sign in to your Codeium account → import VS Code settingsWindsurf 提供免费档和 Pro 版;免费档已包含 Cascade agent 的核心能力。
基本用法
Windsurf 的核心是 Cascade 面板(Cmd/Ctrl+L),它同时感知编辑器内容和终端状态。你可以让 它写代码、运行命令、读取错误并自动修复,形成闭环。Write 模式适合从零创建,Chat 模式适合问答,Cascade 模式则是完全自主的 Agent。
# Launch the Cascade agent
Cmd/Ctrl + L # Open the Cascade panel
# Cascade example (autonomous agent)
"Initialize an Express + TypeScript project, set up ESLint and tests, and get hello world running"
# Cascade will automatically:
# 1. Create package.json and tsconfig.json
# 2. Install dependencies (run npm install in the terminal)
# 3. Write code, run tests, and fix errors
# Inline completion: press Tab to acceptCascade 会展示其计划和每一步动作,你可以随时暂停或改变方向。
技巧
Windsurf 的强项在于编辑器与终端的深度协作——Cascade 可以看到终端错误并自动修复,无需手动复制错误信息。使用 @ 引用文件或终端输出来精准控制上下文。对于大型任务,先在 Chat 模式讨论计划,再在 Cascade 模式执行。Codeium 的免费档对个人开发者非常友好。
# Reference context precisely
"Following the structure in @src/models/user.ts, fill in the CRUD endpoints in @src/api/users.ts"
# Have Cascade read the terminal error and fix it
# After a terminal error, type in Cascade:
"The terminal just errored, help me fix it"
# Switch modes
# Toggle at the top of the Cascade panel: Write / Chat / Agent提示:Cascade 在运行终端命令前会请求确认;对于敏感操作(如 rm、deploy),请保留确认。
Configuration
Windsurf is configured through the Cascade panel and a project-level rules file. The Cascade panel toggles between Write, Chat, and Agent modes and lets you pick a model. A .windsurfrules file in the project root defines conventions the agent follows, similar to .cursorrules. Sign in with a Codeium account to unlock the free tier or Pro features.
# Project rules (project root)
# .windsurfrules
Prefer TypeScript strict mode.
Never use 'any'; add JSDoc to public functions.
# Mode switching (top of Cascade panel)
# Write — generate code from scratch
# Chat — Q&A, no edits
# Agent — fully autonomous (runs commands, fixes errors)
# Model selection
# Cascade panel -> model dropdown
# Reference context precisely
"Following the structure in @src/models/user.ts, fill in @src/api/users.ts"
# Account & billing
# Sign in with Codeium account -> free tier or ProCascade asks for confirmation before terminal commands; keep confirmation on for sensitive ops like rm or deploy.
FAQ
Common questions cover the free tier, model selection, Cascade vs Chat, privacy, and how Cascade reads terminal errors. Windsurf's free tier includes the core Cascade agent; Pro adds faster models and higher limits. Cascade senses both editor and terminal state, so it can auto-fix errors without you copying messages.
Q: Is there a free tier?
A: Yes—Windsurf's free tier includes the core Cascade agent; Pro adds
faster models and higher limits.
Q: How is Cascade different from Chat?
A: Chat is Q&A only; Cascade (Agent) edits files, runs terminal commands,
and auto-fixes errors in a closed loop.
Q: Can Cascade see terminal errors?
A: Yes—Cascade senses terminal state, so after an error just ask it to
fix the problem without pasting the message.
Q: How do I control context?
A: Use @ to reference files, folders, or terminal output precisely.
Q: How do I cut token costs?
A: Discuss plans in Chat mode first, then execute in Cascade; avoid long
autonomous loops on the most expensive models.For large tasks, discuss the plan in Chat mode first, then execute in Cascade mode.
Ready to try Windsurf?
Visit the official site for the latest version and full documentation.
Visit Windsurf