Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ jobs:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
asset: claude-code-setup-linux-x86_64
mcpb: claude-code-setup-linux.mcpb
- os: windows-latest
target: x86_64-pc-windows-msvc
asset: claude-code-setup-windows-x86_64.exe
mcpb: claude-code-setup-windows.mcpb
- os: macos-latest
target: x86_64-apple-darwin
asset: claude-code-setup-macos-x86_64
mcpb: claude-code-setup-macos.mcpb
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -38,6 +41,12 @@ jobs:
- name: Cache cargo
uses: Swatinem/rust-cache@v2

# ubuntu-latest'te `python` komutu yok, yalnizca `python3`.
# setup-python her platformda `python` saglar.
- uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}

Expand All @@ -49,17 +58,15 @@ jobs:
if: runner.os == 'Windows'
run: Copy-Item target/${{ matrix.target }}/release/claude-code-setup.exe ${{ matrix.asset }}

- name: Package Claude Desktop extension (Windows)
if: runner.os == 'Windows'
run: python package-extension.py target/${{ matrix.target }}/release/claude-code-setup.exe claude-code-setup.mcpb

- name: Validate manifest against official MCPB schema
if: runner.os == 'Windows'
run: npx --yes @anthropic-ai/mcpb@latest validate manifest.json

- name: Package Claude Desktop extension
run: python package-extension.py ${{ matrix.asset }} ${{ matrix.mcpb }}

- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
${{ matrix.asset }}
${{ runner.os == 'Windows' && 'claude-code-setup.mcpb' || '' }}
${{ matrix.mcpb }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ settings.local.json

# Uretilen eklenti paketi
*.mcpb

# graphify bilgi grafi ciktilari
graphify-out/
19 changes: 19 additions & 0 deletions .graphifyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Cevirisi olan dosyalar neredeyse birebir ayni dugumleri uretiyor;
# kanonik olanlari (README.md, INSTALLATION.md) tutup gerisini disliyoruz.
README.ar.md
README.en.md
README.es.md
README.ja.md
README.ru.md
README.tr.md
README.zh.md
INSTALLATION.ar.md
INSTALLATION.en.md
INSTALLATION.es.md
INSTALLATION.ja.md
INSTALLATION.ru.md
INSTALLATION.tr.md
INSTALLATION.zh.md

# Grafin kendi ciktisi
graphify-out/
53 changes: 37 additions & 16 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,52 @@ Bu kılavuz, bilgisayarında **Rust veya teknik araçlar kurulu olmayan kullanı

---

## 🚀 HIZLI BAŞLANGIÇ: Claude Code Extension
## 🚀 HIZLI BAŞLANGIÇ

### En Kolay Yol - Extension Installer
Aracı kullanmanın iki yolu var. İkisi birbirinin alternatifi — ikisini de kurmak zorunda değilsin.

### Yol 1 — Claude Desktop eklentisi (önerilen)

Tek dosya indir, sürükle, bitti. Rust, terminal, PATH derdi yok.

1. [Son sürüm sayfasından](https://github.com/Ercaner1988/claude-code-setup-rustified/releases/latest) işletim sistemine uyan paketi indir:
- **Windows** → `claude-code-setup-windows.mcpb`
- **macOS** → `claude-code-setup-macos.mcpb`
- **Linux** → `claude-code-setup-linux.mcpb`
2. Claude Desktop → **Settings → Extensions** ekranını aç.
3. İndirdiğin `.mcpb` dosyasını bu ekrana **sürükleyip bırak**.
4. Claude Desktop eklentiyi kurar ve 8 aracı kullanıma açar.

> Paketler platforma özeldir: her biri yalnızca kendi işletim sisteminin
> ikili dosyasını taşır. Yanlış paketi kurarsan eklenti yüklenir ama çalışmaz.

### Yol 2 — Komut satırı aracı (CLI)

Terminalden `claude-code-setup ...` komutlarını çalıştırmak istiyorsan.

#### Windows (PowerShell)
```powershell
powershell -ExecutionPolicy Bypass -File install-windows.ps1
irm https://raw.githubusercontent.com/Ercaner1988/claude-code-setup-rustified/main/install-windows.ps1 | iex
```

#### macOS (Terminal)
#### macOS / Linux (Terminal)
```bash
bash install-macos.sh
curl -fsSL https://raw.githubusercontent.com/Ercaner1988/claude-code-setup-rustified/main/install-macos.sh | bash
```

**Yapacakları:**
1. ✅ Latest release'i GitHub'dan indir
2. ✅ Sisteme kur
3. ✅ PATH'e ekle
4. ✅ Claude Code extension'ı register et
5. ✅ MCP konfigürasyonu hazırla

**Sonra:**
1. Claude Code Desktop → Settings → Extensions
2. "claude-code-setup" arayın
3. Araçları configure et ve kullan
**Kurucunun yaptıkları:**
1. ✅ Son sürümün ikili dosyasını GitHub'dan indirir
2. ✅ Kullanıcı dizinine kurar (yönetici yetkisi gerekmez)
3. ✅ PATH'e ekler

**Kurucunun YAPMADIĞI:** Claude Desktop eklentisini kaydetmez. Eklenti için
Yol 1'i kullan — ikisi ayrı şeylerdir.

**Doğrulama** (yeni bir terminal penceresi aç, PATH değişikliği eskilerine yansımaz):
```bash
claude-code-setup --version
claude-code-setup status
```

---

Expand Down
35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,32 @@ claude-code-complete-setup/

## 🚀 3. Kurulum ve Yapılandırma

### Hızlı Başlangıç: Claude Code Extension
### Hızlı Başlangıç

İki ayrı kurulum var; hangisini istediğine karar ver.

**Claude Desktop eklentisi (önerilen)** — [son sürümden](https://github.com/Ercaner1988/claude-code-setup-rustified/releases/latest) işletim sistemine uyan paketi indir, Claude Desktop → Settings → Extensions ekranına sürükle:

| İşletim sistemi | Dosya |
|---|---|
| Windows | `claude-code-setup-windows.mcpb` |
| macOS | `claude-code-setup-macos.mcpb` |
| Linux | `claude-code-setup-linux.mcpb` |

**Komut satırı aracı** — terminalden kullanmak istersen:

#### Windows x64
```powershell
powershell -ExecutionPolicy Bypass -File install-windows.ps1
irm https://raw.githubusercontent.com/Ercaner1988/claude-code-setup-rustified/main/install-windows.ps1 | iex
```

#### macOS x64
```bash
bash install-macos.sh
curl -fsSL https://raw.githubusercontent.com/Ercaner1988/claude-code-setup-rustified/main/install-macos.sh | bash
```

Installerlar otomatik olarak:
1. Latest release'i indir
2. Sisteme kur
3. PATH'e ekle
4. MCP yapılandırması yap
5. Claude Code extension'ı register et

👉 **Ardından:**
- Claude Code Desktop → Settings → Extensions
- "claude-code-setup" arayın
- "Configure" tıklayıp araçları gördüğünü doğrula
Kurucu ikili dosyayı kullanıcı dizinine kurup PATH'e ekler (yönetici yetkisi
gerekmez). Eklentiyi **kaydetmez** — eklenti için yukarıdaki `.mcpb` yolunu
kullan. Doğrulama için yeni bir terminalde `claude-code-setup status`.


Detaylı kurulum için bkz. [INSTALLATION.md](INSTALLATION.md)

Expand Down
28 changes: 20 additions & 8 deletions install-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ echo -e "${CYAN}📦 Installing to: $INSTALL_DIR${NC}"
# Fetch latest release
echo -e "${YELLOW}📥 Fetching latest release...${NC}"
API_RESPONSE=$(curl -s "https://api.github.com/repos/Ercaner1988/claude-code-setup-rustified/releases/latest")
LATEST_TAG=$(echo "$API_RESPONSE" | grep -o '"tag_name":"[^"]*' | head -1 | cut -d'"' -f4)
LATEST_TAG=$(echo "$API_RESPONSE" | grep -o '"tag_name": *"[^"]*' | head -1 | cut -d'"' -f4)

if [[ -z "$LATEST_TAG" ]]; then
echo -e "${RED}❌ Could not fetch latest release${NC}"
Expand All @@ -49,15 +49,27 @@ fi

echo -e "${GREEN} Found: $LATEST_TAG${NC}"

# Find macOS x64 asset
MACOS_URL=$(echo "$API_RESPONSE" | grep -o '"browser_download_url":"[^"]*macos-x86_64[^"]*' | head -1 | cut -d'"' -f4)

if [[ -z "$MACOS_URL" ]]; then
echo -e "${RED}❌ macOS x64 binary not found in release${NC}"
# Pick the asset for THIS operating system. Bu betik hem macOS hem Linux icin
# kullaniliyor; macOS ikilisini sabitlemek Linux'ta "cannot execute binary
# file" hatasi veriyordu.
case "$(uname -s)" in
Darwin) ASSET_MARKER="macos-x86_64"; OS_LABEL="macOS" ;;
Linux) ASSET_MARKER="linux-x86_64"; OS_LABEL="Linux" ;;
*)
echo "Unsupported operating system: $(uname -s)"
echo "Supported: macOS, Linux. On Windows use install-windows.ps1."
exit 1
;;
esac

DOWNLOAD_URL=$(echo "$API_RESPONSE" | grep -o "\"browser_download_url\": *\"[^\"]*${ASSET_MARKER}[^\"]*" | head -1 | cut -d'"' -f4)

if [[ -z "$DOWNLOAD_URL" ]]; then
echo "${OS_LABEL} x64 binary not found in release"
exit 1
fi

BINARY_NAME=$(basename "$MACOS_URL")
BINARY_NAME=$(basename "$DOWNLOAD_URL")
echo -e "${GREEN} Binary: $BINARY_NAME${NC}"

