@coocarecloud/openclaw 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.fastRequest/config/fastRequestCurrentProjectConfig.json +34 -0
- package/.gitattributes +14 -0
- package/.github/workflows/build.yml +406 -0
- package/LICENSE +23 -0
- package/README.md +187 -0
- package/assets/.gitkeep +0 -0
- package/assets/openclaw.ico +0 -0
- package/install.cmd +116 -0
- package/install.sh +191 -0
- package/installer/setup.iss +152 -0
- package/package.json +19 -0
- package/scripts/cleanup-r2.sh +59 -0
- package/scripts/package-unix.sh +207 -0
- package/scripts/package-win.ps1 +206 -0
- package/shims/openclaw +3 -0
- package/shims/openclaw.cmd +4 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiDocTemplate":"#if (${namingPolicy}=='byDoc')\n$H1 ${methodDescription}\n#else\n$H1 $!{methodName}\n\n$H3 Method description\n\n```\n$!{methodDescription}\n```\n#end\n\n> URL: $!{url}\n>\n> Origin Url: $!{originUrl}\n>\n> Type: $!{methodType}\n\n\n$H3 Request headers\n\n|Header Name| Header Value|\n|---------|------|\n#foreach( $h in ${headerList})\n|$h.type|$h.value|\n#end\n\n$H3 Parameters\n\n$H5 Path parameters\n\n| Parameter | Type | Value | Description |\n|---------|------|------|------------|\n#foreach( $node in ${pathKeyValueList})\n|$node.key|$!{node.type}|$!{node.value}|$!{node.comment}|\n#end\n\n\n$H5 URL parameters\n\n|Required| Parameter | Type | Value | Description |\n|---------|---------|------|------|------------|\n#foreach( $node in ${urlParamsKeyValueList})\n|$!{node.enabled}|$!{node.key}|$!{node.type}|$!{node.value}|$!{node.comment}|\n#end\n\n\n$H5 Body parameters\n\n$H6 JSON\n\n```\n${jsonParam}\n```\n\n$H6 JSON document\n\n```\n${jsonParamDocument}\n```\n\n\n$H5 Form URL-Encoded\n|Required| Parameter | Type | Value | Description |\n|---------|---------|------|------|------------|\n#foreach( $node in ${urlEncodedKeyValueList})\n|$!{node.enabled}|$!{node.key}|$!{node.type}|$!{node.value}|$!{node.comment}|\n#end\n\n\n$H5 Multipart\n|Required | Parameter | Type | Value | Description |\n|---------|---------|------|------|------------|\n#foreach( $node in ${multipartKeyValueList})\n|$!{node.enabled}|$!{node.key}|$!{node.type}|$!{node.value}|$!{node.comment}|\n#end\n\n\n$H3 Response\n\n$H5 Response example\n\n```\n$!{responseExample}\n```\n\n$H5 Response document\n```\n$!{returnDocument}\n```\n\n\n",
|
|
3
|
+
"apifoxSetting":{
|
|
4
|
+
"domain":"https://api.apifox.com",
|
|
5
|
+
"syncAfterSave":false
|
|
6
|
+
},
|
|
7
|
+
"dataList":[],
|
|
8
|
+
"envList":[],
|
|
9
|
+
"headerList":[],
|
|
10
|
+
"ignoreParseFieldList":[],
|
|
11
|
+
"maxDescriptionLength":-1,
|
|
12
|
+
"pmCollectionId":"",
|
|
13
|
+
"postScript":"",
|
|
14
|
+
"preScript":"",
|
|
15
|
+
"projectList":[],
|
|
16
|
+
"searchTruncatedCode":"",
|
|
17
|
+
"syncModel":{
|
|
18
|
+
"branch":"master",
|
|
19
|
+
"domain":"https://github.com",
|
|
20
|
+
"enabled":false,
|
|
21
|
+
"gitToken":"",
|
|
22
|
+
"namingPolicy":"byDoc",
|
|
23
|
+
"owner":"",
|
|
24
|
+
"repo":"",
|
|
25
|
+
"repoUrl":"",
|
|
26
|
+
"syncAfterRun":false,
|
|
27
|
+
"type":"github"
|
|
28
|
+
},
|
|
29
|
+
"syncPmAfterSave":false,
|
|
30
|
+
"urlEncodedKeyValueList":[],
|
|
31
|
+
"urlParamsKeyValueList":[],
|
|
32
|
+
"urlSuffix":"",
|
|
33
|
+
"workspaceId":""
|
|
34
|
+
}
|
package/.gitattributes
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto
|
|
3
|
+
|
|
4
|
+
# Shell scripts must use LF
|
|
5
|
+
*.sh text eol=lf
|
|
6
|
+
shims/openclaw text eol=lf
|
|
7
|
+
|
|
8
|
+
# Windows scripts use CRLF
|
|
9
|
+
*.cmd text eol=crlf
|
|
10
|
+
*.ps1 text eol=crlf
|
|
11
|
+
*.iss text eol=crlf
|
|
12
|
+
|
|
13
|
+
# Binary
|
|
14
|
+
*.ico binary
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
name: Build OpenClaw Standalone
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Manual trigger with version input
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
inputs:
|
|
7
|
+
openclaw_version:
|
|
8
|
+
description: 'OpenClaw version to package (leave empty for latest)'
|
|
9
|
+
required: false
|
|
10
|
+
default: ''
|
|
11
|
+
upload_r2:
|
|
12
|
+
description: 'Upload to Cloudflare R2'
|
|
13
|
+
required: false
|
|
14
|
+
type: boolean
|
|
15
|
+
default: true
|
|
16
|
+
# Auto-trigger on tag push
|
|
17
|
+
push:
|
|
18
|
+
branches:
|
|
19
|
+
- main
|
|
20
|
+
tags:
|
|
21
|
+
- 'v*'
|
|
22
|
+
|
|
23
|
+
env:
|
|
24
|
+
NODE_VERSION: '22'
|
|
25
|
+
OPENCLAW_PKG: '@coocarecloud/openclaw'
|
|
26
|
+
NPM_REGISTRY: 'https://registry.npmmirror.com'
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
# --- Resolve version ---
|
|
30
|
+
resolve-version:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
outputs:
|
|
33
|
+
version: ${{ steps.version.outputs.version }}
|
|
34
|
+
pkg_spec: ${{ steps.version.outputs.pkg_spec }}
|
|
35
|
+
steps:
|
|
36
|
+
- name: Resolve OpenClaw version
|
|
37
|
+
id: version
|
|
38
|
+
run: |
|
|
39
|
+
INPUT_VER="${{ github.event.inputs.openclaw_version }}"
|
|
40
|
+
if [ -n "$INPUT_VER" ]; then
|
|
41
|
+
echo "version=$INPUT_VER" >> $GITHUB_OUTPUT
|
|
42
|
+
echo "pkg_spec=${{ env.OPENCLAW_PKG }}@$INPUT_VER" >> $GITHUB_OUTPUT
|
|
43
|
+
else
|
|
44
|
+
# Get latest version from npm
|
|
45
|
+
VER=$(npm view "${{ env.OPENCLAW_PKG }}" version --registry "${{ env.NPM_REGISTRY }}" 2>/dev/null || echo "")
|
|
46
|
+
if [ -z "$VER" ]; then
|
|
47
|
+
echo "Failed to resolve latest version"
|
|
48
|
+
exit 1
|
|
49
|
+
fi
|
|
50
|
+
echo "version=$VER" >> $GITHUB_OUTPUT
|
|
51
|
+
echo "pkg_spec=${{ env.OPENCLAW_PKG }}@$VER" >> $GITHUB_OUTPUT
|
|
52
|
+
fi
|
|
53
|
+
echo "Resolved version: $(cat $GITHUB_OUTPUT | grep version= | head -1)"
|
|
54
|
+
|
|
55
|
+
# --- Build matrix ---
|
|
56
|
+
build:
|
|
57
|
+
needs: resolve-version
|
|
58
|
+
strategy:
|
|
59
|
+
fail-fast: false
|
|
60
|
+
matrix:
|
|
61
|
+
include:
|
|
62
|
+
- os: windows-latest
|
|
63
|
+
platform: win-x64
|
|
64
|
+
archive_ext: zip
|
|
65
|
+
- os: macos-15
|
|
66
|
+
platform: mac-arm64
|
|
67
|
+
archive_ext: tar.gz
|
|
68
|
+
- os: ubuntu-latest
|
|
69
|
+
platform: linux-x64
|
|
70
|
+
archive_ext: tar.gz
|
|
71
|
+
- os: ubuntu-24.04-arm
|
|
72
|
+
platform: linux-arm64
|
|
73
|
+
archive_ext: tar.gz
|
|
74
|
+
|
|
75
|
+
runs-on: ${{ matrix.os }}
|
|
76
|
+
|
|
77
|
+
steps:
|
|
78
|
+
- name: Checkout
|
|
79
|
+
uses: actions/checkout@v4
|
|
80
|
+
|
|
81
|
+
- name: Setup Node.js
|
|
82
|
+
uses: actions/setup-node@v4
|
|
83
|
+
with:
|
|
84
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
85
|
+
|
|
86
|
+
- name: Show environment
|
|
87
|
+
run: |
|
|
88
|
+
node --version
|
|
89
|
+
npm --version
|
|
90
|
+
echo "Platform: ${{ matrix.platform }}"
|
|
91
|
+
echo "Version: ${{ needs.resolve-version.outputs.version }}"
|
|
92
|
+
|
|
93
|
+
# ===== Build =====
|
|
94
|
+
- name: Enable Windows Long Paths
|
|
95
|
+
if: runner.os == 'Windows'
|
|
96
|
+
shell: pwsh
|
|
97
|
+
run: |
|
|
98
|
+
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
|
|
99
|
+
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force | Out-Null
|
|
100
|
+
git config --system core.longpaths true
|
|
101
|
+
|
|
102
|
+
- name: Create build directory
|
|
103
|
+
shell: bash
|
|
104
|
+
run: mkdir -p build/${{ matrix.platform }}
|
|
105
|
+
|
|
106
|
+
- name: Install OpenClaw
|
|
107
|
+
shell: bash
|
|
108
|
+
working-directory: build/${{ matrix.platform }}
|
|
109
|
+
run: |
|
|
110
|
+
echo '{ "name": "openclaw-standalone-build", "private": true }' > package.json
|
|
111
|
+
npm install "${{ needs.resolve-version.outputs.pkg_spec }}" \
|
|
112
|
+
--registry "${{ env.NPM_REGISTRY }}" \
|
|
113
|
+
--include=optional
|
|
114
|
+
rm -f package.json package-lock.json
|
|
115
|
+
|
|
116
|
+
- name: Copy Node.js binary (Unix)
|
|
117
|
+
if: runner.os != 'Windows'
|
|
118
|
+
run: |
|
|
119
|
+
cp "$(which node)" "build/${{ matrix.platform }}/node"
|
|
120
|
+
chmod +x "build/${{ matrix.platform }}/node"
|
|
121
|
+
|
|
122
|
+
- name: Copy Node.js binary (Windows)
|
|
123
|
+
if: runner.os == 'Windows'
|
|
124
|
+
shell: pwsh
|
|
125
|
+
run: |
|
|
126
|
+
Copy-Item (Get-Command node).Source "build/${{ matrix.platform }}/node.exe"
|
|
127
|
+
|
|
128
|
+
- name: Copy shim (Unix)
|
|
129
|
+
if: runner.os != 'Windows'
|
|
130
|
+
run: |
|
|
131
|
+
cp shims/openclaw "build/${{ matrix.platform }}/openclaw"
|
|
132
|
+
chmod +x "build/${{ matrix.platform }}/openclaw"
|
|
133
|
+
|
|
134
|
+
- name: Copy shim (Windows)
|
|
135
|
+
if: runner.os == 'Windows'
|
|
136
|
+
shell: pwsh
|
|
137
|
+
run: |
|
|
138
|
+
Copy-Item "shims/openclaw.cmd" "build/${{ matrix.platform }}/openclaw.cmd"
|
|
139
|
+
|
|
140
|
+
- name: Write VERSION file
|
|
141
|
+
shell: bash
|
|
142
|
+
run: |
|
|
143
|
+
cat > "build/${{ matrix.platform }}/VERSION" <<EOF
|
|
144
|
+
openclaw_version=${{ needs.resolve-version.outputs.version }}
|
|
145
|
+
node_version=$(node --version)
|
|
146
|
+
platform=${{ matrix.platform }}
|
|
147
|
+
build_date=$(date -u '+%Y-%m-%d %H:%M:%S UTC')
|
|
148
|
+
EOF
|
|
149
|
+
|
|
150
|
+
# ===== Cleanup to reduce size =====
|
|
151
|
+
- name: Cleanup unnecessary files (Unix)
|
|
152
|
+
if: runner.os != 'Windows'
|
|
153
|
+
run: |
|
|
154
|
+
echo "Before: $(du -sm build/${{ matrix.platform }}/node_modules | cut -f1)MB"
|
|
155
|
+
find "build/${{ matrix.platform }}/node_modules" -type f \( \
|
|
156
|
+
-name "*.ts" ! -name "*.d.ts" -o \
|
|
157
|
+
-name "*.map" -o \
|
|
158
|
+
-name "CHANGELOG*" -o \
|
|
159
|
+
-name "HISTORY*" -o \
|
|
160
|
+
-name "AUTHORS*" -o \
|
|
161
|
+
-name ".npmignore" -o \
|
|
162
|
+
-name ".eslintrc*" -o \
|
|
163
|
+
-name ".prettierrc*" -o \
|
|
164
|
+
-name "Makefile" -o \
|
|
165
|
+
-name ".editorconfig" -o \
|
|
166
|
+
-name ".travis.yml" \
|
|
167
|
+
\) -delete 2>/dev/null || true
|
|
168
|
+
find "build/${{ matrix.platform }}/node_modules" -type d \( \
|
|
169
|
+
-name "test" -o -name "tests" -o -name "__tests__" -o \
|
|
170
|
+
-name "spec" -o -name "example" -o -name "examples" -o \
|
|
171
|
+
-name ".github" -o -name ".circleci" \
|
|
172
|
+
\) -exec rm -rf {} + 2>/dev/null || true
|
|
173
|
+
echo "After: $(du -sm build/${{ matrix.platform }}/node_modules | cut -f1)MB"
|
|
174
|
+
|
|
175
|
+
- name: Cleanup unnecessary files (Windows)
|
|
176
|
+
if: runner.os == 'Windows'
|
|
177
|
+
shell: pwsh
|
|
178
|
+
run: |
|
|
179
|
+
$nmDir = "build/${{ matrix.platform }}/node_modules"
|
|
180
|
+
$patterns = @("*.ts", "*.map", "CHANGELOG*", "HISTORY*", "AUTHORS*",
|
|
181
|
+
".npmignore", ".eslintrc*", ".prettierrc*", "Makefile",
|
|
182
|
+
".editorconfig", ".travis.yml")
|
|
183
|
+
$dirPatterns = @("test", "tests", "__tests__", "spec", "example", "examples", ".github", ".circleci")
|
|
184
|
+
foreach ($p in $patterns) {
|
|
185
|
+
Get-ChildItem -Path $nmDir -Recurse -Filter $p -File -ErrorAction SilentlyContinue |
|
|
186
|
+
Where-Object { $_.Name -notlike "*.d.ts" } |
|
|
187
|
+
Remove-Item -Force -ErrorAction SilentlyContinue
|
|
188
|
+
}
|
|
189
|
+
foreach ($d in $dirPatterns) {
|
|
190
|
+
Get-ChildItem -Path $nmDir -Recurse -Directory -Filter $d -ErrorAction SilentlyContinue |
|
|
191
|
+
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
|
|
192
|
+
}
|
|
193
|
+
# Remove ALL nested node_modules inside openclaw package tree (deeply nested deps like @jimp/plugin-print/zod cause MAX_PATH overflow in Inno Setup)
|
|
194
|
+
$zhPath = "$nmDir\@coocarecloud\openclaw"
|
|
195
|
+
if (Test-Path $zhPath) {
|
|
196
|
+
Get-ChildItem -Path $zhPath -Directory -Filter "node_modules" -Recurse -ErrorAction SilentlyContinue |
|
|
197
|
+
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
# ===== Package =====
|
|
201
|
+
- name: Create archive (Unix)
|
|
202
|
+
if: runner.os != 'Windows'
|
|
203
|
+
run: |
|
|
204
|
+
mkdir -p output
|
|
205
|
+
mv "build/${{ matrix.platform }}" "build/openclaw"
|
|
206
|
+
tar -czf "output/openclaw-${{ needs.resolve-version.outputs.version }}-${{ matrix.platform }}.tar.gz" \
|
|
207
|
+
-C build openclaw
|
|
208
|
+
mv "build/openclaw" "build/${{ matrix.platform }}"
|
|
209
|
+
# Generate checksum
|
|
210
|
+
cd output
|
|
211
|
+
shasum -a 256 *.tar.gz > "openclaw-${{ needs.resolve-version.outputs.version }}-${{ matrix.platform }}.tar.gz.sha256" 2>/dev/null || \
|
|
212
|
+
sha256sum *.tar.gz > "openclaw-${{ needs.resolve-version.outputs.version }}-${{ matrix.platform }}.tar.gz.sha256" 2>/dev/null || true
|
|
213
|
+
ls -lh
|
|
214
|
+
|
|
215
|
+
- name: Create archive (Windows)
|
|
216
|
+
if: runner.os == 'Windows'
|
|
217
|
+
shell: pwsh
|
|
218
|
+
run: |
|
|
219
|
+
New-Item -ItemType Directory -Force -Path output | Out-Null
|
|
220
|
+
$version = "${{ needs.resolve-version.outputs.version }}"
|
|
221
|
+
$zipName = "openclaw-$version-win-x64.zip"
|
|
222
|
+
Rename-Item "build/${{ matrix.platform }}" "openclaw"
|
|
223
|
+
Compress-Archive -Path "build/openclaw" -DestinationPath "output/$zipName" -CompressionLevel Optimal
|
|
224
|
+
Rename-Item "build/openclaw" "${{ matrix.platform }}"
|
|
225
|
+
# Generate checksum
|
|
226
|
+
$hash = (Get-FileHash "output/$zipName" -Algorithm SHA256).Hash.ToLower()
|
|
227
|
+
"$hash $zipName" | Set-Content "output/$zipName.sha256"
|
|
228
|
+
Get-ChildItem output
|
|
229
|
+
|
|
230
|
+
# ===== Inno Setup installer (Windows only) =====
|
|
231
|
+
- name: Build Inno Setup installer
|
|
232
|
+
if: runner.os == 'Windows'
|
|
233
|
+
shell: pwsh
|
|
234
|
+
run: |
|
|
235
|
+
$version = "${{ needs.resolve-version.outputs.version }}"
|
|
236
|
+
$sourceDir = "${{ github.workspace }}\build\${{ matrix.platform }}"
|
|
237
|
+
$outputDir = "${{ github.workspace }}\output"
|
|
238
|
+
# Inno Setup is pre-installed on windows-latest
|
|
239
|
+
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" `
|
|
240
|
+
"/DAppVersion=$version" `
|
|
241
|
+
"/DSourceDir=$sourceDir" `
|
|
242
|
+
"/DOutputDir=$outputDir" `
|
|
243
|
+
"installer\setup.iss"
|
|
244
|
+
|
|
245
|
+
# ===== Upload artifacts =====
|
|
246
|
+
- name: Upload artifacts
|
|
247
|
+
uses: actions/upload-artifact@v4
|
|
248
|
+
with:
|
|
249
|
+
name: openclaw-${{ matrix.platform }}
|
|
250
|
+
path: output/*
|
|
251
|
+
retention-days: 30
|
|
252
|
+
|
|
253
|
+
# --- Create Release ---
|
|
254
|
+
release:
|
|
255
|
+
needs: [resolve-version, build]
|
|
256
|
+
runs-on: ubuntu-latest
|
|
257
|
+
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
|
|
258
|
+
permissions:
|
|
259
|
+
contents: write
|
|
260
|
+
|
|
261
|
+
steps:
|
|
262
|
+
- name: Download all artifacts
|
|
263
|
+
uses: actions/download-artifact@v4
|
|
264
|
+
with:
|
|
265
|
+
path: artifacts
|
|
266
|
+
merge-multiple: false
|
|
267
|
+
|
|
268
|
+
- name: Collect all files
|
|
269
|
+
run: |
|
|
270
|
+
mkdir -p release
|
|
271
|
+
find artifacts -type f \( -name "*.zip" -o -name "*.tar.gz" -o -name "*.exe" -o -name "*.sha256" \) \
|
|
272
|
+
-exec cp {} release/ \;
|
|
273
|
+
ls -lh release/
|
|
274
|
+
|
|
275
|
+
- name: Generate latest.json manifest
|
|
276
|
+
run: |
|
|
277
|
+
VERSION="${{ needs.resolve-version.outputs.version }}"
|
|
278
|
+
cat > release/latest.json <<EOF
|
|
279
|
+
{
|
|
280
|
+
"version": "$VERSION",
|
|
281
|
+
"date": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
282
|
+
"downloads": {
|
|
283
|
+
"win-x64": {
|
|
284
|
+
"zip": "openclaw-$VERSION-win-x64.zip",
|
|
285
|
+
"installer": "openclaw-$VERSION-win-x64-setup.exe"
|
|
286
|
+
},
|
|
287
|
+
"mac-arm64": {
|
|
288
|
+
"archive": "openclaw-$VERSION-mac-arm64.tar.gz"
|
|
289
|
+
},
|
|
290
|
+
"linux-x64": {
|
|
291
|
+
"archive": "openclaw-$VERSION-linux-x64.tar.gz"
|
|
292
|
+
},
|
|
293
|
+
"linux-arm64": {
|
|
294
|
+
"archive": "openclaw-$VERSION-linux-arm64.tar.gz"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
EOF
|
|
299
|
+
|
|
300
|
+
- name: Create GitHub Release
|
|
301
|
+
uses: softprops/action-gh-release@v2
|
|
302
|
+
with:
|
|
303
|
+
tag_name: v${{ needs.resolve-version.outputs.version }}
|
|
304
|
+
name: OpenClaw ${{ needs.resolve-version.outputs.version }}
|
|
305
|
+
body: |
|
|
306
|
+
## OpenClaw ${{ needs.resolve-version.outputs.version }} 独立安装包
|
|
307
|
+
|
|
308
|
+
**零依赖安装** — 无需 Node.js,无需 npm,下载即用!
|
|
309
|
+
|
|
310
|
+
### 📥 下载
|
|
311
|
+
|
|
312
|
+
| 平台 | 文件 | 说明 |
|
|
313
|
+
|------|------|------|
|
|
314
|
+
| Windows x64 | `*-win-x64-setup.exe` | **推荐** 引导式安装 |
|
|
315
|
+
| Windows x64 | `*-win-x64.zip` | 绿色免安装版 |
|
|
316
|
+
| macOS ARM (Apple Silicon) | `*-mac-arm64.tar.gz` | 解压即用 |
|
|
317
|
+
| Linux x64 | `*-linux-x64.tar.gz` | 解压即用 |
|
|
318
|
+
| Linux ARM64 (树莓派等) | `*-linux-arm64.tar.gz` | 解压即用 |
|
|
319
|
+
|
|
320
|
+
### 🚀 安装方法
|
|
321
|
+
|
|
322
|
+
**Windows**: 下载 `.exe` 安装包,双击运行安装向导
|
|
323
|
+
|
|
324
|
+
**macOS / Linux**:
|
|
325
|
+
```bash
|
|
326
|
+
curl -fsSL https://dl.qrj.ai/openclaw/install.sh | bash
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
或手动: 下载对应平台的 `.tar.gz` → 解压 → 将目录加入 PATH
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
由 [晴辰云](https://gpt.qt.cool) 构建 · [ClawPanel 图形管理面板](https://github.com/coocare/clawpanel)
|
|
333
|
+
files: release/*
|
|
334
|
+
draft: false
|
|
335
|
+
prerelease: false
|
|
336
|
+
|
|
337
|
+
# --- Upload to R2 ---
|
|
338
|
+
upload-r2:
|
|
339
|
+
needs: [resolve-version, build, release]
|
|
340
|
+
runs-on: ubuntu-latest
|
|
341
|
+
if: >-
|
|
342
|
+
(startsWith(github.ref, 'refs/tags/v') || github.event.inputs.upload_r2 == 'true')
|
|
343
|
+
|
|
344
|
+
steps:
|
|
345
|
+
- name: Download all artifacts
|
|
346
|
+
uses: actions/download-artifact@v4
|
|
347
|
+
with:
|
|
348
|
+
path: artifacts
|
|
349
|
+
merge-multiple: false
|
|
350
|
+
|
|
351
|
+
- name: Collect files
|
|
352
|
+
run: |
|
|
353
|
+
mkdir -p upload
|
|
354
|
+
find artifacts -type f \( -name "*.zip" -o -name "*.tar.gz" -o -name "*.exe" -o -name "*.sha256" \) \
|
|
355
|
+
-exec cp {} upload/ \;
|
|
356
|
+
ls -lh upload/
|
|
357
|
+
|
|
358
|
+
- name: Setup Node.js for wrangler
|
|
359
|
+
uses: actions/setup-node@v4
|
|
360
|
+
with:
|
|
361
|
+
node-version: '22'
|
|
362
|
+
|
|
363
|
+
- name: Install wrangler
|
|
364
|
+
run: npm install -g wrangler
|
|
365
|
+
|
|
366
|
+
- name: Upload files to R2
|
|
367
|
+
env:
|
|
368
|
+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
369
|
+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
370
|
+
run: |
|
|
371
|
+
VERSION="${{ needs.resolve-version.outputs.version }}"
|
|
372
|
+
PREFIX="openclaw-standalone/${VERSION}"
|
|
373
|
+
FAILED=0
|
|
374
|
+
for file in upload/*; do
|
|
375
|
+
FILENAME=$(basename "$file")
|
|
376
|
+
SIZE_MB=$(( $(stat --format=%s "$file") / 1048576 ))
|
|
377
|
+
echo "Uploading $FILENAME (${SIZE_MB}MB) ..."
|
|
378
|
+
if [ "$SIZE_MB" -gt 290 ]; then
|
|
379
|
+
echo "⚠ Skipping $FILENAME (${SIZE_MB}MB > 290MB wrangler limit, available in GitHub Release)"
|
|
380
|
+
continue
|
|
381
|
+
fi
|
|
382
|
+
if wrangler r2 object put "clawpanel-releases/${PREFIX}/${FILENAME}" --file "$file" --remote; then
|
|
383
|
+
echo "✓ $FILENAME uploaded"
|
|
384
|
+
else
|
|
385
|
+
echo "⚠ Failed to upload $FILENAME, continuing..."
|
|
386
|
+
FAILED=$((FAILED + 1))
|
|
387
|
+
fi
|
|
388
|
+
done
|
|
389
|
+
echo "Upload complete (skipped/failed: $FAILED)"
|
|
390
|
+
|
|
391
|
+
- name: Upload latest.json to R2
|
|
392
|
+
env:
|
|
393
|
+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
394
|
+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
395
|
+
run: |
|
|
396
|
+
VERSION="${{ needs.resolve-version.outputs.version }}"
|
|
397
|
+
cat > /tmp/latest.json <<EOF
|
|
398
|
+
{
|
|
399
|
+
"version": "$VERSION",
|
|
400
|
+
"date": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
401
|
+
"base_url": "https://dl.qrj.ai/openclaw-standalone/$VERSION"
|
|
402
|
+
}
|
|
403
|
+
EOF
|
|
404
|
+
wrangler r2 object put "clawpanel-releases/openclaw-standalone/latest.json" \
|
|
405
|
+
--file /tmp/latest.json --content-type application/json --remote
|
|
406
|
+
echo "latest.json updated to version $VERSION"
|
package/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 19 November 2007
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2024-2026 coocare (晴辰云)
|
|
5
|
+
|
|
6
|
+
This program is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU Affero General Public License as published by
|
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
This program is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU Affero General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU Affero General Public License
|
|
17
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
18
|
+
|
|
19
|
+
--- Commercial License ---
|
|
20
|
+
|
|
21
|
+
For commercial use without AGPL obligations, contact:
|
|
22
|
+
https://github.com/coocare
|
|
23
|
+
https://gpt.qt.cool
|
package/README.md
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# OpenClaw Standalone
|
|
2
|
+
|
|
3
|
+
**零依赖安装包** — 无需 Node.js,无需 npm,下载即用!
|
|
4
|
+
|
|
5
|
+
由 [晴辰云 (coocare)](https://gpt.qt.cool) 构建和维护。
|
|
6
|
+
|
|
7
|
+
[](https://github.com/coocare/openclaw-standalone/actions/workflows/build.yml)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 为什么需要这个项目?
|
|
13
|
+
|
|
14
|
+
[OpenClaw](https://github.com/openclaw/openclaw) 是一个强大的 AI 智能体引擎,但官方安装方式依赖 `npm install -g`,存在以下痛点:
|
|
15
|
+
|
|
16
|
+
- 🐢 **国内网络慢**:npm 默认从境外 registry 下载,大量依赖导致安装耗时 10-30 分钟
|
|
17
|
+
- 🔧 **环境要求高**:需要预装 Node.js 22+、npm、Git,还可能遇到原生模块编译失败
|
|
18
|
+
- 🤯 **新手不友好**:各种权限、PATH、网络报错让非技术用户望而却步
|
|
19
|
+
|
|
20
|
+
**OpenClaw Standalone** 解决了这一切:
|
|
21
|
+
|
|
22
|
+
- ✅ **零依赖**:内置 Node.js 运行时和所有预编译依赖
|
|
23
|
+
- ✅ **秒级安装**:下载 → 解压 → 就能用
|
|
24
|
+
- ✅ **全平台**:Windows / macOS / Linux / 树莓派
|
|
25
|
+
- ✅ **Windows 引导安装**:专业的 .exe 安装向导,跟装普通软件一样简单
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 📥 安装方法
|
|
30
|
+
|
|
31
|
+
### Windows(推荐:安装向导)
|
|
32
|
+
|
|
33
|
+
1. 从 [Releases](https://github.com/coocare/openclaw-standalone/releases) 下载 `openclaw-*-win-x64-setup.exe`
|
|
34
|
+
2. 双击运行安装向导
|
|
35
|
+
3. 打开终端,输入 `openclaw` 即可使用
|
|
36
|
+
|
|
37
|
+
> 也可以下载 `.zip` 绿色免安装版,解压后手动添加目录到 PATH。
|
|
38
|
+
|
|
39
|
+
### macOS / Linux(一键安装)
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
curl -fsSL https://dl.qrj.ai/openclaw/install.sh | bash
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
支持的平台:
|
|
46
|
+
- macOS x64 (Intel)
|
|
47
|
+
- macOS ARM64 (Apple Silicon / M1-M4)
|
|
48
|
+
- Linux x64
|
|
49
|
+
- Linux ARM64 (树莓派 4/5、ARM 服务器)
|
|
50
|
+
|
|
51
|
+
### 手动安装
|
|
52
|
+
|
|
53
|
+
1. 从 [Releases](https://github.com/coocare/openclaw-standalone/releases) 下载对应平台的压缩包
|
|
54
|
+
2. 解压到任意目录
|
|
55
|
+
3. 将该目录添加到系统 PATH
|
|
56
|
+
4. 打开终端,输入 `openclaw --version` 验证
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 🚀 快速开始
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# 查看帮助
|
|
64
|
+
openclaw --help
|
|
65
|
+
|
|
66
|
+
# 初始化配置(首次使用)
|
|
67
|
+
openclaw setup
|
|
68
|
+
|
|
69
|
+
# 启动 AI Gateway
|
|
70
|
+
openclaw gateway
|
|
71
|
+
|
|
72
|
+
# 查看状态
|
|
73
|
+
openclaw status
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 搭配图形管理面板
|
|
77
|
+
|
|
78
|
+
推荐安装 [ClawPanel](https://github.com/coocare/clawpanel) 图形化管理面板,提供:
|
|
79
|
+
- 可视化模型配置
|
|
80
|
+
- 智能体管理
|
|
81
|
+
- 消息渠道(飞书、钉钉、QQ 等)
|
|
82
|
+
- Docker 军团调度
|
|
83
|
+
- 定时任务、技能市场等
|
|
84
|
+
|
|
85
|
+
### 使用晴辰云 AI 接口
|
|
86
|
+
|
|
87
|
+
[晴辰云](https://gpt.qt.cool) 提供兼容 OpenAI 的 API 接口:
|
|
88
|
+
- 每天签到送免费额度
|
|
89
|
+
- 支持 GPT-5 全系列模型
|
|
90
|
+
- 端点:`https://gpt.qt.cool/v1`
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 📦 下载一览
|
|
95
|
+
|
|
96
|
+
| 平台 | 架构 | 文件类型 | 说明 |
|
|
97
|
+
|------|------|---------|------|
|
|
98
|
+
| Windows | x64 | `.exe` 安装包 | 引导式安装,自动配置 PATH |
|
|
99
|
+
| Windows | x64 | `.zip` | 绿色免安装,解压即用 |
|
|
100
|
+
| macOS | x64 (Intel) | `.tar.gz` | 解压即用 |
|
|
101
|
+
| macOS | ARM64 (Apple Silicon) | `.tar.gz` | 解压即用 |
|
|
102
|
+
| Linux | x64 | `.tar.gz` | 解压即用 |
|
|
103
|
+
| Linux | ARM64 | `.tar.gz` | 树莓派、ARM 服务器 |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 🏗️ 构建原理
|
|
108
|
+
|
|
109
|
+
本项目的核心思想:**在 CI 的各平台 runner 上预编译所有原生模块,打包 Node.js 运行时 + 完整 node_modules 成自包含发行包。**
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
GitHub Actions CI Matrix
|
|
113
|
+
├── windows-latest → npm install → 原生模块 x64 编译 → zip + Inno Setup .exe
|
|
114
|
+
├── macos-13 → npm install → 原生模块 x64 编译 → tar.gz
|
|
115
|
+
├── macos-14 → npm install → 原生模块 ARM 编译 → tar.gz
|
|
116
|
+
├── ubuntu-latest → npm install → 原生模块 x64 编译 → tar.gz
|
|
117
|
+
└── ubuntu-arm64 → npm install → 原生模块 ARM 编译 → tar.gz
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
每个平台的产出包含:
|
|
121
|
+
- `node` / `node.exe` — Node.js 运行时
|
|
122
|
+
- `openclaw` / `openclaw.cmd` — CLI 入口脚本
|
|
123
|
+
- `node_modules/` — 所有依赖(含预编译的原生模块)
|
|
124
|
+
- `VERSION` — 版本信息
|
|
125
|
+
|
|
126
|
+
### 本地构建
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Windows
|
|
130
|
+
powershell -ExecutionPolicy Bypass -File scripts/package-win.ps1
|
|
131
|
+
|
|
132
|
+
# macOS / Linux
|
|
133
|
+
bash scripts/package-unix.sh
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 🔄 更新
|
|
139
|
+
|
|
140
|
+
### 自动更新
|
|
141
|
+
ClawPanel 会自动检测新版本并提示更新。
|
|
142
|
+
|
|
143
|
+
### 手动更新
|
|
144
|
+
重新运行安装脚本即可覆盖安装:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# macOS / Linux
|
|
148
|
+
curl -fsSL https://dl.qrj.ai/openclaw/install.sh | bash
|
|
149
|
+
|
|
150
|
+
# Windows
|
|
151
|
+
# 重新下载安装包运行即可
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## ❓ 常见问题
|
|
157
|
+
|
|
158
|
+
### Q: 这个跟 `npm install -g openclaw` 有什么区别?
|
|
159
|
+
A: 效果完全一样,但不需要预装 Node.js 和 npm,也不需要网络下载依赖。所有东西都预编译打包好了。
|
|
160
|
+
|
|
161
|
+
### Q: 支持树莓派吗?
|
|
162
|
+
A: 支持!下载 `linux-arm64` 版本即可。支持树莓派 4/5 及其他 ARM64 设备。
|
|
163
|
+
|
|
164
|
+
### Q: 安装包为什么这么大(200-300MB)?
|
|
165
|
+
A: 因为包含了完整的 Node.js 运行时和所有预编译的依赖(包括图片处理库 sharp、SQLite 等原生模块)。这是"零依赖"的代价,但相比 npm 安装耗时 30 分钟,一次下载几分钟更划算。
|
|
166
|
+
|
|
167
|
+
### Q: 能跟 npm 安装的 OpenClaw 共存吗?
|
|
168
|
+
A: 可以,但建议只保留一个。如果两个都在 PATH 中,系统会使用 PATH 中靠前的那个。
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## 📄 许可证
|
|
173
|
+
|
|
174
|
+
[AGPL-3.0](LICENSE) + 商业授权
|
|
175
|
+
|
|
176
|
+
- 个人/学生/非商业:完全自由 ✅
|
|
177
|
+
- 企业商用:需遵守 AGPL 或购买商业授权
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## 🔗 相关项目
|
|
182
|
+
|
|
183
|
+
- [OpenClaw](https://github.com/openclaw/openclaw) — AI 智能体引擎(上游)
|
|
184
|
+
- [OpenClaw 汉化版](https://github.com/1186258278/OpenClawChineseTranslation) — 本项目打包的汉化版源码
|
|
185
|
+
- [ClawPanel](https://github.com/coocare/clawpanel) — 图形化管理面板
|
|
186
|
+
- [openclaw-docker](https://github.com/coocare/openclaw-docker) — Docker 部署方案
|
|
187
|
+
- [晴辰云](https://gpt.qt.cool) — AI 接口服务
|
package/assets/.gitkeep
ADDED
|
File without changes
|
|
Binary file
|