diff --git a/README.md b/README.md index 4eaf2a37..a9b8750f 100644 --- a/README.md +++ b/README.md @@ -63,20 +63,34 @@ | Singleton MCP with PID lock + 1h idle timeout | | | Sensitive file blocking (.env, credentials, keys) | | | Codesigned macOS ARM64 binary; Intel slice temporarily unsigned | | -| SHA256 checksum verification in installer | | -| Cross-platform: macOS (ARM/x86), Linux (ARM/x86) | | +| SHA256-verified release downloads and npm packages | | +| Cross-platform: macOS (ARM/x86), Linux (ARM/x86), Windows (x86_64) | | --- ## ⚡ Install +### macOS and Linux + ```bash curl -fsSL https://codedb.codegraff.com/install.sh | bash ``` Downloads the binary for your platform and auto-registers codedb as an MCP server in **Claude Code**, **Codex**, **Gemini CLI**, **Cursor**, **Windsurf**, and **Devin** — each written directly and additively into that tool's config (only when the tool is present). The installer prints the exact `codedb mcp` command it registered plus hook setup pointers for Codex and Claude Code. -### Or via npm/npx (zero-install for MCP clients) +On Windows, run this command inside WSL only if you want the Linux binary inside WSL. For the native Windows binary, use PowerShell below. + +### Windows + +Run in PowerShell: + +```powershell +irm https://raw.githubusercontent.com/justrach/codedb/main/install/install.ps1 | iex +``` + +Run the same command again to update codedb. + +### npm/npx on macOS and Linux ```bash npx -y codedeebee mcp @@ -106,7 +120,7 @@ Useful for MCP clients (Claude Code, Cursor, opencode, Claude Desktop) that alre ### Updating or repairing an older install -If `codedb update` fails on an older release, rerun the installer: +On macOS or Linux, if `codedb update` fails on an older release, rerun the installer: ```bash curl -fsSL https://codedb.codegraff.com/install.sh | bash @@ -114,6 +128,8 @@ curl -fsSL https://codedb.codegraff.com/install.sh | bash This replaces the `codedb` binary with the latest GitHub Release and keeps your existing MCP registrations, config, caches, and snapshots. Use this path for any release whose built-in updater cannot fetch release checksums. +On native Windows, self-update is not yet supported. Rerun the PowerShell installer above to update or repair the binary. + ## Documentation - **[MCP setup](docs/mcp.md)** — per-client configurations (Claude Desktop, Cursor, VS Code, Claude Code, Codex CLI, Gemini CLI), root resolution, troubleshooting @@ -129,8 +145,9 @@ This replaces the `codedb` binary with the latest GitHub Release and keeps your | macOS x86_64 (Intel) | `codedb-darwin-x86_64` | temporarily unsigned | | Linux ARM64 | `codedb-linux-arm64` | — | | Linux x86_64 | `codedb-linux-x86_64` | — | +| Windows x86_64 | `codedb-windows-x86_64.exe` | SHA256 verified automatically | -Or install manually from [GitHub Releases](https://github.com/justrach/codedb/releases/latest). +Or install manually from [GitHub Releases](https://github.com/justrach/codedb/releases/latest). Always verify the binary against the attached `checksums.sha256` before running it. --- @@ -138,7 +155,7 @@ Or install manually from [GitHub Releases](https://github.com/justrach/codedb/re ### As an MCP server (recommended) -After installing, codedb is automatically registered. Just open a project and the 21 MCP tools are available to your AI agent. +The macOS/Linux shell installer registers codedb automatically. For npm/npx installs on macOS/Linux and manual Windows installs, use the MCP configuration above or the client-specific examples in [docs/mcp.md](docs/mcp.md). Then open a project and the 21 MCP tools are available to your AI agent. ```bash # Manual MCP start (auto-configured by install script) @@ -244,7 +261,7 @@ For Codex and Claude Code hook examples around `codedb_remote`, see [`docs/hooks | `codedb snapshot` | Write codedb.snapshot to project root | | `codedb serve` | HTTP daemon on :7719 | | `codedb mcp [path]` | JSON-RPC/MCP server over stdio | -| `codedb update` | Self-update to the latest release; if it fails on an older build, rerun the curl installer above | +| `codedb update` | Self-update to the latest release on macOS/Linux; on Windows rerun the PowerShell installer | | `codedb nuke` | Uninstall codedb, remove caches/snapshots, and deregister MCP integrations | | `codedb --version` | Print version | @@ -474,6 +491,7 @@ Binary: `zig-out/bin/codedb` zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux zig build -Doptimize=ReleaseFast -Dtarget=x86_64-macos +zig build -Doptimize=ReleaseFast -Dtarget=x86_64-windows ``` ### Releasing diff --git a/docs/mcp.md b/docs/mcp.md index 3bb5ec3e..9b5e6eec 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -16,18 +16,30 @@ scan, and the most common failure modes. --- -## 1. Quick install (auto-configures all detected clients) +## 1. Quick install + +### macOS and Linux (auto-configures detected clients) ```bash curl -fsSL https://codedb.codegraff.com/install.sh | bash ``` -The installer downloads the binary for your platform, drops it in -`~/.local/bin/` (or `/usr/local/bin/` on root installs), and auto-registers +The installer downloads the binary for your platform, drops it in `~/bin` +(or `$CODEDB_DIR` when set), and auto-registers codedb as an MCP server in every client it can find — Claude Code, Codex, -Gemini CLI, Cursor, opencode. It prints the exact `codedb mcp` command it +Gemini CLI, Cursor, Windsurf, and Devin. It prints the exact `codedb mcp` command it registered. +### Windows x86_64 (native) + +Run in PowerShell: + +```powershell +irm https://raw.githubusercontent.com/justrach/codedb/main/install/install.ps1 | iex +``` + +The shell installer is for macOS/Linux; running it in WSL installs the Linux binary inside WSL, not the native Windows binary. + If you prefer to wire it up by hand, the client-specific snippets below all work directly. @@ -35,13 +47,17 @@ all work directly. ## 2. Client-specific configuration -All clients launch `codedb mcp` as a stdio child process. Replace -`/usr/local/bin/codedb` with `which codedb` output on your system. +All clients launch `codedb mcp` as a stdio child process. Find a global install with `command -v codedb` on macOS/Linux. On Windows, the default path is `C:\Users\\AppData\Local\Programs\codedb\codedb.exe`. + +The examples below use `/absolute/path/to/codedb`; replace it with the path for your installation. In JSON on Windows, escape backslashes, for example `C:\\Users\\you\\AppData\\Local\\Programs\\codedb\\codedb.exe`. ### Claude Code ```bash -claude mcp add codedb -s user -- /usr/local/bin/codedb mcp +claude mcp add codedb -s user -- /absolute/path/to/codedb mcp + +# Windows PowerShell +claude mcp add codedb -s user -- "$env:LOCALAPPDATA\Programs\codedb\codedb.exe" mcp ``` Or edit `~/.claude.json` directly: @@ -50,14 +66,14 @@ Or edit `~/.claude.json` directly: { "mcpServers": { "codedb": { - "command": "/usr/local/bin/codedb", + "command": "/absolute/path/to/codedb", "args": ["mcp"] } } } ``` -Verify: `claude mcp list` should show `codedb: /usr/local/bin/codedb mcp - ✓ Connected`. +Verify with `claude mcp list`; the `codedb` entry should report `Connected`. ### Claude Desktop @@ -68,7 +84,7 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` { "mcpServers": { "codedb": { - "command": "/usr/local/bin/codedb", + "command": "/absolute/path/to/codedb", "args": ["mcp"] } } @@ -86,7 +102,7 @@ Edit `~/.cursor/mcp.json` (per-user) or `/.cursor/mcp.json` { "mcpServers": { "codedb": { - "command": "/usr/local/bin/codedb", + "command": "/absolute/path/to/codedb", "args": ["mcp"] } } @@ -104,7 +120,10 @@ Same `mcpServers` block as Cursor, scoped to whichever extension you use. ### Codex CLI ```bash -codex mcp add codedb -- /usr/local/bin/codedb mcp +codex mcp add codedb -- /absolute/path/to/codedb mcp + +# Windows PowerShell +codex mcp add codedb -- "$env:LOCALAPPDATA\Programs\codedb\codedb.exe" mcp ``` ### Gemini CLI / opencode @@ -116,7 +135,7 @@ Both read MCP configuration from `~/.gemini/mcp.json` (Gemini) and { "mcpServers": { "codedb": { - "command": "/usr/local/bin/codedb", + "command": "/absolute/path/to/codedb", "args": ["mcp"] } } @@ -213,8 +232,7 @@ Fixed in v0.2.5815 — `codedb_find` now accepts `query`, `name`, `path`, ### Tools list looks short / `codedb_context` is missing `codedb_context` was added in **v0.2.5815**. Older binaries expose only -20 tools. Upgrade with `codedb update` (or the installer one-liner above) -and verify with `codedb --version`. +20 tools. On macOS/Linux, upgrade with `codedb update` (or the installer one-liner above). On Windows, rerun the verified PowerShell installer and verify with `codedb --version`. ### Snapshot indexer keeps re-scanning diff --git a/install/install.ps1 b/install/install.ps1 new file mode 100644 index 00000000..fedb52e7 --- /dev/null +++ b/install/install.ps1 @@ -0,0 +1,164 @@ +[CmdletBinding()] +param( + [string]$Version = $env:CODEDB_VERSION, + [string]$InstallDir = $env:CODEDB_DIR, + [switch]$NoPath +) + +Set-StrictMode -Version Latest +$ErrorActionPreference = "Stop" + +$repo = "justrach/codedb" +$assetName = "codedb-windows-x86_64.exe" +$baseUrl = if ($env:CODEDB_URL) { $env:CODEDB_URL.TrimEnd("/") } else { "https://codedb.codegraff.com" } + +if ([Environment]::OSVersion.Platform -ne [PlatformID]::Win32NT) { + throw "This installer is for native Windows. Use install.sh on macOS or Linux." +} + +$architecture = [Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString() +if ($architecture -ne "X64") { + throw "Unsupported Windows architecture: $architecture (x86_64 is required)" +} + +if (-not $InstallDir) { + $InstallDir = Join-Path $env:LOCALAPPDATA "Programs\codedb" +} +$InstallDir = [IO.Path]::GetFullPath($InstallDir) +if ($env:CODEDB_NO_PATH) { + $NoPath = $true +} + +# Windows PowerShell 5.1 may otherwise negotiate an obsolete TLS version. +if ([Net.ServicePointManager]::SecurityProtocol -band [Net.SecurityProtocolType]::Tls12) { + # TLS 1.2 is already enabled. +} else { + [Net.ServicePointManager]::SecurityProtocol = ` + [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 +} + +if (-not $Version) { + try { + $release = Invoke-RestMethod ` + -Headers @{ "User-Agent" = "codedb-installer" } ` + "https://api.github.com/repos/$repo/releases/latest" + $Version = $release.tag_name + } catch { + $latest = Invoke-RestMethod ` + -Headers @{ "User-Agent" = "codedb-installer" } ` + "$baseUrl/latest.json" + $Version = $latest.version + } +} +$Version = $Version.TrimStart("v", "V") +if ($Version -notmatch '^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$') { + throw "Invalid codedb version: $Version" +} + +$releaseUrl = "https://github.com/$repo/releases/download/v$Version" +$downloadDir = Join-Path ([IO.Path]::GetTempPath()) ("codedb-install-" + [guid]::NewGuid().ToString("N")) +$targetPath = Join-Path $InstallDir "codedb.exe" +$stagedPath = Join-Path $InstallDir ("codedb.exe.new." + $PID) +$previousPath = $null + +try { + New-Item -ItemType Directory -Force -Path $downloadDir, $InstallDir | Out-Null + Get-ChildItem -LiteralPath $InstallDir -Filter "codedb.exe.old.*" -File -ErrorAction SilentlyContinue | + Remove-Item -Force -ErrorAction SilentlyContinue + + $downloadedBinary = Join-Path $downloadDir $assetName + $downloadedChecksums = Join-Path $downloadDir "checksums.sha256" + + Write-Host "codedb installer" + Write-Host " version v$Version" + Write-Host " install $InstallDir" + Write-Host " download $assetName" + + Invoke-WebRequest -UseBasicParsing ` + -Headers @{ "User-Agent" = "codedb-installer" } ` + "$releaseUrl/$assetName" ` + -OutFile $downloadedBinary + Invoke-WebRequest -UseBasicParsing ` + -Headers @{ "User-Agent" = "codedb-installer" } ` + "$releaseUrl/checksums.sha256" ` + -OutFile $downloadedChecksums + + $checksumLine = Get-Content -LiteralPath $downloadedChecksums | + Where-Object { $_ -match "\s\*?$([regex]::Escape($assetName))$" } | + Select-Object -First 1 + if (-not $checksumLine) { + throw "Release v$Version has no checksum for $assetName" + } + + $expectedHash = ($checksumLine -split '\s+')[0] + if ($expectedHash -notmatch '^[0-9a-fA-F]{64}$') { + throw "Release v$Version contains an invalid checksum for $assetName" + } + + $actualHash = (Get-FileHash -LiteralPath $downloadedBinary -Algorithm SHA256).Hash + if ($actualHash -ne $expectedHash.ToUpperInvariant()) { + throw "SHA256 mismatch for $assetName" + } + Write-Host " verify SHA256 OK" + + Copy-Item -LiteralPath $downloadedBinary -Destination $stagedPath -Force + Unblock-File -LiteralPath $stagedPath -ErrorAction SilentlyContinue + if (Test-Path -LiteralPath $targetPath -PathType Leaf) { + $previousPath = Join-Path $InstallDir ("codedb.exe.old." + [guid]::NewGuid().ToString("N")) + Move-Item -LiteralPath $targetPath -Destination $previousPath + } + try { + Move-Item -LiteralPath $stagedPath -Destination $targetPath -Force + & $targetPath --version + if ($LASTEXITCODE -ne 0) { + throw "Installed codedb failed its version check" + } + } catch { + Remove-Item -LiteralPath $targetPath -Force -ErrorAction SilentlyContinue + if ($previousPath -and + (Test-Path -LiteralPath $previousPath -PathType Leaf) -and + -not (Test-Path -LiteralPath $targetPath)) { + Move-Item -LiteralPath $previousPath -Destination $targetPath + $previousPath = $null + } + throw + } + if ($previousPath) { + Remove-Item -LiteralPath $previousPath -Force -ErrorAction SilentlyContinue + if (-not (Test-Path -LiteralPath $previousPath)) { + $previousPath = $null + } + } + + if (-not $NoPath) { + $userPath = [Environment]::GetEnvironmentVariable("Path", "User") + $pathEntries = @($userPath -split ';' | Where-Object { $_ }) + $alreadyOnPath = $false + foreach ($entry in $pathEntries) { + if ($entry.TrimEnd("\") -ieq $InstallDir.TrimEnd("\")) { + $alreadyOnPath = $true + break + } + } + if (-not $alreadyOnPath) { + $newUserPath = if ($userPath) { + $userPath.TrimEnd(';') + ';' + $InstallDir + } else { + $InstallDir + } + [Environment]::SetEnvironmentVariable("Path", $newUserPath, "User") + Write-Host " PATH added for future terminals" + } + } + + if (-not (($env:PATH -split ';') | Where-Object { $_.TrimEnd("\") -ieq $InstallDir.TrimEnd("\") })) { + $env:PATH = "$InstallDir;$env:PATH" + } + + Write-Host "" + Write-Host "Installed: $targetPath" + Write-Host "MCP command: $targetPath mcp" +} finally { + Remove-Item -LiteralPath $stagedPath -Force -ErrorAction SilentlyContinue + Remove-Item -LiteralPath $downloadDir -Recurse -Force -ErrorAction SilentlyContinue +} diff --git a/install/install.sh b/install/install.sh index 3acb53ec..3bd8b780 100644 --- a/install/install.sh +++ b/install/install.sh @@ -34,15 +34,19 @@ detect_platform() { Darwin) os="darwin" ;; Linux) os="linux" ;; MINGW*|MSYS*|CYGWIN*) - echo "" - printf " ${W}codedb installer${N}\n" - echo "" - printf " ${Y}Windows detected${N} — codedb is a native Linux/macOS binary.\n" - printf " Run this inside ${G}WSL2${N} instead:\n" - echo "" - printf " ${C}wsl curl -fsSL https://codedb.codegraff.com/install.sh | bash${N}\n" - echo "" - exit 0 + { + echo "" + printf " ${W}codedb installer${N}\n" + echo "" + printf " ${Y}Windows detected${N} — codedb has a native Windows x86_64 binary.\n" + printf " This Bash installer is for macOS/Linux. Run this in PowerShell:\n" + echo "" + printf " ${C}irm https://raw.githubusercontent.com/justrach/codedb/main/install/install.ps1 | iex${N}\n" + echo "" + printf " Use ${G}WSL2${N} only if you want the Linux binary inside WSL.\n" + echo "" + } >&2 + return 10 ;; *) printf " ${R}Unsupported OS: $os${N}\n" >&2; exit 1 ;; esac @@ -378,8 +382,14 @@ print_hook_notes() { } main() { - local platform version ext="" - platform="$(detect_platform)" + local platform version ext="" detect_status + if platform="$(detect_platform)"; then + : + else + detect_status=$? + [[ "$detect_status" -eq 10 ]] && return 0 + exit "$detect_status" + fi echo "" printf " ${W}codedb${N} ${D}installer${N}\n" diff --git a/npm/README.md b/npm/README.md index ceb2828f..d91bef6e 100644 --- a/npm/README.md +++ b/npm/README.md @@ -34,6 +34,8 @@ codedb mcp ### Claude Desktop +On macOS/Linux: + ```json { "mcpServers": { @@ -45,6 +47,19 @@ codedb mcp } ``` +On Windows: + +```json +{ + "mcpServers": { + "codedb": { + "command": "npx.cmd", + "args": ["-y", "codedeebee", "mcp"] + } + } +} +``` + ## How it works `postinstall` downloads the matching native binary from the corresponding [GitHub Release](https://github.com/justrach/codedb/releases) and verifies it against `checksums.sha256`. The `codedb` command is a thin Node launcher that execs the native binary, preserving `cwd`, stdio, args, and environment. @@ -55,12 +70,24 @@ codedb mcp |--------|----------------------| | macOS | arm64, x64 (Intel) | | Linux | arm64, x64 | +| Windows | x64 | + +On Windows, the package downloads `codedb-windows-x86_64.exe`, installs it as `vendor/codedb.exe`, and launches it through the same `codedb` command used on other platforms. -Windows is not yet supported. Comment on [issue #501](https://github.com/justrach/codedb/issues/501) if you need it. +Windows support begins with `codedeebee` 0.2.5830. If `npm view codedeebee version` reports an older release, use the checksum-verified direct Windows installation in the root [README](https://github.com/justrach/codedb#windows) until the current package is published. + +## Updating on Windows + +The native Windows binary cannot self-update yet. Update the npm package instead: + +```powershell +npm install -g codedeebee@latest +codedb --version +``` ## Skipping the binary download -For sandboxed installs (or environments without GitHub access), set `CODEDEEBEE_SKIP_POSTINSTALL=1`. The package will install successfully but `codedb` will exit until a binary is placed at `node_modules/codedeebee/vendor/codedb`. +For sandboxed installs (or environments without GitHub access), set `CODEDEEBEE_SKIP_POSTINSTALL=1`. The package will install successfully but `codedb` will exit until a binary is placed at `node_modules/codedeebee/vendor/codedb` (`codedb.exe` on Windows). ## Links diff --git a/website/app/install_script.sh b/website/app/install_script.sh index 93676d5a..89edbd15 100644 --- a/website/app/install_script.sh +++ b/website/app/install_script.sh @@ -16,15 +16,19 @@ detect_platform() { Darwin) os="darwin" ;; Linux) os="linux" ;; MINGW*|MSYS*|CYGWIN*) - echo "" - printf " ${W}codedb installer${N}\n" - echo "" - printf " ${Y}Windows detected${N} — codedb is a native Linux/macOS binary.\n" - printf " Run this inside ${G}WSL2${N} instead:\n" - echo "" - printf " ${C}wsl curl -fsSL https://codedb.codegraff.com/install.sh | bash${N}\n" - echo "" - exit 0 + { + echo "" + printf " ${W}codedb installer${N}\n" + echo "" + printf " ${Y}Windows detected${N} — codedb has a native Windows x86_64 binary.\n" + printf " This Bash installer is for macOS/Linux. Run this in PowerShell:\n" + echo "" + printf " ${C}irm https://raw.githubusercontent.com/justrach/codedb/main/install/install.ps1 | iex${N}\n" + echo "" + printf " Use ${G}WSL2${N} only if you want the Linux binary inside WSL.\n" + echo "" + } >&2 + return 10 ;; *) printf " ${R}Unsupported OS: $os${N}\n" >&2; exit 1 ;; esac @@ -165,8 +169,14 @@ print_hook_notes() { } main() { - local platform version ext="" - platform="$(detect_platform)" + local platform version ext="" detect_status + if platform="$(detect_platform)"; then + : + else + detect_status=$? + [[ "$detect_status" -eq 10 ]] && return 0 + exit "$detect_status" + fi echo "" printf " ${W}codedb${N} ${D}installer${N}\n" diff --git a/website/app/layout.zig b/website/app/layout.zig index 6f36c5b9..584bdc71 100644 --- a/website/app/layout.zig +++ b/website/app/layout.zig @@ -28,7 +28,7 @@ pub fn wrap(allocator: std.mem.Allocator, path: []const u8, body: []const u8, me \\ \\ \\ - \\ + \\ \\ ) catch return body; diff --git a/website/app/privacy.zig b/website/app/privacy.zig index 906d57cf..51578ed1 100644 --- a/website/app/privacy.zig +++ b/website/app/privacy.zig @@ -44,7 +44,7 @@ fn page() h.Node { h.h2(.{}, "Network access"), h.p(.{}, "codedb makes zero network requests during normal operation. The MCP server communicates over stdio. The HTTP server binds to localhost only."), - h.p(.{}, "The only network activity is the install script, which downloads the binary from codedb.codegraff.com."), + h.p(.{}, "Installation and updates fetch release metadata, binaries, and checksums from codedb.codegraff.com or GitHub Releases."), h.h2(.{}, "Website telemetry"), h.p(.{}, "This website (codedb.codegraff.com) uses basic analytics to understand traffic patterns. No personal data is collected. No cookies are set. No third-party trackers are loaded."), diff --git a/website/app/quickstart.zig b/website/app/quickstart.zig index ee009a14..f73a96b8 100644 --- a/website/app/quickstart.zig +++ b/website/app/quickstart.zig @@ -20,14 +20,18 @@ 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(.{}, "On macOS and Linux, the installer downloads codedb and auto-registers detected MCP clients:"), h.pre(.{}, \\curl -fsSL https://codedb.codegraff.com/install.sh | bash ), - h.p(.{}, "Supports macOS (ARM64, x86_64) and Linux (ARM64, x86_64). macOS binaries are codesigned and notarized."), + h.p(.{}, "On native Windows x86_64, run the checksum-verifying installer in PowerShell:"), + h.pre(.{}, + \\irm https://raw.githubusercontent.com/justrach/codedb/main/install/install.ps1 | iex + ), + h.p(.{}, "Supports macOS (ARM64, x86_64), Linux (ARM64, x86_64), and Windows (x86_64). macOS ARM64 binaries are codesigned and notarized."), h.h2(.{}, "2. MCP server (recommended)"), - h.p(.{}, "After installing, codedb is automatically registered. Open any project and the 16 MCP tools are available to your AI agent."), + h.p(.{}, "The shell installer registers detected clients automatically. On Windows, configure the client with the absolute path to codedb.exe. Then open a project and the MCP tools are available to your AI agent."), h.pre(.{}, \\# Manual MCP start (auto-configured by install script) \\codedb mcp /path/to/your/project @@ -79,7 +83,7 @@ fn page() h.Node { ), h.h2(.{}, "MCP tools reference"), - h.p(.{}, "16 tools available over the Model Context Protocol:"), + h.p(.{}, "Core tools available over the Model Context Protocol:"), h.table(.{ .class = "status-table" }, .{ h.tbody(.{}, .{ h.tr(.{}, .{ h.td(.{}, .{ h.code(.{}, "codedb_tree") }), h.td(.{}, "Full file tree with language, line counts, symbol counts") }), diff --git a/website/dist/install.sh b/website/dist/install.sh index 93676d5a..89edbd15 100644 --- a/website/dist/install.sh +++ b/website/dist/install.sh @@ -16,15 +16,19 @@ detect_platform() { Darwin) os="darwin" ;; Linux) os="linux" ;; MINGW*|MSYS*|CYGWIN*) - echo "" - printf " ${W}codedb installer${N}\n" - echo "" - printf " ${Y}Windows detected${N} — codedb is a native Linux/macOS binary.\n" - printf " Run this inside ${G}WSL2${N} instead:\n" - echo "" - printf " ${C}wsl curl -fsSL https://codedb.codegraff.com/install.sh | bash${N}\n" - echo "" - exit 0 + { + echo "" + printf " ${W}codedb installer${N}\n" + echo "" + printf " ${Y}Windows detected${N} — codedb has a native Windows x86_64 binary.\n" + printf " This Bash installer is for macOS/Linux. Run this in PowerShell:\n" + echo "" + printf " ${C}irm https://raw.githubusercontent.com/justrach/codedb/main/install/install.ps1 | iex${N}\n" + echo "" + printf " Use ${G}WSL2${N} only if you want the Linux binary inside WSL.\n" + echo "" + } >&2 + return 10 ;; *) printf " ${R}Unsupported OS: $os${N}\n" >&2; exit 1 ;; esac @@ -165,8 +169,14 @@ print_hook_notes() { } main() { - local platform version ext="" - platform="$(detect_platform)" + local platform version ext="" detect_status + if platform="$(detect_platform)"; then + : + else + detect_status=$? + [[ "$detect_status" -eq 10 ]] && return 0 + exit "$detect_status" + fi echo "" printf " ${W}codedb${N} ${D}installer${N}\n" diff --git a/website/dist/privacy.html b/website/dist/privacy.html index 343aa6b8..ab652993 100644 --- a/website/dist/privacy.html +++ b/website/dist/privacy.html @@ -13,7 +13,7 @@ - +