From 17d7af88b6f8cd6a4ac2d5899b7a9ecad1ecf725 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 1 Apr 2026 12:29:05 +0200 Subject: [PATCH] feat(install): add Swival auto-registration If a Swival config is found, automatically register codedb there. --- README.md | 4 ++-- install/install.sh | 25 +++++++++++++++++++++++++ website/app/index.zig | 2 +- website/app/quickstart.zig | 2 +- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0cedf4e..a61c23b 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ | Structural outlines (functions, structs, imports) | Multi-project support | | Reverse dependency graph | Remote indexing over SSH | | Atomic line-range edits with version tracking | | -| Auto-registration in Claude, Codex, Gemini, Cursor | | +| Auto-registration in Claude, Codex, Gemini, Cursor, Swival | | | Polling file watcher with filtered directory walker | | | Portable snapshot for instant MCP startup | | | Multi-agent support with file locking + heartbeats | | @@ -64,7 +64,7 @@ curl -fsSL https://codedb.codegraff.com/install.sh | sh ``` -Downloads the binary for your platform and auto-registers codedb as an MCP server in **Claude Code**, **Codex**, **Gemini CLI**, and **Cursor**. +Downloads the binary for your platform and auto-registers codedb as an MCP server in **Claude Code**, **Codex**, **Gemini CLI**, **Cursor**, and **Swival**. | Platform | Binary | Signed | |----------|--------|--------| diff --git a/install/install.sh b/install/install.sh index 0130dc3..361b73e 100644 --- a/install/install.sh +++ b/install/install.sh @@ -150,6 +150,30 @@ PYEOF printf " ${G}✓${N} cursor ${D}→ $config${N}\n" } +register_swival() { + local codedb_bin="$1" + local config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/swival" + local config="$config_dir/config.toml" + + if [ ! -d "$config_dir" ]; then + return + fi + + if [ -f "$config" ] && grep -q '\[mcp_servers\.codedb\]' "$config" 2>/dev/null; then + printf " ${G}✓${N} swival ${D}→ $config (already registered)${N}\n" + return + fi + + { + [ -f "$config" ] && [ -s "$config" ] && echo "" + echo '[mcp_servers.codedb]' + echo "command = \"$codedb_bin\"" + echo 'args = ["mcp"]' + } >> "$config" + + printf " ${G}✓${N} swival ${D}→ $config${N}\n" +} + main() { local platform version ext="" platform="$(detect_platform)" @@ -203,6 +227,7 @@ main() { register_codex "$dest" register_gemini "$dest" register_cursor "$dest" + register_swival "$dest" # Check PATH case ":$PATH:" in diff --git a/website/app/index.zig b/website/app/index.zig index 70f20ea..2abf494 100644 --- a/website/app/index.zig +++ b/website/app/index.zig @@ -348,7 +348,7 @@ const html = \\
\\
\\
Give your agent a brain
- \\
One command. Auto-registers in Claude Code, Codex, Gemini CLI, and Cursor.
+ \\
One command. Auto-registers in Claude Code, Codex, Gemini CLI, Cursor, and Swival.
\\
\\ $ curl -fsSL https://codedb.codegraff.com/install.sh | sh \\
diff --git a/website/app/quickstart.zig b/website/app/quickstart.zig index c265924..9759c8e 100644 --- a/website/app/quickstart.zig +++ b/website/app/quickstart.zig @@ -20,7 +20,7 @@ fn page() h.Node { h.h1(.{ .class = "section-title" }, "Up and running in 60 seconds"), h.h2(.{}, "1. Install"), - h.p(.{}, "One command. Downloads the binary for your platform and auto-registers codedb as an MCP server in Claude Code, Codex, Gemini CLI, and Cursor."), + h.p(.{}, "One command. Downloads the binary for your platform and auto-registers codedb as an MCP server in Claude Code, Codex, Gemini CLI, Cursor, and Swival."), h.pre(.{}, \\curl -fsSL https://codedb.codegraff.com/install.sh | sh ),