# Create install directory
Expand All @@ -67,7 +79,7 @@ echo -e "${GREEN}✅ Created directory: $INSTALL_DIR${NC}"
# Download binary
BINARY_PATH="$INSTALL_DIR/claude-code-setup"
echo -e "${YELLOW}⬇️ Downloading binary...${NC}"
curl -L "$MACOS_URL" -o "$BINARY_PATH"
curl -L "$DOWNLOAD_URL" -o "$BINARY_PATH"
echo -e "${GREEN}✅ Downloaded: $BINARY_PATH${NC}"

# Make executable
Expand Down
7 changes: 1 addition & 6 deletions install-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Usage: powershell -ExecutionPolicy Bypass -File install-windows.ps1

param(
[string]$InstallDir = "$env:PROGRAMFILES\ClaudeCodeSetup",
[string]$InstallDir = "$env:LOCALAPPDATA\Programs\ClaudeCodeSetup",
[switch]$SkipConfig
)

Expand Down Expand Up @@ -50,11 +50,6 @@ if ($pathEnv -notlike "*$InstallDir*") {
Write-Host "✅ Added to PATH" -ForegroundColor Green
}

# Make executable
Write-Host "🔐 Setting permissions..." -ForegroundColor Yellow
icacls $exePath /grant:r "$env:USERNAME`:(F)" /inheritance:e /T | Out-Null
Write-Host "✅ Executable set" -ForegroundColor Green

# Run install command (optional config)
if (-not $SkipConfig) {
Write-Host ""
Expand Down
40 changes: 35 additions & 5 deletions package-extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,36 @@
"""Claude Desktop eklenti paketi (.mcpb) uretir.

Kullanim: python package-extension.py <binary-yolu> [cikti.mcpb]
.mcpb = manifest.json'u kokunde tutan bir ZIP arsivi.

.mcpb = manifest.json'u kokunde tutan bir ZIP arsivi. Paket tek bir ikili
dosya tasiyor, dolayisiyla tek bir platforma aittir: manifest'in
entry_point'i ve compatibility.platforms alani verilen binary'ye gore
yeniden yazilir. Aksi halde paket uc platformu destekledigini iddia edip
icinde yalnizca Windows exe'si tasir ve Mac'te bozuk kurulur.
"""
import json
import pathlib
import sys
import zipfile

ROOT = pathlib.Path(__file__).parent
EXTRAS = ["manifest.json", "icon.png", "README.md", "LICENSE"]
EXTRAS = ["icon.png", "README.md", "LICENSE"]

# binary adindaki platform imi -> manifest platform kimligi
PLATFORM_BY_SUFFIX = {
"windows": "win32",
"macos": "darwin",
"linux": "linux",
}


def platform_of(binary: pathlib.Path) -> str:
name = binary.name.lower()
for marker, platform in PLATFORM_BY_SUFFIX.items():
if marker in name:
return platform
# Yerel derlemeler (target/release/...) icin uzantiya gore tahmin et
return "win32" if binary.suffix == ".exe" else sys.platform


def main() -> int:
Expand All @@ -24,10 +45,18 @@ def main() -> int:
return 1

manifest = json.loads((ROOT / "manifest.json").read_text(encoding="utf-8"))
entry = manifest["server"]["entry_point"]
out = pathlib.Path(sys.argv[2]) if len(sys.argv) > 2 else ROOT / f"{manifest['name']}-{manifest['version']}.mcpb"
platform = platform_of(binary)
entry = "claude-code-setup.exe" if platform == "win32" else "claude-code-setup"

manifest["server"]["entry_point"] = entry
manifest["server"]["mcp_config"]["command"] = "${__dirname}/" + entry
manifest.setdefault("compatibility", {})["platforms"] = [platform]

default_name = f"{manifest['name']}-{manifest['version']}-{platform}.mcpb"
out = pathlib.Path(sys.argv[2]) if len(sys.argv) > 2 else ROOT / default_name

with zipfile.ZipFile(out, "w", zipfile.ZIP_DEFLATED) as z:
z.writestr("manifest.json", json.dumps(manifest, indent=2, ensure_ascii=False))
for name in EXTRAS:
path = ROOT / name
if path.is_file():
Expand All @@ -36,7 +65,8 @@ def main() -> int:
print(f"UYARI: atlandi (yok): {name}")
z.write(binary, entry)

print(f"OK: {out} ({out.stat().st_size / 1_048_576:.1f} MB, entry_point={entry})")
size = out.stat().st_size / 1_048_576
print(f"OK: {out} ({size:.1f} MB, platform={platform}, entry_point={entry})")
return 0


Expand Down
4 changes: 0 additions & 4 deletions src/mcp_server.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
use serde_json::json;
use std::io::{self, BufRead, Write};

#[derive(Debug)]
pub struct McpServer;

#[derive(Debug, serde::Deserialize)]
pub struct JsonRpcRequest {
pub jsonrpc: String,
pub id: serde_json::Value,
pub method: String,
#[serde(default)]
Expand Down
Loading