DISCOVER THE FUTURE OF AI AGENTSarrow_forward

Knot Code

calendar_todayAdded Apr 24, 2026
categoryAgent & Tooling
codeOpen Source
TypeScriptNode.js桌面应用Rust大语言模型Next.jsReactAI AgentsAgent & ToolingModel & Inference FrameworkDeveloper Tools & CodingProtocol, API & Integration

A lightweight, AI-native code editor that connects to any LLM via local OpenClaw Gateway, featuring inline edits and direct GitHub repository manipulation.

Knot Code is a code editor built around the philosophy "AI coding, without the bloat," featuring a dual-target architecture with Next.js 16 + React 19 + Tauri v2 that supports both web self-hosting and desktop apps (macOS/Windows/Linux, iOS coming soon) from a single codebase. Rather than bundling models, it connects to user-selected LLMs via a local OpenClaw Gateway (WebSocket + JSON-RPC protocol, default address ws://127.0.0.1:18789), offering Ask, Agent, and Plan interaction modes with streaming support.

AI Agent Interaction

  • Agent Builder: selectable personas, custom system prompts, configurable behavior
  • Inline Edits: agent proposes changes → user reviews per-hunk diff → accept/reject
  • 7 Slash commands: /edit, /explain, /refactor, /generate, /search, /commit, /diff
  • Session isolation via agent:main:code-editor:{chatId} keys to prevent message cross-contamination

Editor Core

  • Monaco Editor-based multi-tab editing with Vim mode, syntax highlighting, Cmd/Ctrl+P fuzzy file open
  • LCS algorithm-based dual-line-number side-by-side Diff viewer
  • 24 built-in themes (Claude, Supreme, Obsidian, Neon, Catppuccin, etc.) via CSS custom properties, Monaco auto-follows

GitHub Integration

  • Token auth, commit, push, branch switching
  • Recursive file tree fetching, file content reading, single/multi-file commits
  • Clone-free browsing and editing of remote repositories

Desktop Native (Tauri v2)

  • Direct local filesystem access, git operations, OS Keychain credential storage
  • Integrated xterm.js terminal with Gateway slash command support
  • Built-in Spotify + YouTube music/video plugins

Security

  • Three-layer auth: WorkOS AuthKit (OAuth), Gateway password (WebSocket challenge/response), IP whitelist (optional CIDR)

Architecture

  • Web path: Next.js → SSR → Vercel Edge (with API Routes, proxy.ts security middleware)
  • Desktop path: Next.js → static export → Tauri WebView (system WebKit, no Node.js server)
  • next.config.ts auto-switches export mode via TAURI_ENV_PLATFORM detection
  • Three Context layers: GatewayContext (WebSocket + JSON-RPC), RepoContext (repo/branch/file tree), EditorContext (files/tabs/dirty file tracking)

Performance (self-reported, not independently verified)

  • ~7.8 MB install (Cursor ~500 MB)
  • ~80 MB idle RAM (Cursor 500 MB–2 GB)
  • <1s startup

Prerequisites & Installation

  • Node.js 20+, pnpm, OpenClaw Gateway running locally
  • Desktop: download .dmg/.exe/.msi/.AppImage/.deb from GitHub Releases
  • Web: pnpm dev (localhost:3080) or pnpm build for static export
  • macOS notarization workaround: xattr -cr /Applications/KnotCode.app

Unconfirmed Items

  • OpenClaw Gateway's independent repo link and installation instructions not provided in the editor repo
  • iOS release has no specific timeline
  • AI agent availability in web self-hosted mode not explicitly documented
  • Remote Gateway or custom port configuration support not clarified

Related Projects

View All arrow_forward

STAY UPDATED

Get the latest AI tools and trends delivered straight to your inbox. No spam, just intelligence.

rocket_launch