An open-source, faster Devin alternative
TypeScript
docs: replace broken CLI install one-liner with no-sudo installer script (#151)
Mohamed Habibfddca8fa7813
diff --git a/docs/guides/agent-skill.mdx b/docs/guides/agent-skill.mdxindex 679ee376..10fb1cd0 100644--- a/docs/guides/agent-skill.mdx+++ b/docs/guides/agent-skill.mdx@@ -18,7 +18,7 @@ This works with Claude Code, Codex, Cursor, and any agent that supports the [AgeThe `oc` CLI must be installed and configured:```bash-curl -fsSL https://github.com/diggerhq/opencomputer/releases/latest/download/oc-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') -o /usr/local/bin/oc && chmod +x /usr/local/bin/oc+curl -fsSL https://raw.githubusercontent.com/diggerhq/opencomputer/main/scripts/install.sh | bashoc config set api-key YOUR_API_KEY```diff --git a/docs/introduction.mdx b/docs/introduction.mdxindex 6554d86a..00a8a979 100644--- a/docs/introduction.mdx+++ b/docs/introduction.mdx@@ -33,8 +33,8 @@ pip install opencomputer-sdk``````bash CLI-# See cli/overview for platform-specific install-curl -fsSL https://github.com/diggerhq/opencomputer/releases/latest/download/oc-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') -o /usr/local/bin/oc && chmod +x /usr/local/bin/oc+# Installs to ~/.local/bin (no sudo). See cli/overview for manual install.+curl -fsSL https://raw.githubusercontent.com/diggerhq/opencomputer/main/scripts/install.sh | bash```</CodeGroup>diff --git a/scripts/install.sh b/scripts/install.shnew file mode 100755index 00000000..d7981aca--- /dev/null+++ b/scripts/install.sh@@ -0,0 +1,39 @@+#!/usr/bin/env bash+set -euo pipefail++REPO="diggerhq/opencomputer"+BIN_NAME="oc"+INSTALL_DIR="${OC_INSTALL_DIR:-$HOME/.local/bin}"++os="$(uname -s | tr '[:upper:]' '[:lower:]')"+arch="$(uname -m)"+case "$arch" in+ x86_64|amd64) arch="amd64" ;;+ aarch64|arm64) arch="arm64" ;;+ *) echo "Unsupported architecture: $arch" >&2; exit 1 ;;+esac++case "$os" in+ linux|darwin) ;;+ *) echo "Unsupported OS: $os" >&2; exit 1 ;;+esac++url="https://github.com/${REPO}/releases/latest/download/${BIN_NAME}-${os}-${arch}"+target="${INSTALL_DIR}/${BIN_NAME}"++mkdir -p "$INSTALL_DIR"+echo "Downloading $url"+curl -fsSL "$url" -o "$target"+chmod +x "$target"++echo "Installed ${BIN_NAME} to ${target}"++case ":$PATH:" in+ *":$INSTALL_DIR:"*) ;;+ *)+ echo+ echo "warning: $INSTALL_DIR is not on your PATH."+ echo "Add it by appending this line to your shell rc file (~/.bashrc, ~/.zshrc):"+ echo " export PATH=\"$INSTALL_DIR:\$PATH\""+ ;;+esac