Installation
Lima cara menjalankan OpenCrabs.
Quick install (Linux and macOS)
The fastest path. One command resolves the latest release, checks your platform, verifies the download against the published SHA256SUMS, installs opencrabs and the rtk helper, and installs the system libraries the Linux build needs.
curl -fsSL https://opencrabs.com/install.sh | bash
Di Windows, pakai PowerShell:
iwr -useb https://opencrabs.com/install.ps1 | iex
Di macOS CLI adalah symlink ke dalam ~/Applications/OpenCrabs.app, karena ikon butuh bundle untuk tinggal. Di Linux ia terpasang di /usr/local/bin kalau direktori itu bisa ditulis, kalau tidak di ~/.local/bin, dan ia meminta sudo saat targetnya butuh. Kalau direktori instalasi tidak ada di PATH-mu, skrip menulis entri ke file startup shell supaya terminal berikutnya bisa menjalankan opencrabs; lewati dengan --no-path untuk membiarkan file shell-mu apa adanya. Ia menolak memasang kalau glibc lebih tua dari 2.38 (Ubuntu 24.04+, Debian 13+, Fedora 39+) atau kalau sistem memakai musl, dan ia menyebut paket yang harus dipasang alih-alih gagal diam-diam.
Flags go after bash -s -- when you pipe the script:
| Flag | Effect |
|---|---|
--dry-run | Print the plan, download nothing |
--version <tag> | Install a specific release instead of the latest |
--dir <path> | Install into a different directory |
--no-deps | Biarkan package manager sistem |
--no-path | Jangan tulis entri PATH ke file startup shell kamu |
--no-launch | Do not start OpenCrabs when the install finishes |
Both scripts are plain shell and PowerShell, readable before you run them: install.sh and install.ps1.
The installer starts OpenCrabs for you when it finishes, so a one-liner ends in the chat rather than in an instruction to type a second command. It only does that when a terminal is actually attached: a piped run, a redirected console, or CI keeps the old Run: opencrabs advice, because a TUI cannot draw into a log file. Pass --no-launch or -NoLaunch to install without starting it.
Cara 1: Homebrew (disarankan di macOS dan Linux)
brew install opencrabs
OpenCrabs ada di homebrew-core. Homebrew mengirim paket siap pakai untuk Mac Apple Silicon (macOS 15 dan lebih baru) serta Linux amd64 dan arm64, jadi tidak perlu toolchain Rust di sana. Di Mac Intel, Homebrew membangunnya dari sumber; pakai biner macos-amd64 kalau kamu lebih suka melewati proses build.
Jalankan opencrabs setelah instalasi. Langsung masuk ke chat dengan provider bawaannya sudah aktif, jadi crab menyapa Anda dan Anda bisa mulai bicara. Jalankan opencrabs --onboard kalau Anda mau wizard penyiapan.
Cara 2: Unduh Biner (semua platform)
Ambil biner siap pakai dari GitHub Releases.
Linux (amd64)
Satu baris dengan sengaja: blok tempelan yang penetapan TAG=-nya jalan sendiri, atau yang baris barunya meluncurkan biner sebelum unduhan selesai, adalah kegagalan yang justru dihindari bentuk ini.
sudo apt update && sudo apt install -y curl jq libgomp1 && TAG=$(curl -sL https://api.github.com/repos/opencrabs/opencrabs/releases/latest | jq -r .tag_name) && D=$(mktemp -d) && curl -fsSL "https://github.com/opencrabs/opencrabs/releases/download/${TAG}/opencrabs-${TAG}-linux-amd64.tar.gz" | tar xz -C "$D" && sudo install -m 755 "$D/opencrabs" "$D/rtk" /usr/local/bin/ && command -v opencrabs && opencrabs --version
Linux (arm64)
sudo apt update && sudo apt install -y curl jq libgomp1 && TAG=$(curl -sL https://api.github.com/repos/opencrabs/opencrabs/releases/latest | jq -r .tag_name) && D=$(mktemp -d) && curl -fsSL "https://github.com/opencrabs/opencrabs/releases/download/${TAG}/opencrabs-${TAG}-linux-arm64.tar.gz" | tar xz -C "$D" && sudo install -m 755 "$D/opencrabs" "$D/rtk" /usr/local/bin/ && command -v opencrabs && opencrabs --version
macOS (arm64 / Apple Silicon)
Arsip macOS berisi OpenCrabs.app, bukan biner lepas, karena macOS hanya membaca ikon aplikasi dari bundle. Jadi jalur manual menyalin biner dari dalam bundle dan membuat symlink CLI.
D=$(mktemp -d) && TAG=$(curl -sL https://api.github.com/repos/opencrabs/opencrabs/releases/latest | jq -r .tag_name) && curl -fsSL "https://github.com/opencrabs/opencrabs/releases/download/${TAG}/opencrabs-${TAG}-macos-arm64.tar.gz" | tar xz -C "$D" && mkdir -p ~/Applications && cp -R "$D/OpenCrabs.app" ~/Applications/ && sudo mkdir -p /usr/local/bin && sudo ln -sf ~/Applications/OpenCrabs.app/Contents/MacOS/opencrabs /usr/local/bin/opencrabs && command -v opencrabs && opencrabs --version
Jangan jalankan ./opencrabs setelah mengekstrak arsip macOS. File itu tidak ada di sana, dan mencarinya adalah cara instruksi lama membuang waktu orang.
Windows
The one-liner installs every file the release archive ships, which is opencrabs.exe, rtk.exe and the four MSVC runtime DLLs beside them, into %LOCALAPPDATA%\OpenCrabs\bin, and adds that folder to your user PATH, so opencrabs resolves from any new terminal. The DLLs are what let the exe start on a machine that never installed Visual Studio or the vc_redistributable:
iwr -useb https://opencrabs.com/install.ps1 | iex
Untuk meneruskan flag, bangun script block, karena pipe langsung ke iex menelannya:
& ([scriptblock]::Create((iwr -useb https://opencrabs.com/install.ps1))) -Dir "$env:USERPROFILE\bin"
| Flag | Effect |
|---|---|
-DryRun | Print the plan, download nothing |
-Version <tag> | Install a specific release instead of the latest |
-Dir <path> | Pasang ke direktori lain (default %LOCALAPPDATA%\OpenCrabs\bin) |
-NoPathUpdate | Pasang biner tapi biarkan PATH pengguna tidak diubah |
-NoLaunch | Install the binaries but do not start OpenCrabs at the end |
-Help | Tampilkan bantuan skrip itu sendiri |
The Windows zip carries opencrabs.exe, rtk.exe and the four MSVC runtime DLLs beside them, and Expand-Archive keeps them together in the destination, so the manual route only has to pick a directory and add it to PATH itself. This is that whole route on one line:
$tag = (Invoke-RestMethod https://api.github.com/repos/opencrabs/opencrabs/releases/latest).tag_name; $ProgressPreference = 'SilentlyContinue'; $dest = "$env:LOCALAPPDATA\OpenCrabs\bin"; Invoke-WebRequest "https://github.com/opencrabs/opencrabs/releases/download/$tag/opencrabs-$tag-windows-amd64.zip" -OutFile "$env:TEMP\opencrabs.zip" -UseBasicParsing; Expand-Archive "$env:TEMP\opencrabs.zip" -DestinationPath $dest -Force; [Environment]::SetEnvironmentVariable('Path', "$dest;" + [Environment]::GetEnvironmentVariable('Path','User'), 'User'); $env:Path = "$dest;$env:Path"; Get-Command opencrabs; opencrabs --version
Expand-Archive -DestinationPath . adalah yang dikatakan instruksi lama, dan itulah sebabnya orang berakhir dengan opencrabs.exe di folder mana pun mereka berada saat itu.
Ia langsung masuk ke chat dengan provider bawaannya sudah aktif. Jalankan opencrabs --onboard kalau Anda mau wizard penyiapan.
Windows adalah platform kelas satu (v0.5.3): penanganan shell yang sadar platform, pembacaan BOM/UTF-16 dan fallback tilde/cwd bawaan, dan CI membangun Windows di setiap PR (#627).
Verifikasi unduhan Anda (opsional): setiap rilis menerbitkan file
SHA256SUMSbersama tarball-nya.
Perlu izin terminal. OpenCrabs membaca/menulis brain files, konfigurasi, dan file proyek. Aplikasi terminal Anda butuh akses sistem file atau OS akan memblokir operasi.
OS Yang perlu dilakukan macOS Pengaturan Sistem → Privasi & Keamanan → Akses Disk Penuh → nyalakan aplikasi terminal Anda (Alacritty, iTerm2, Terminal, dll.). Jika tidak ada di daftar, klik “+” dan tambahkan dari /Applications/. Tanpa ini, macOS terus-menerus memunculkan “ingin mengakses data dari aplikasi lain”.Windows Jalankan terminal (Windows Terminal, PowerShell, cmd) sebagai Administrator saat pertama kali, atau beri terminal akses tulis ke %USERPROFILE%\.opencrabs\dan direktori proyek Anda. Windows Defender juga mungkin bertanya, klik “Izinkan”.Linux Pastikan user Anda memiliki ~/.opencrabs/dan direktori proyek. Di sistem SELinux/AppArmor, proses terminal butuh akses baca/tulis ke path tersebut. Terminal Flatpak/Snap mungkin perlu--filesystem=homeatau izin setara.
/rebuildbekerja bahkan dengan biner siap pakai: ia meng-klon sumber ke~/.opencrabs/source/saat pertama dipakai, lalu membangun dan hot-restart.
Cara 3: Bangun dari Sumber
Diperlukan untuk /rebuild, menambah tools kustom, atau memodifikasi agen.
Penyiapan cepat (disarankan)
Skrip penyiapan otomatis mendeteksi platform Anda (macOS, Debian/Ubuntu, Fedora/RHEL, Arch) dan memasang semua dependensi build + Rust:
# Install all dependencies
curl -fsSL https://raw.githubusercontent.com/opencrabs/opencrabs/main/src/scripts/setup.sh | bash
# Clone and build
git clone https://github.com/opencrabs/opencrabs.git
cd opencrabs
cargo build --release
./target/release/opencrabs
Penyiapan manual
Jika Anda lebih suka memasang dependensi sendiri:
- Rust stable: pasang Rust. Toolchain stable bekerja sejak v0.2.85
- Kunci API dari minimal satu provider yang didukung
- SQLite (di-bundle lewat rusqlite)
- macOS:
brew install cmake pkg-config - Debian/Ubuntu:
sudo apt install build-essential pkg-config libssl-dev cmake - Fedora/RHEL:
sudo dnf install gcc gcc-c++ make pkg-config openssl-devel cmake - Arch:
sudo pacman -S base-devel pkg-config openssl cmake
git clone https://github.com/opencrabs/opencrabs.git
cd opencrabs
cargo build --release
./target/release/opencrabs
OpenCrabs memakai
keys.tomlalih-alih.envuntuk kunci API. Wizard onboarding akan membantu menyiapkannya, atau edit~/.opencrabs/keys.tomllangsung.
Cara 4: Docker
Jalankan OpenCrabs dalam kontainer terisolasi. Build memakan ~15 menit (Rust release + LTO).
git clone https://github.com/opencrabs/opencrabs.git
cd opencrabs
docker compose -f src/docker/compose.yml up --build
Konfigurasi, workspace, dan DB memori bertahan di volume Docker lintas restart. Kunci API di keys.toml dipasang ke kontainer saat runtime, tidak pernah dibakar ke dalam image.
Mulai Otomatis saat Boot
Jaga OpenCrabs berjalan sebagai daemon latar belakang yang menyala bersama sistem Anda.
Linux (systemd)
The binary writes the unit itself, so the file cannot drift from the version you are running:
opencrabs service install
That writes ~/.config/systemd/user/opencrabs.service with Type=simple and OOMPolicy=continue, then reloads systemd. Start it with opencrabs service start: a user unit does not come back after a reboot unless lingering is enabled (see below), while a system-wide unit is enabled so it does. OOMPolicy=continue matters because the daemon is the parent of every tool call and cron child: without it, one child killed by the OOM killer stops the whole unit and takes every agent lane with it. The unit name carries the profile when you are not on default, as opencrabs-<profile>.service.
On a headless SSH session the per-user systemd bus is often missing, and the command fails with Failed to connect to bus. Enable lingering so the user service runs without a login, or install a system-wide unit instead:
sudo loginctl enable-linger $(whoami)
# or
sudo opencrabs service install
Manage the daemon with opencrabs service start|stop|restart|status, or with systemctl directly.
Cek status: systemctl --user status opencrabs | Log: journalctl --user -u opencrabs -f
macOS (launchd)
cat > ~/Library/LaunchAgents/com.opencrabs.agent.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.opencrabs.agent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/opencrabs</string>
<string>daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/opencrabs.log</string>
<key>StandardErrorPath</key>
<string>/tmp/opencrabs.err</string>
</dict>
</plist>
EOF
launchctl load ~/Library/LaunchAgents/com.opencrabs.agent.plist
Perbarui path di ProgramArguments agar cocok dengan lokasi instal Anda.
Windows (Task Scheduler)
Daftarkan task terhadap apa yang diresolusikan Get-Command opencrabs, bukan path tebakan. Installer menulis ke %LOCALAPPDATA%\OpenCrabs\bin, jadi %USERPROFILE%\.cargo\bin yang ditulis mati mendaftarkan task yang menunjuk file yang tidak ada: task-nya dibuat, tidak pernah jalan, dan gejalanya terlihat seperti “OpenCrabs tidak autostart” bukan seperti path yang salah.
Win + R→taskschd.msc- Create Basic Task → Nama:
OpenCrabs - Pemicu: When I log on
- Action: Start a program → path yang dicetak
(Get-Command opencrabs).Source, Arguments:daemon - Di Properties > Settings, centang If the task fails, restart every 1 minute
Atau lewat PowerShell, yang meresolusikan path untukmu:
$exe = (Get-Command opencrabs).Source
$action = New-ScheduledTaskAction -Execute $exe -Argument "daemon"
$trigger = New-ScheduledTaskTrigger -AtLogOn
$settings = New-ScheduledTaskSettingsSet -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1)
Register-ScheduledTask -TaskName "OpenCrabs" -Action $action -Trigger $trigger -Settings $settings
opencrabs service install hanya untuk Linux. Di Windows ia melaporkan “not supported on this platform”, dan itulah sebabnya task didaftarkan manual di sini.
Pembaruan
- Pengguna Homebrew:
brew upgrade opencrabs(jika Anda ketik/evolvepada instalasi Homebrew, ia mendelegasikan ke Homebrew, biner tetap dikelola brew, dan tap lama dipensiunkan demi autobump homebrew-core) - Pengguna biner: ketik
/evolvedi TUI untuk mengunduh rilis terbaru - Pengguna sumber:
git pull && cargo build --release, atau ketik/rebuilddi TUI - Pengguna Docker:
docker compose pull && docker compose up -d