Installation
Five ways to get OpenCrabs running.
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
On Windows, use PowerShell:
iwr -useb https://opencrabs.com/install.ps1 | iex
It installs to /usr/local/bin when that directory is writable, otherwise to ~/.local/bin, and prints the export PATH line when the target is not on your PATH yet. It refuses to install when glibc is older than 2.38 (Ubuntu 24.04+, Debian 13+, Fedora 39+) or when the system uses musl, and it names the package to install instead of failing silently.
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 |
Both scripts are plain shell and PowerShell, readable before you run them: install.sh and install.ps1.
Cara 1: Homebrew (disarankan di macOS dan Linux)
brew install opencrabs
OpenCrabs is in homebrew-core. Homebrew ships prebuilt bottles for Apple Silicon Macs (macOS 15 and newer) and for Linux amd64 and arm64, so no Rust toolchain is needed there. On an Intel Mac, Homebrew builds it from source instead; use the macos-amd64 release binary if you’d rather skip the 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)
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)
curl -fsSL "https://github.com/opencrabs/opencrabs/releases/download/${TAG}/opencrabs-${TAG}-linux-amd64.tar.gz" | tar xz
./opencrabs
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)
curl -fsSL "https://github.com/opencrabs/opencrabs/releases/download/${TAG}/opencrabs-${TAG}-linux-arm64.tar.gz" | tar xz
./opencrabs
macOS (arm64 / Apple Silicon)
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
./opencrabs
Windows
$tag = (Invoke-RestMethod https://api.github.com/repos/opencrabs/opencrabs/releases/latest).tag_name
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest "https://github.com/opencrabs/opencrabs/releases/download/$tag/opencrabs-$tag-windows-amd64.zip" -OutFile opencrabs.zip -UseBasicParsing
Expand-Archive opencrabs.zip -DestinationPath . -Force
.\opencrabs.exe
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)
Win + R→taskschd.msc- Create Basic Task → Nama:
OpenCrabs - Pemicu: When I log on
- Aksi: Start a program →
C:\Users\<you>\.cargo\bin\opencrabs.exe, Argumen:daemon - Di Properties > Settings, centang If the task fails, restart every 1 minute
Atau lewat PowerShell:
$action = New-ScheduledTaskAction -Execute "$env:USERPROFILE\.cargo\bin\opencrabs.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
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