Files

1 line
15 KiB
JSON

{"repo": "2045max/octclaw", "files": {"install.sh": {"7baacbe69b15d46eef567ccf2f2183e06a27cac7": {"t": 1785745972.0199833, "n": 2405, "h": "dc35b267f8834121", "c": "#!/usr/bin/env bash\nset -euo pipefail\n\nOCTCLAW_REPO=\"https://github.com/2045max/octclaw.git\"\n\n_info() { printf '[INFO] %s\\n' \"$*\"; }\n_error() { printf '[ERROR] %s\\n' \"$*\" >&2; exit 1; }\n\nmain() {\n _info \"Installing OctClaw...\"\n\n # Check bash version\n [[ ${BASH_VERSINFO[0]} -lt 3 ]] && _error \"Bash 3.2+ required\"\n \n # Check dependencies\n command -v jq &>/dev/null || _error \"jq required. Install: brew install jq (macOS) or apt install jq (Linux)\"\n command -v curl &>/dev/null || _error \"curl required\"\n\n # Download\n local tmp_dir\n tmp_dir=$(mktemp -d)\n trap \"rm -rf '$tmp_dir'\" EXIT\n \n if command -v git &>/dev/null; then\n _info \"Cloning...\"\n git clone --depth 1 \"$OCTCLAW_REPO\" \"$tmp_dir/octclaw\"\n else\n _info \"Downloading tarball...\"\n curl -fsSL \"${OCTCLAW_REPO%.*}/archive/refs/heads/main.tar.gz\" | tar xz -C \"$tmp_dir\"\n mv \"$tmp_dir\"/octclaw-main \"$tmp_dir/octclaw\"\n fi\n\n # Install\n local install_dir=\"${HOME}/.octclaw\"\n mkdir -p \"$install_dir\"\n cp -r \"$tmp_dir/octclaw/lib\" \"$install_dir/\"\n cp \"$tmp_dir/octclaw/cli.sh\" \"$install_dir/\"\n cp \"$tmp_dir/octclaw/oct\" \"$install_dir/\"\n cp \"$tmp_dir/octclaw/.env.example\" \"$install_dir/.env\"\n \n local bin_dir=\"${HOME}/.local/bin\"\n mkdir -p \"$bin_dir\"\n cp \"$tmp_dir/octclaw/oct\" \"$bin_dir/\"\n # Fix OCT_ROOT to point to install_dir instead of bin_dir\n sed -i.bak 's|^OCT_ROOT=.*|OCT_ROOT=\"${HOME}/.octclaw\"|' \"$bin_dir/oct\"\n chmod +x \"$bin_dir/oct\"\n chmod +x \"$install_dir/oct\"\n \n # Init config - Auto-detect API provider\n if [[ ! -f \"$install_dir/config.json\" ]]; then\n local config\n if [[ -n \"${DEEPSEEK_API_KEY:-}\" ]]; then\n config='{\"model\":\"deepseek-chat\",\"api_base\":\"https://api.deepseek.com\"}'\n _info \"检测到DEEPSEEK_API_KEY,使用DeepSeek\"\n elif [[ -n \"${OPENAI_API_KEY:-}\" ]]; then\n config='{\"model\":\"gpt-4o\",\"api_base\":\"https://api.openai.com/v1\"}'\n _info \"检测到OPENAI_API_KEY,使用OpenAI GPT-4o\"\n else\n config='{\"model\":\"deepseek-chat\",\"api_base\":\"https://api.deepseek.com\"}'\n _info \"未检测到API密钥,已设置DeepSeek作为默认\"\n _info \"配置OpenAI: export OPENAI_API_KEY='sk-xxx'\"\n _info \"或配置DeepSeek: export DEEPSEEK_API_KEY='sk-xxx'\"\n fi\n printf \"$config\" > \"$install_dir/config.json\"\n fi\n\n # Add to PATH if needed\n if [[ \":$PATH:\" != *\":${bin_dir}:\"* ]]; then\n _info \"Add to PATH: export PATH=\\\"${bin_dir}:\\$PATH\\\"\"\n fi\n\n _info \"Done! Run: oct -h\"\n}\n\nmain \"$@\"\n"}, "5b768d51fdfd9d65668757cf3bf7642ee09f2545": {"t": 1785758391.0671365, "n": 2405, "h": "dc35b267f8834121", "c": "#!/usr/bin/env bash\nset -euo pipefail\n\nOCTCLAW_REPO=\"https://github.com/2045max/octclaw.git\"\n\n_info() { printf '[INFO] %s\\n' \"$*\"; }\n_error() { printf '[ERROR] %s\\n' \"$*\" >&2; exit 1; }\n\nmain() {\n _info \"Installing OctClaw...\"\n\n # Check bash version\n [[ ${BASH_VERSINFO[0]} -lt 3 ]] && _error \"Bash 3.2+ required\"\n \n # Check dependencies\n command -v jq &>/dev/null || _error \"jq required. Install: brew install jq (macOS) or apt install jq (Linux)\"\n command -v curl &>/dev/null || _error \"curl required\"\n\n # Download\n local tmp_dir\n tmp_dir=$(mktemp -d)\n trap \"rm -rf '$tmp_dir'\" EXIT\n \n if command -v git &>/dev/null; then\n _info \"Cloning...\"\n git clone --depth 1 \"$OCTCLAW_REPO\" \"$tmp_dir/octclaw\"\n else\n _info \"Downloading tarball...\"\n curl -fsSL \"${OCTCLAW_REPO%.*}/archive/refs/heads/main.tar.gz\" | tar xz -C \"$tmp_dir\"\n mv \"$tmp_dir\"/octclaw-main \"$tmp_dir/octclaw\"\n fi\n\n # Install\n local install_dir=\"${HOME}/.octclaw\"\n mkdir -p \"$install_dir\"\n cp -r \"$tmp_dir/octclaw/lib\" \"$install_dir/\"\n cp \"$tmp_dir/octclaw/cli.sh\" \"$install_dir/\"\n cp \"$tmp_dir/octclaw/oct\" \"$install_dir/\"\n cp \"$tmp_dir/octclaw/.env.example\" \"$install_dir/.env\"\n \n local bin_dir=\"${HOME}/.local/bin\"\n mkdir -p \"$bin_dir\"\n cp \"$tmp_dir/octclaw/oct\" \"$bin_dir/\"\n # Fix OCT_ROOT to point to install_dir instead of bin_dir\n sed -i.bak 's|^OCT_ROOT=.*|OCT_ROOT=\"${HOME}/.octclaw\"|' \"$bin_dir/oct\"\n chmod +x \"$bin_dir/oct\"\n chmod +x \"$install_dir/oct\"\n \n # Init config - Auto-detect API provider\n if [[ ! -f \"$install_dir/config.json\" ]]; then\n local config\n if [[ -n \"${DEEPSEEK_API_KEY:-}\" ]]; then\n config='{\"model\":\"deepseek-chat\",\"api_base\":\"https://api.deepseek.com\"}'\n _info \"检测到DEEPSEEK_API_KEY,使用DeepSeek\"\n elif [[ -n \"${OPENAI_API_KEY:-}\" ]]; then\n config='{\"model\":\"gpt-4o\",\"api_base\":\"https://api.openai.com/v1\"}'\n _info \"检测到OPENAI_API_KEY,使用OpenAI GPT-4o\"\n else\n config='{\"model\":\"deepseek-chat\",\"api_base\":\"https://api.deepseek.com\"}'\n _info \"未检测到API密钥,已设置DeepSeek作为默认\"\n _info \"配置OpenAI: export OPENAI_API_KEY='sk-xxx'\"\n _info \"或配置DeepSeek: export DEEPSEEK_API_KEY='sk-xxx'\"\n fi\n printf \"$config\" > \"$install_dir/config.json\"\n fi\n\n # Add to PATH if needed\n if [[ \":$PATH:\" != *\":${bin_dir}:\"* ]]; then\n _info \"Add to PATH: export PATH=\\\"${bin_dir}:\\$PATH\\\"\"\n fi\n\n _info \"Done! Run: oct -h\"\n}\n\nmain \"$@\"\n"}, "1be3f9b1c3814b1c1fea0e6616f41d84928ab5ac": {"t": 1785758395.7971957, "n": 2331, "h": "8c8f41fad864361b", "c": "#!/usr/bin/env bash\nset -euo pipefail\n\nOCTCLAW_REPO=\"https://github.com/2045max/octclaw.git\"\n\n_info() { printf '[INFO] %s\\n' \"$*\"; }\n_error() { printf '[ERROR] %s\\n' \"$*\" >&2; exit 1; }\n\nmain() {\n _info \"Installing OctClaw...\"\n\n # Check bash version\n [[ ${BASH_VERSINFO[0]} -lt 3 ]] && _error \"Bash 3.2+ required\"\n \n # Check dependencies\n command -v jq &>/dev/null || _error \"jq required. Install: brew install jq (macOS) or apt install jq (Linux)\"\n command -v curl &>/dev/null || _error \"curl required\"\n\n # Download\n local tmp_dir\n tmp_dir=$(mktemp -d)\n trap \"rm -rf '$tmp_dir'\" EXIT\n \n if command -v git &>/dev/null; then\n _info \"Cloning...\"\n git clone --depth 1 \"$OCTCLAW_REPO\" \"$tmp_dir/octclaw\"\n else\n _info \"Downloading tarball...\"\n curl -fsSL \"${OCTCLAW_REPO%.*}/archive/refs/heads/main.tar.gz\" | tar xz -C \"$tmp_dir\"\n mv \"$tmp_dir\"/octclaw-main \"$tmp_dir/octclaw\"\n fi\n\n # Install\n local install_dir=\"${HOME}/.octclaw\"\n mkdir -p \"$install_dir\"\n cp -r \"$tmp_dir/octclaw/lib\" \"$install_dir/\"\n cp \"$tmp_dir/octclaw/cli.sh\" \"$install_dir/\"\n cp \"$tmp_dir/octclaw/.env.example\" \"$install_dir/.env\"\n \n local bin_dir=\"${HOME}/.local/bin\"\n mkdir -p \"$bin_dir\"\n cp \"$tmp_dir/octclaw/oct\" \"$bin_dir/\"\n # Fix OCT_ROOT to point to install_dir instead of bin_dir\n sed -i.bak 's|^OCT_ROOT=.*|OCT_ROOT=\"${HOME}/.octclaw\"|' \"$bin_dir/oct\"\n chmod +x \"$bin_dir/oct\"\n \n # Init config - Auto-detect API provider\n if [[ ! -f \"$install_dir/config.json\" ]]; then\n local config\n if [[ -n \"${DEEPSEEK_API_KEY:-}\" ]]; then\n config='{\"model\":\"deepseek-chat\",\"api_base\":\"https://api.deepseek.com\"}'\n _info \"检测到DEEPSEEK_API_KEY,使用DeepSeek\"\n elif [[ -n \"${OPENAI_API_KEY:-}\" ]]; then\n config='{\"model\":\"gpt-4o\",\"api_base\":\"https://api.openai.com/v1\"}'\n _info \"检测到OPENAI_API_KEY,使用OpenAI GPT-4o\"\n else\n config='{\"model\":\"deepseek-chat\",\"api_base\":\"https://api.deepseek.com\"}'\n _info \"未检测到API密钥,已设置DeepSeek作为默认\"\n _info \"配置OpenAI: export OPENAI_API_KEY='sk-xxx'\"\n _info \"或配置DeepSeek: export DEEPSEEK_API_KEY='sk-xxx'\"\n fi\n printf \"$config\" > \"$install_dir/config.json\"\n fi\n\n # Add to PATH if needed\n if [[ \":$PATH:\" != *\":${bin_dir}:\"* ]]; then\n _info \"Add to PATH: export PATH=\\\"${bin_dir}:\\$PATH\\\"\"\n fi\n\n _info \"Done! Run: oct -h\"\n}\n\nmain \"$@\"\n"}, "025ef6ecbe0c07bb094f6384815681231b8f8091": {"t": 1785758397.4012969, "n": 2284, "h": "548976f3957e072c", "c": "#!/usr/bin/env bash\nset -euo pipefail\n\nOCTCLAW_REPO=\"https://github.com/2045max/octclaw.git\"\n\n_info() { printf '[INFO] %s\\n' \"$*\"; }\n_error() { printf '[ERROR] %s\\n' \"$*\" >&2; exit 1; }\n\nmain() {\n _info \"Installing OctClaw...\"\n\n # Check bash version\n [[ ${BASH_VERSINFO[0]} -lt 3 ]] && _error \"Bash 3.2+ required\"\n \n # Check dependencies\n command -v jq &>/dev/null || _error \"jq required. Install: brew install jq (macOS) or apt install jq (Linux)\"\n command -v curl &>/dev/null || _error \"curl required\"\n\n # Download\n local tmp_dir\n tmp_dir=$(mktemp -d)\n trap \"rm -rf '$tmp_dir'\" EXIT\n \n if command -v git &>/dev/null; then\n _info \"Cloning...\"\n git clone --depth 1 \"$OCTCLAW_REPO\" \"$tmp_dir/octclaw\"\n else\n _info \"Downloading tarball...\"\n curl -fsSL \"${OCTCLAW_REPO%.*}/archive/refs/heads/main.tar.gz\" | tar xz -C \"$tmp_dir\"\n mv \"$tmp_dir\"/octclaw-main \"$tmp_dir/octclaw\"\n fi\n\n # Install\n local install_dir=\"${HOME}/.octclaw\"\n mkdir -p \"$install_dir\"\n cp -r \"$tmp_dir/octclaw/lib\" \"$install_dir/\"\n cp \"$tmp_dir/octclaw/.env.example\" \"$install_dir/.env\"\n \n local bin_dir=\"${HOME}/.local/bin\"\n mkdir -p \"$bin_dir\"\n cp \"$tmp_dir/octclaw/oct\" \"$bin_dir/\"\n # Fix OCT_ROOT to point to install_dir instead of bin_dir\n sed -i.bak 's|^OCT_ROOT=.*|OCT_ROOT=\"${HOME}/.octclaw\"|' \"$bin_dir/oct\"\n chmod +x \"$bin_dir/oct\"\n \n # Init config - Auto-detect API provider\n if [[ ! -f \"$install_dir/config.json\" ]]; then\n local config\n if [[ -n \"${DEEPSEEK_API_KEY:-}\" ]]; then\n config='{\"model\":\"deepseek-chat\",\"api_base\":\"https://api.deepseek.com\"}'\n _info \"检测到DEEPSEEK_API_KEY,使用DeepSeek\"\n elif [[ -n \"${OPENAI_API_KEY:-}\" ]]; then\n config='{\"model\":\"gpt-4o\",\"api_base\":\"https://api.openai.com/v1\"}'\n _info \"检测到OPENAI_API_KEY,使用OpenAI GPT-4o\"\n else\n config='{\"model\":\"deepseek-chat\",\"api_base\":\"https://api.deepseek.com\"}'\n _info \"未检测到API密钥,已设置DeepSeek作为默认\"\n _info \"配置OpenAI: export OPENAI_API_KEY='sk-xxx'\"\n _info \"或配置DeepSeek: export DEEPSEEK_API_KEY='sk-xxx'\"\n fi\n printf \"$config\" > \"$install_dir/config.json\"\n fi\n\n # Add to PATH if needed\n if [[ \":$PATH:\" != *\":${bin_dir}:\"* ]]; then\n _info \"Add to PATH: export PATH=\\\"${bin_dir}:\\$PATH\\\"\"\n fi\n\n _info \"Done! Run: oct -h\"\n}\n\nmain \"$@\"\n"}, "e7a4e8355f063be629804b80585601398ea32c75": {"t": 1785758398.8092794, "n": 2150, "h": "5b243daa4ddd33c4", "c": "#!/usr/bin/env bash\nset -euo pipefail\n\nOCTCLAW_REPO=\"https://github.com/2045max/octclaw.git\"\n\n_info() { printf '[INFO] %s\\n' \"$*\"; }\n_error() { printf '[ERROR] %s\\n' \"$*\" >&2; exit 1; }\n\nmain() {\n _info \"Installing OctClaw...\"\n\n # Check bash version\n [[ ${BASH_VERSINFO[0]} -lt 3 ]] && _error \"Bash 3.2+ required\"\n \n # Check dependencies\n command -v jq &>/dev/null || _error \"jq required. Install: brew install jq (macOS) or apt install jq (Linux)\"\n command -v curl &>/dev/null || _error \"curl required\"\n\n # Download\n local tmp_dir\n tmp_dir=$(mktemp -d)\n trap \"rm -rf '$tmp_dir'\" EXIT\n \n if command -v git &>/dev/null; then\n _info \"Cloning...\"\n git clone --depth 1 \"$OCTCLAW_REPO\" \"$tmp_dir/octclaw\"\n else\n _info \"Downloading tarball...\"\n curl -fsSL \"${OCTCLAW_REPO%.*}/archive/refs/heads/main.tar.gz\" | tar xz -C \"$tmp_dir\"\n mv \"$tmp_dir\"/octclaw-main \"$tmp_dir/octclaw\"\n fi\n\n # Install\n local install_dir=\"${HOME}/.octclaw\"\n mkdir -p \"$install_dir\"\n cp -r \"$tmp_dir/octclaw/lib\" \"$install_dir/\"\n cp \"$tmp_dir/octclaw/.env.example\" \"$install_dir/.env\"\n \n local bin_dir=\"${HOME}/.local/bin\"\n mkdir -p \"$bin_dir\"\n cp \"$tmp_dir/octclaw/oct\" \"$bin_dir/\"\n chmod +x \"$bin_dir/oct\"\n \n # Init config - Auto-detect API provider\n if [[ ! -f \"$install_dir/config.json\" ]]; then\n local config\n if [[ -n \"${DEEPSEEK_API_KEY:-}\" ]]; then\n config='{\"model\":\"deepseek-chat\",\"api_base\":\"https://api.deepseek.com\"}'\n _info \"检测到DEEPSEEK_API_KEY,使用DeepSeek\"\n elif [[ -n \"${OPENAI_API_KEY:-}\" ]]; then\n config='{\"model\":\"gpt-4o\",\"api_base\":\"https://api.openai.com/v1\"}'\n _info \"检测到OPENAI_API_KEY,使用OpenAI GPT-4o\"\n else\n config='{\"model\":\"deepseek-chat\",\"api_base\":\"https://api.deepseek.com\"}'\n _info \"未检测到API密钥,已设置DeepSeek作为默认\"\n _info \"配置OpenAI: export OPENAI_API_KEY='sk-xxx'\"\n _info \"或配置DeepSeek: export DEEPSEEK_API_KEY='sk-xxx'\"\n fi\n printf \"$config\" > \"$install_dir/config.json\"\n fi\n\n # Add to PATH if needed\n if [[ \":$PATH:\" != *\":${bin_dir}:\"* ]]; then\n _info \"Add to PATH: export PATH=\\\"${bin_dir}:\\$PATH\\\"\"\n fi\n\n _info \"Done! Run: oct -h\"\n}\n\nmain \"$@\"\n"}, "8165a4bc4c9fc9bc1f7157aa7027d74096db3116": {"t": 1785758400.2119024, "n": 1554, "h": "a0faf9dc1fcd1604", "c": "#!/usr/bin/env bash\nset -euo pipefail\n\nOCTCLAW_REPO=\"https://github.com/2045max/octclaw.git\"\n\n_info() { printf '[INFO] %s\\n' \"$*\"; }\n_error() { printf '[ERROR] %s\\n' \"$*\" >&2; exit 1; }\n\nmain() {\n _info \"Installing OctClaw...\"\n\n # Check bash version\n [[ ${BASH_VERSINFO[0]} -lt 3 ]] && _error \"Bash 3.2+ required\"\n \n # Check dependencies\n command -v jq &>/dev/null || _error \"jq required. Install: brew install jq (macOS) or apt install jq (Linux)\"\n command -v curl &>/dev/null || _error \"curl required\"\n\n # Download\n local tmp_dir\n tmp_dir=$(mktemp -d)\n trap \"rm -rf '$tmp_dir'\" EXIT\n \n if command -v git &>/dev/null; then\n _info \"Cloning...\"\n git clone --depth 1 \"$OCTCLAW_REPO\" \"$tmp_dir/octclaw\"\n else\n _info \"Downloading tarball...\"\n curl -fsSL \"${OCTCLAW_REPO%.*}/archive/refs/heads/main.tar.gz\" | tar xz -C \"$tmp_dir\"\n mv \"$tmp_dir\"/octclaw-main \"$tmp_dir/octclaw\"\n fi\n\n # Install\n local install_dir=\"${HOME}/.octclaw\"\n mkdir -p \"$install_dir\"\n cp -r \"$tmp_dir/octclaw/lib\" \"$install_dir/\"\n cp \"$tmp_dir/octclaw/.env.example\" \"$install_dir/.env\"\n \n local bin_dir=\"${HOME}/.local/bin\"\n mkdir -p \"$bin_dir\"\n cp \"$tmp_dir/octclaw/oct\" \"$bin_dir/\"\n chmod +x \"$bin_dir/oct\"\n \n # Init config\n [[ ! -f \"$install_dir/config.json\" ]] && printf '{\"model\":\"gpt-4o\",\"api_base\":\"https://api.openai.com/v1\"}' > \"$install_dir/config.json\"\n\n # Add to PATH if needed\n if [[ \":$PATH:\" != *\":${bin_dir}:\"* ]]; then\n _info \"Add to PATH: export PATH=\\\"${bin_dir}:\\$PATH\\\"\"\n fi\n\n _info \"Done! Run: oct -h\"\n}\n\nmain \"$@\"\n"}}}}