LLM-native code editing toolkit with LSP integration.
Radius is a daemon-based code editing system designed for AI coding agents. It provides semantic code operations via Language Server Protocol (LSP) integration with efficient in-memory text buffering using a Piece Tree data structure.
- LSP-powered semantic operations: Variable reading and renaming with full semantic understanding
- Undo/redo history: Per-project change tracking with full file restoration
- Git conflict resolution: Parse and resolve merge conflicts programmatically
- Import-aware file renaming: Automatically update import statements across the project
- VSCode extension support: Install extensions from Open VSX registry for language support
- External change detection: Automatically detect and handle external file modifications
- Memory-efficient buffering: LRU cache with Piece Tree text buffer for large file handling
- Configurable LSP servers: User-defined LSP server mappings via JSON configuration
Linux / macOS:
curl -fsSL https://radius-ai.pages.dev/install.sh | bashWindows (PowerShell):
irm https://radius-ai.pages.dev/install.ps1 | iexThe installer will:
- Download the latest release for your platform
- Extract binaries to
~/.radius/bin(customizable with$RADIUS_INSTALL_DIR) - Add to PATH automatically
Download pre-built binaries from GitHub Releases:
# Linux x64
curl -LO https://github.com/ihasq/radius/releases/latest/download/radius-linux-x64.tar.gz
tar xzf radius-linux-x64.tar.gz
sudo mv radius-linux-x64 radiusd-linux-x64 /usr/local/bin/
sudo ln -s /usr/local/bin/radius-linux-x64 /usr/local/bin/radius
sudo ln -s /usr/local/bin/radiusd-linux-x64 /usr/local/bin/radiusdPrerequisites:
- Bun runtime (v1.0+)
- Unix-like OS (Linux, macOS) or Windows
# Clone repository
git clone https://github.com/ihasq/radius.git
cd radius
# Install dependencies
bun install
# Build binaries
bun run build
# Install to system (optional)
sudo cp dist/radius dist/radiusd /usr/local/bin/The daemon starts automatically on first command. To manually manage:
# Check daemon status
radius ping
# Stop daemon
radius daemon stopradius view <file> # View entire file
radius view <file> --range 10:20 # View lines 10-20radius read-var <file> --var <name> # Find variable definition and references
radius modify-var <file> --from <old> --to <new> # Rename variable across fileradius str-replace <file> --old "text" --new "replacement"
radius insert <file> --line 10 --text "new line content"
radius create <file> --content "file content"radius solve-conflict <file> # Show conflicts
radius solve-conflict <file> --accept ours # Accept our changes
radius solve-conflict <file> --accept theirs # Accept their changes
radius solve-conflict <file> --id 1 --content "custom resolution"radius rename-file <old-path> --to <new-path>radius undo # Undo last change
radius redo # Redo undone changeradius ext install <publisher.name> # Install from Open VSX
radius ext install ./local-extension # Install local extension
radius ext list # List installed extensions
radius ext remove <publisher.name> # Remove extensionradius lsp list # Show registered LSP servers and their sourcesCreate ~/.radius/lsp-servers.json to define custom LSP servers:
{
"servers": {
"python": {
"command": "pylsp",
"args": []
},
"go": {
"command": "gopls",
"args": ["serve"]
}
}
}LSP resolution priority:
- Installed VSCode extensions (static extraction)
- User configuration (
~/.radius/lsp-servers.json) - Built-in fallback table
radius (CLI) ─── Unix Socket IPC ───> radiusd (Daemon)
│
┌─────────────────────┼─────────────────────┐
│ │ │
BufferManager LspManager HistoryTracker
(Piece Tree) (LSP clients) (Undo/Redo)
│ │
│ ExtensionLoader
│ (VSCode extensions)
│
File System
- CLI (
radius): Thin client that forwards commands to daemon via Unix socket - Daemon (
radiusd): Long-running process managing buffers, LSP clients, and history - BufferManager: Piece Tree-based text buffer with mtime tracking and LRU eviction
- LspManager: Per-project LSP client lifecycle management
- ExtensionLoader: VSCode extension loading with static extraction + activate() fallback
- HistoryTracker: Per-project changeset history for undo/redo operations
src/
cli/ # CLI entry point and command parsing
daemon/ # Daemon entry point and handler registry
core/
buffer/ # Piece Tree buffer manager
commands/ # Command handlers
history/ # Undo/redo tracking
imports/ # Import statement scanning and rewriting
conflict/ # Git conflict parsing
lsp/ # LSP client and transport
extension-host/# VSCode extension loading
ipc/ # Unix socket IPC layer
shared/ # Shared utilities
bun run build # Build both radius and radiusd binariesbunx tsc --noEmitMIT