airsltd commited on
Commit
2ce5e59
·
1 Parent(s): 314dcbc
Files changed (6) hide show
  1. .openclaw.example/openclaw.json +59 -0
  2. Dockerfile +44 -0
  3. README.md +10 -0
  4. install.sh +25 -0
  5. openclaw-config.sh +1 -0
  6. push.sh +25 -0
.openclaw.example/openclaw.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "meta": {
3
+ "lastTouchedVersion": "2026.3.13",
4
+ "lastTouchedAt": "2026-03-17T16:18:48.467Z"
5
+ },
6
+ "agents": {
7
+ "defaults": {
8
+ "model": {
9
+ "primary": "anthropic/claude-opus-4-6"
10
+ },
11
+ "models": {
12
+ "anthropic/claude-opus-4-6": {},
13
+ "openrouter/openrouter/free": {
14
+ "alias": "free"
15
+ }
16
+ },
17
+ "compaction": {
18
+ "mode": "safeguard"
19
+ },
20
+ "maxConcurrent": 4,
21
+ "subagents": {
22
+ "maxConcurrent": 8
23
+ }
24
+ },
25
+ "list": [
26
+ {
27
+ "id": "main"
28
+ },
29
+ {
30
+ "id": "chairman",
31
+ "name": "chairman",
32
+ "workspace": "/home/homepc/.openclaw/agents/chairman/workspace",
33
+ "agentDir": "/home/homepc/.openclaw/agents/chairman/agent"
34
+ },
35
+ {
36
+ "id": "ceo",
37
+ "name": "ceo",
38
+ "workspace": "/home/homepc/.openclaw/agents/ceo/workspace",
39
+ "agentDir": "/home/homepc/.openclaw/agents/ceo/agent"
40
+ }
41
+ ]
42
+ },
43
+ "messages": {
44
+ "ackReactionScope": "group-mentions"
45
+ },
46
+ "commands": {
47
+ "native": "auto",
48
+ "nativeSkills": "auto",
49
+ "restart": true,
50
+ "ownerDisplay": "raw"
51
+ },
52
+ "gateway": {
53
+ "mode": "local",
54
+ "auth": {
55
+ "mode": "token",
56
+ "token": "a60411cbb362fc92deeaeae6e94ef4cfb8f237273b9f6f37"
57
+ }
58
+ }
59
+ }
Dockerfile ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OpenClaw Gateway for Hugging Face Spaces
2
+ # Supports Chinese channels: QQ, Enterprise WeChat, DingTalk, Feishu
3
+
4
+ FROM node:22-slim
5
+
6
+ # Install system dependencies (ca-certificates for HTTPS SSL)
7
+ RUN apt-get update && \
8
+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
9
+ curl \
10
+ git \
11
+ openssh-client \
12
+ ca-certificates \
13
+ && apt-get clean \
14
+ && rm -rf /var/lib/apt/lists/* \
15
+ && update-ca-certificates
16
+
17
+ # Configure git to use HTTPS instead of SSH for GitHub
18
+ RUN git config --global url."https://github.com/".insteadOf "git@github.com:" && \
19
+ git config --global url."https://github.com/".insteadOf "ssh://git@github.com/"
20
+
21
+ # Install OpenClaw globally
22
+ RUN npm install -g openclaw@latest
23
+
24
+ WORKDIR /app
25
+
26
+ # Copy openclaw config
27
+ COPY openclaw.json /home/node/.openclaw/openclaw.json
28
+ RUN mkdir -p /home/node/.openclaw/workspace
29
+
30
+ # Install Chinese channel plugins (QQ, Enterprise WeChat, DingTalk, Feishu)
31
+ # These are optional - if they fail, the gateway still works
32
+ RUN openclaw plugins install @openclawcity/dingtalk 2>/dev/null || true && \
33
+ openclaw plugins install @openclawcity/qq 2>/dev/null || true && \
34
+ openclaw plugins install @openclawcity/wecom 2>/dev/null || true && \
35
+ openclaw plugins install @openclawcity/feishu 2>/dev/null || true
36
+
37
+ # Fix permissions for HF Spaces (run as node user, UID 1000)
38
+ RUN chown -R node:node /app /home/node
39
+
40
+ USER node
41
+
42
+ # Default port (compatible with HF Spaces standard)
43
+ EXPOSE 7860
44
+ CMD ["openclaw", "gateway"]
README.md CHANGED
@@ -10,3 +10,13 @@ pinned: false
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
13
+
14
+ ## 功能说明
15
+ 此工程为 openclaw 标准测试模板,其他项目可以直接克隆即可
16
+
17
+ ### Dockerfile 为镜像文件
18
+ 上传到huggingface仓库后,自动部署
19
+
20
+ ### local.sh 为本地测试部署文件
21
+ 运行后,自动部署,实现的功能和 huggingface space 类似
22
+
install.sh ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OpenClaw Gateway for ubuntu
2
+ # Supports Chinese channels: QQ, Enterprise WeChat, DingTalk, Feishu
3
+
4
+ # Install system dependencies (ca-certificates for HTTPS SSL)
5
+ sudo apt-get update
6
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
7
+ curl \
8
+ git \
9
+ openssh-client \
10
+ ca-certificates \
11
+ && sudo apt-get clean \
12
+ && sudo rm -rf /var/lib/apt/lists/* \
13
+ && sudo update-ca-certificates
14
+
15
+ # Configure git to use HTTPS instead of SSH for GitHub(系统内部使用,而不是提交到hf space)
16
+ git config --global url."https://github.com/".insteadOf "git@github.com:"
17
+ git config --global url."https://github.com/".insteadOf "ssh://git@github.com/"
18
+
19
+ # Install OpenClaw globally
20
+ npm install -g openclaw@latest
21
+
22
+ ./openclaw-config.sh
23
+
24
+
25
+
openclaw-config.sh ADDED
@@ -0,0 +1 @@
 
 
1
+ openclaw config set gateway.mode local
push.sh ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ OS_TYPE=$(uname -s)
4
+
5
+ case "$OS_TYPE" in
6
+ Darwin*)
7
+ echo "当前系统是 macOS。"
8
+ ssh-add ~/.ssh/id_ed25519_airsltd_mac
9
+ ;;
10
+ Linux*)
11
+ echo "当前系统是 Linux。"
12
+ eval $(ssh-agent)
13
+ ssh-add ~/.ssh/id_ed25519_homepc_airsltd_ubt
14
+ ;;
15
+ CYGWIN*|MINGW*|MSYS*)
16
+ echo "当前系统是 Windows。"
17
+ ;;
18
+ *)
19
+ echo "未知的系统: $OS_TYPE"
20
+ ;;
21
+ esac
22
+ git add .
23
+ git commit -m "update"
24
+ git push
25
+