rtk-ai/rtk

feat: add Windsurf support via rtk init --agent windsurf

Open

#695 geöffnet am 18. März 2026

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (2.914 Forks)batch import
area:clieffort-mediumenhancementhelp wantedpriority:low

Repository-Metriken

Stars
 (48.085 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11T 1h) (45 gemergte PRs in 30 T)

Beschreibung

Summary

Add Windsurf IDE/Cascade support to RTK.

How Windsurf hooks work

Windsurf uses pre_run_command hooks in ~/.codeium/windsurf/hooks.json (user-level) or .windsurf/hooks.json (workspace). Hooks receive JSON via stdin with tool_info.command_line but cannot rewrite commands — they can only block (exit 2) or allow (exit 0).

Implementation plan

Since Windsurf hooks can't rewrite commands, RTK support uses two approaches:

  1. Rules file (.windsurfrules or global): Instructions telling Cascade to prefix commands with rtk
  2. Pre-run hook (optional): Log/track commands for rtk gain analytics even without rewriting

Files to add

  • hooks/windsurf-rtk-rules.md — Windsurf rules content (like hooks/rtk-awareness-codex.md)
  • hooks/windsurf-rtk-hook.sh — Optional pre_run_command hook for tracking
  • src/init.rs — Add Windsurf variant to AgentTarget enum
  • src/main.rs — Route --agent windsurf

rtk init -g --agent windsurf should:

  1. Create ~/.codeium/windsurf/rules/rtk.md with RTK instructions
  2. Optionally install pre_run_command hook in ~/.codeium/windsurf/hooks.json
  3. Show status in rtk init --show

References

Contributor Guide