@hitechclaw/clawspark 2.0.0
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/CHANGELOG.md +35 -0
- package/LICENSE +21 -0
- package/README.md +378 -0
- package/clawspark +2715 -0
- package/configs/models.yaml +108 -0
- package/configs/skill-packs.yaml +44 -0
- package/configs/skills.yaml +37 -0
- package/install.sh +387 -0
- package/lib/common.sh +249 -0
- package/lib/detect-hardware.sh +156 -0
- package/lib/diagnose.sh +636 -0
- package/lib/render-diagram.sh +47 -0
- package/lib/sandbox-commands.sh +415 -0
- package/lib/secure.sh +244 -0
- package/lib/select-model.sh +442 -0
- package/lib/setup-browser.sh +138 -0
- package/lib/setup-dashboard.sh +228 -0
- package/lib/setup-inference.sh +128 -0
- package/lib/setup-mcp.sh +142 -0
- package/lib/setup-messaging.sh +242 -0
- package/lib/setup-models.sh +121 -0
- package/lib/setup-openclaw.sh +808 -0
- package/lib/setup-sandbox.sh +188 -0
- package/lib/setup-skills.sh +113 -0
- package/lib/setup-systemd.sh +224 -0
- package/lib/setup-tailscale.sh +188 -0
- package/lib/setup-voice.sh +101 -0
- package/lib/skill-audit.sh +449 -0
- package/lib/verify.sh +177 -0
- package/package.json +57 -0
- package/scripts/release.sh +133 -0
- package/uninstall.sh +161 -0
- package/v2/README.md +50 -0
- package/v2/configs/providers.yaml +79 -0
- package/v2/configs/skills.yaml +36 -0
- package/v2/install.sh +116 -0
- package/v2/lib/common.sh +285 -0
- package/v2/lib/detect-hardware.sh +119 -0
- package/v2/lib/select-runtime.sh +273 -0
- package/v2/lib/setup-extras.sh +95 -0
- package/v2/lib/setup-openclaw.sh +187 -0
- package/v2/lib/setup-provider.sh +131 -0
- package/v2/lib/verify.sh +133 -0
- package/web/index.html +1835 -0
- package/web/install.sh +387 -0
- package/web/logo-hero.svg +11 -0
- package/web/logo-icon.svg +12 -0
- package/web/logo.svg +17 -0
- package/web/vercel.json +8 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
5
|
+
cd "${ROOT_DIR}"
|
|
6
|
+
|
|
7
|
+
usage() {
|
|
8
|
+
cat <<'USAGE'
|
|
9
|
+
Usage: bash scripts/release.sh [patch|minor|major|<version>] [--push]
|
|
10
|
+
|
|
11
|
+
Examples:
|
|
12
|
+
bash scripts/release.sh patch
|
|
13
|
+
bash scripts/release.sh minor --push
|
|
14
|
+
bash scripts/release.sh 2.1.0 --push
|
|
15
|
+
USAGE
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
require_clean_git() {
|
|
19
|
+
if ! git diff --quiet || ! git diff --cached --quiet; then
|
|
20
|
+
echo "Working tree is not clean. Commit or stash changes before releasing." >&2
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
require_command() {
|
|
26
|
+
command -v "$1" >/dev/null 2>&1 || {
|
|
27
|
+
echo "Required command not found: $1" >&2
|
|
28
|
+
exit 1
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
resolve_command() {
|
|
33
|
+
local candidate="$1"
|
|
34
|
+
local resolved=""
|
|
35
|
+
|
|
36
|
+
if resolved="$(command -v "${candidate}" 2>/dev/null)" && [[ -n "${resolved}" ]]; then
|
|
37
|
+
printf '%s' "${resolved}"
|
|
38
|
+
return 0
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
if resolved="$(command -v "${candidate}.exe" 2>/dev/null)" && [[ -n "${resolved}" ]]; then
|
|
42
|
+
printf '%s' "${resolved}"
|
|
43
|
+
return 0
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
if resolved="$(command -v "${candidate}.cmd" 2>/dev/null)" && [[ -n "${resolved}" ]]; then
|
|
47
|
+
printf '%s' "${resolved}"
|
|
48
|
+
return 0
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
if command -v where.exe >/dev/null 2>&1; then
|
|
52
|
+
resolved="$(where.exe "${candidate}" 2>/dev/null | head -n 1 | tr -d '\r')"
|
|
53
|
+
if [[ -n "${resolved}" ]]; then
|
|
54
|
+
printf '%s' "${resolved}"
|
|
55
|
+
return 0
|
|
56
|
+
fi
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
return 1
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
require_runtime_command() {
|
|
63
|
+
local candidate="$1"
|
|
64
|
+
local resolved=""
|
|
65
|
+
|
|
66
|
+
if resolved="$(resolve_command "${candidate}" 2>/dev/null)" && [[ -n "${resolved}" ]]; then
|
|
67
|
+
printf '%s' "${resolved}"
|
|
68
|
+
return 0
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
echo "Required command not found: ${candidate}" >&2
|
|
72
|
+
exit 1
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
bump_arg="${1:-}"
|
|
76
|
+
push_flag="false"
|
|
77
|
+
|
|
78
|
+
if [[ -z "${bump_arg}" || "${bump_arg}" == "-h" || "${bump_arg}" == "--help" ]]; then
|
|
79
|
+
usage
|
|
80
|
+
exit 0
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
shift || true
|
|
84
|
+
while [[ $# -gt 0 ]]; do
|
|
85
|
+
case "$1" in
|
|
86
|
+
--push)
|
|
87
|
+
push_flag="true"
|
|
88
|
+
shift
|
|
89
|
+
;;
|
|
90
|
+
*)
|
|
91
|
+
echo "Unknown option: $1" >&2
|
|
92
|
+
usage
|
|
93
|
+
exit 1
|
|
94
|
+
;;
|
|
95
|
+
esac
|
|
96
|
+
done
|
|
97
|
+
|
|
98
|
+
require_command git
|
|
99
|
+
require_command bash
|
|
100
|
+
|
|
101
|
+
NODE_BIN="$(require_runtime_command node)"
|
|
102
|
+
NPM_BIN="$(require_runtime_command npm)"
|
|
103
|
+
|
|
104
|
+
require_clean_git
|
|
105
|
+
|
|
106
|
+
bash -n ./clawspark
|
|
107
|
+
bash ./tests/run.sh
|
|
108
|
+
"${NPM_BIN}" pack --dry-run >/dev/null
|
|
109
|
+
|
|
110
|
+
case "${bump_arg}" in
|
|
111
|
+
patch|minor|major)
|
|
112
|
+
"${NPM_BIN}" version "${bump_arg}"
|
|
113
|
+
;;
|
|
114
|
+
*)
|
|
115
|
+
if [[ ! "${bump_arg}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
116
|
+
echo "Version must be patch, minor, major, or an explicit semver like 2.1.0" >&2
|
|
117
|
+
exit 1
|
|
118
|
+
fi
|
|
119
|
+
"${NPM_BIN}" version "${bump_arg}"
|
|
120
|
+
;;
|
|
121
|
+
esac
|
|
122
|
+
|
|
123
|
+
new_version="$("${NODE_BIN}" -p "require('./package.json').version")"
|
|
124
|
+
echo "Prepared release v${new_version}"
|
|
125
|
+
|
|
126
|
+
echo "Next steps:"
|
|
127
|
+
echo " git push origin main --follow-tags"
|
|
128
|
+
|
|
129
|
+
echo "This will trigger CI, npm publish, and GitHub Release workflows once pushed."
|
|
130
|
+
|
|
131
|
+
if [[ "${push_flag}" == "true" ]]; then
|
|
132
|
+
git push origin main --follow-tags
|
|
133
|
+
fi
|
package/uninstall.sh
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# uninstall.sh — Clean removal of clawspark, OpenClaw, models, and configs.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
CLAWSPARK_DIR="${HOME}/.clawspark"
|
|
6
|
+
|
|
7
|
+
# ── Minimal color support ──────────────────────────────────────────────────
|
|
8
|
+
if [[ -t 1 ]]; then
|
|
9
|
+
RED=$'\033[0;31m'; GREEN=$'\033[0;32m'; YELLOW=$'\033[0;33m'
|
|
10
|
+
CYAN=$'\033[0;36m'; BOLD=$'\033[1m'; RESET=$'\033[0m'
|
|
11
|
+
else
|
|
12
|
+
RED=''; GREEN=''; YELLOW=''; CYAN=''; BOLD=''; RESET=''
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
log_info() { printf '%s[INFO]%s %s\n' "${CYAN}" "${RESET}" "$*"; }
|
|
16
|
+
log_warn() { printf '%s[WARN]%s %s\n' "${YELLOW}" "${RESET}" "$*" >&2; }
|
|
17
|
+
log_success() { printf '%s[OK]%s %s\n' "${GREEN}" "${RESET}" "$*"; }
|
|
18
|
+
log_error() { printf '%s[ERROR]%s %s\n' "${RED}" "${RESET}" "$*" >&2; }
|
|
19
|
+
|
|
20
|
+
# ── Confirmation ────────────────────────────────────────────────────────────
|
|
21
|
+
confirmed=false
|
|
22
|
+
if [[ "${1:-}" == "--confirmed" ]]; then
|
|
23
|
+
confirmed=true
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if ! ${confirmed}; then
|
|
27
|
+
printf '\n%s%s clawspark uninstaller%s\n\n' "${BOLD}" "${RED}" "${RESET}"
|
|
28
|
+
printf ' This will remove:\n'
|
|
29
|
+
printf ' - OpenClaw (npm global package)\n'
|
|
30
|
+
printf ' - OpenClaw configuration (~/.openclaw)\n'
|
|
31
|
+
printf ' - clawspark data (~/.clawspark)\n'
|
|
32
|
+
printf ' - clawspark CLI (/usr/local/bin/clawspark)\n'
|
|
33
|
+
printf ' - Optionally: Ollama models\n'
|
|
34
|
+
printf ' - Optionally: firewall rules\n\n'
|
|
35
|
+
|
|
36
|
+
printf ' %sType YES to proceed:%s ' "${RED}" "${RESET}"
|
|
37
|
+
read -r answer
|
|
38
|
+
if [[ "${answer}" != "YES" ]]; then
|
|
39
|
+
log_info "Uninstall cancelled."
|
|
40
|
+
exit 0
|
|
41
|
+
fi
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
printf '\n'
|
|
45
|
+
|
|
46
|
+
# ── Step 1: Stop services ──────────────────────────────────────────────────
|
|
47
|
+
log_info "Stopping services..."
|
|
48
|
+
|
|
49
|
+
# Gateway
|
|
50
|
+
if [[ -f "${CLAWSPARK_DIR}/gateway.pid" ]]; then
|
|
51
|
+
local_pid=$(cat "${CLAWSPARK_DIR}/gateway.pid" 2>/dev/null || echo "")
|
|
52
|
+
if [[ -n "${local_pid}" ]] && kill -0 "${local_pid}" 2>/dev/null; then
|
|
53
|
+
kill "${local_pid}" 2>/dev/null || true
|
|
54
|
+
log_info "Gateway stopped (PID ${local_pid})."
|
|
55
|
+
fi
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# Ollama (only our managed instance)
|
|
59
|
+
if [[ -f "${CLAWSPARK_DIR}/ollama.pid" ]]; then
|
|
60
|
+
local_pid=$(cat "${CLAWSPARK_DIR}/ollama.pid" 2>/dev/null || echo "")
|
|
61
|
+
if [[ -n "${local_pid}" ]] && kill -0 "${local_pid}" 2>/dev/null; then
|
|
62
|
+
kill "${local_pid}" 2>/dev/null || true
|
|
63
|
+
log_info "Ollama stopped (PID ${local_pid})."
|
|
64
|
+
fi
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
# If Ollama is managed by systemd, stop it too
|
|
68
|
+
if command -v systemctl &>/dev/null && systemctl is-active ollama &>/dev/null; then
|
|
69
|
+
log_info "Stopping Ollama systemd service..."
|
|
70
|
+
sudo systemctl stop ollama 2>/dev/null || true
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
log_success "Services stopped."
|
|
74
|
+
|
|
75
|
+
# ── Step 2: Optionally remove Ollama models ────────────────────────────────
|
|
76
|
+
if command -v ollama &>/dev/null; then
|
|
77
|
+
if ${confirmed}; then
|
|
78
|
+
remove_models="n"
|
|
79
|
+
else
|
|
80
|
+
printf '\n %sRemove all Ollama models? This frees disk space but re-download needed later.%s\n' "${YELLOW}" "${RESET}"
|
|
81
|
+
printf ' %s[y/N]:%s ' "${BOLD}" "${RESET}"
|
|
82
|
+
read -r remove_models
|
|
83
|
+
remove_models=$(echo "${remove_models}" | tr '[:upper:]' '[:lower:]')
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
if [[ "${remove_models}" =~ ^y ]]; then
|
|
87
|
+
log_info "Removing Ollama models..."
|
|
88
|
+
local_models=$(ollama list 2>/dev/null | tail -n +2 | awk '{print $1}')
|
|
89
|
+
for model in ${local_models}; do
|
|
90
|
+
printf ' Removing %s ... ' "${model}"
|
|
91
|
+
ollama rm "${model}" 2>/dev/null && printf '%sdone%s\n' "${GREEN}" "${RESET}" \
|
|
92
|
+
|| printf '%sfailed%s\n' "${YELLOW}" "${RESET}"
|
|
93
|
+
done
|
|
94
|
+
log_success "Models removed."
|
|
95
|
+
else
|
|
96
|
+
log_info "Keeping Ollama models."
|
|
97
|
+
fi
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
# ── Step 3: Uninstall OpenClaw ──────────────────────────────────────────────
|
|
101
|
+
if command -v openclaw &>/dev/null; then
|
|
102
|
+
log_info "Uninstalling OpenClaw..."
|
|
103
|
+
npm uninstall -g openclaw 2>/dev/null || true
|
|
104
|
+
log_success "OpenClaw removed."
|
|
105
|
+
else
|
|
106
|
+
log_info "OpenClaw not found — skipping."
|
|
107
|
+
fi
|
|
108
|
+
|
|
109
|
+
# ── Step 4: Remove configuration directories ───────────────────────────────
|
|
110
|
+
log_info "Removing configuration directories..."
|
|
111
|
+
|
|
112
|
+
if [[ -d "${HOME}/.openclaw" ]]; then
|
|
113
|
+
rm -rf "${HOME}/.openclaw"
|
|
114
|
+
log_info "Removed ~/.openclaw"
|
|
115
|
+
fi
|
|
116
|
+
|
|
117
|
+
if [[ -d "${CLAWSPARK_DIR}" ]]; then
|
|
118
|
+
rm -rf "${CLAWSPARK_DIR}"
|
|
119
|
+
log_info "Removed ~/.clawspark"
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
# ── Step 5: Remove CLI ─────────────────────────────────────────────────────
|
|
123
|
+
if [[ -f /usr/local/bin/clawspark ]]; then
|
|
124
|
+
log_info "Removing /usr/local/bin/clawspark..."
|
|
125
|
+
sudo rm -f /usr/local/bin/clawspark 2>/dev/null || {
|
|
126
|
+
log_warn "Could not remove /usr/local/bin/clawspark — you may need to delete it manually."
|
|
127
|
+
}
|
|
128
|
+
log_success "CLI removed."
|
|
129
|
+
fi
|
|
130
|
+
|
|
131
|
+
# ── Step 6: Revert firewall rules ──────────────────────────────────────────
|
|
132
|
+
if command -v ufw &>/dev/null; then
|
|
133
|
+
if ${confirmed}; then
|
|
134
|
+
revert_fw="n"
|
|
135
|
+
else
|
|
136
|
+
printf '\n %sRevert firewall (UFW) rules added by clawspark?%s\n' "${YELLOW}" "${RESET}"
|
|
137
|
+
printf ' %s[y/N]:%s ' "${BOLD}" "${RESET}"
|
|
138
|
+
read -r revert_fw
|
|
139
|
+
revert_fw=$(echo "${revert_fw}" | tr '[:upper:]' '[:lower:]')
|
|
140
|
+
fi
|
|
141
|
+
|
|
142
|
+
if [[ "${revert_fw}" =~ ^y ]]; then
|
|
143
|
+
log_info "Reverting UFW rules..."
|
|
144
|
+
sudo ufw default allow outgoing 2>/dev/null || true
|
|
145
|
+
# Reset rules added for air-gap
|
|
146
|
+
sudo ufw delete allow out to 10.0.0.0/8 2>/dev/null || true
|
|
147
|
+
sudo ufw delete allow out to 172.16.0.0/12 2>/dev/null || true
|
|
148
|
+
sudo ufw delete allow out to 192.168.0.0/16 2>/dev/null || true
|
|
149
|
+
sudo ufw delete allow out to 127.0.0.0/8 2>/dev/null || true
|
|
150
|
+
sudo ufw delete allow out 53 2>/dev/null || true
|
|
151
|
+
log_success "Firewall rules reverted."
|
|
152
|
+
else
|
|
153
|
+
log_info "Keeping firewall rules as-is."
|
|
154
|
+
fi
|
|
155
|
+
fi
|
|
156
|
+
|
|
157
|
+
# ── Done ────────────────────────────────────────────────────────────────────
|
|
158
|
+
printf '\n'
|
|
159
|
+
printf ' %s%sclawspark has been completely removed.%s\n' "${GREEN}" "${BOLD}" "${RESET}"
|
|
160
|
+
printf ' Ollama itself was NOT uninstalled (only models were optionally removed).\n'
|
|
161
|
+
printf ' To remove Ollama: sudo rm -f /usr/local/bin/ollama\n\n'
|
package/v2/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# clawspark v2
|
|
2
|
+
|
|
3
|
+
`v2/` is a CPU-friendly and provider-aware installer track for `clawspark`.
|
|
4
|
+
|
|
5
|
+
## Goals
|
|
6
|
+
|
|
7
|
+
- Support machines with **CPU only**, not just GPU-first setups.
|
|
8
|
+
- Allow **third-party API providers** as primary inference backends.
|
|
9
|
+
- Keep **hybrid mode** available for local + cloud fallback.
|
|
10
|
+
- Preserve OpenClaw-based workflow while reducing hard dependency on Ollama.
|
|
11
|
+
|
|
12
|
+
## Runtime modes
|
|
13
|
+
|
|
14
|
+
- `local-gpu` — local Ollama on GPU hardware.
|
|
15
|
+
- `local-cpu` — local Ollama on CPU-first hosts.
|
|
16
|
+
- `api-only` — no local model install, use provider API directly.
|
|
17
|
+
- `hybrid` — combine local and remote providers.
|
|
18
|
+
|
|
19
|
+
## Providers
|
|
20
|
+
|
|
21
|
+
Current provider catalog is in `v2/configs/providers.yaml`.
|
|
22
|
+
|
|
23
|
+
Initial providers:
|
|
24
|
+
|
|
25
|
+
- `ollama`
|
|
26
|
+
- `openai`
|
|
27
|
+
- `anthropic`
|
|
28
|
+
- `openrouter`
|
|
29
|
+
- `google`
|
|
30
|
+
- `custom` (OpenAI-compatible third-party endpoint)
|
|
31
|
+
|
|
32
|
+
## Main files
|
|
33
|
+
|
|
34
|
+
- `v2/install.sh` — new installer entrypoint.
|
|
35
|
+
- `v2/lib/detect-hardware.sh` — CPU/GPU-aware classification.
|
|
36
|
+
- `v2/lib/select-runtime.sh` — runtime, provider, and model selection.
|
|
37
|
+
- `v2/lib/setup-provider.sh` — local or API backend preparation.
|
|
38
|
+
- `v2/lib/setup-openclaw.sh` — provider-aware OpenClaw config.
|
|
39
|
+
- `v2/lib/setup-extras.sh` — reuses legacy skill, voice, messaging, and security modules.
|
|
40
|
+
- `v2/lib/verify.sh` — validation for both local and API modes.
|
|
41
|
+
|
|
42
|
+
## Notes
|
|
43
|
+
|
|
44
|
+
`v2` now reuses the stable legacy modules for skills, voice, messaging, and security hardening.
|
|
45
|
+
|
|
46
|
+
Runtime state is kept under `~/.clawspark-v2`, while OpenClaw configuration remains under `~/.openclaw`.
|
|
47
|
+
|
|
48
|
+
For `custom`, provide your own base URL, API key, and model ID. This is intended for OpenAI-compatible vendors, self-hosted gateways, or enterprise AI endpoints.
|
|
49
|
+
|
|
50
|
+
The root `clawspark` CLI is now v2-aware for profile detection, provider-aware status, and remote/custom model inspection. `v2` should still be treated as a preview track while broader command coverage continues to improve.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
providers:
|
|
2
|
+
ollama:
|
|
3
|
+
type: local
|
|
4
|
+
runtime_modes:
|
|
5
|
+
- local-gpu
|
|
6
|
+
- local-cpu
|
|
7
|
+
- hybrid
|
|
8
|
+
default_base_url: http://127.0.0.1:11434/v1
|
|
9
|
+
env:
|
|
10
|
+
api_key: OLLAMA_API_KEY
|
|
11
|
+
base_url: OLLAMA_BASE_URL
|
|
12
|
+
cpu_models:
|
|
13
|
+
- qwen2.5:14b-instruct-q4_K_M
|
|
14
|
+
- qwen2.5:7b-instruct-q4_K_M
|
|
15
|
+
- llama3.1:8b-instruct-q4_K_M
|
|
16
|
+
- phi4-mini
|
|
17
|
+
openai:
|
|
18
|
+
type: api
|
|
19
|
+
runtime_modes:
|
|
20
|
+
- api-only
|
|
21
|
+
- hybrid
|
|
22
|
+
default_base_url: https://api.openai.com/v1
|
|
23
|
+
env:
|
|
24
|
+
api_key: OPENAI_API_KEY
|
|
25
|
+
base_url: OPENAI_BASE_URL
|
|
26
|
+
models:
|
|
27
|
+
- gpt-4.1
|
|
28
|
+
- gpt-4.1-mini
|
|
29
|
+
- gpt-5-mini
|
|
30
|
+
anthropic:
|
|
31
|
+
type: api
|
|
32
|
+
runtime_modes:
|
|
33
|
+
- api-only
|
|
34
|
+
- hybrid
|
|
35
|
+
default_base_url: https://api.anthropic.com
|
|
36
|
+
env:
|
|
37
|
+
api_key: ANTHROPIC_API_KEY
|
|
38
|
+
base_url: ANTHROPIC_BASE_URL
|
|
39
|
+
models:
|
|
40
|
+
- claude-sonnet-4-20250514
|
|
41
|
+
- claude-3-5-haiku-latest
|
|
42
|
+
openrouter:
|
|
43
|
+
type: api
|
|
44
|
+
runtime_modes:
|
|
45
|
+
- api-only
|
|
46
|
+
- hybrid
|
|
47
|
+
default_base_url: https://openrouter.ai/api/v1
|
|
48
|
+
env:
|
|
49
|
+
api_key: OPENROUTER_API_KEY
|
|
50
|
+
base_url: OPENROUTER_BASE_URL
|
|
51
|
+
models:
|
|
52
|
+
- openai/gpt-4.1-mini
|
|
53
|
+
- anthropic/claude-3.5-haiku
|
|
54
|
+
- google/gemini-2.0-flash-001
|
|
55
|
+
google:
|
|
56
|
+
type: api
|
|
57
|
+
runtime_modes:
|
|
58
|
+
- api-only
|
|
59
|
+
- hybrid
|
|
60
|
+
default_base_url: https://generativelanguage.googleapis.com/v1beta/openai
|
|
61
|
+
env:
|
|
62
|
+
api_key: GOOGLE_API_KEY
|
|
63
|
+
base_url: GOOGLE_BASE_URL
|
|
64
|
+
models:
|
|
65
|
+
- gemini-2.0-flash
|
|
66
|
+
- gemini-1.5-pro
|
|
67
|
+
custom:
|
|
68
|
+
type: api
|
|
69
|
+
runtime_modes:
|
|
70
|
+
- api-only
|
|
71
|
+
- hybrid
|
|
72
|
+
default_base_url: https://your-provider.example.com/v1
|
|
73
|
+
env:
|
|
74
|
+
api_key: CUSTOM_AI_API_KEY
|
|
75
|
+
base_url: CUSTOM_AI_BASE_URL
|
|
76
|
+
provider_name: CUSTOM_AI_PROVIDER_NAME
|
|
77
|
+
notes:
|
|
78
|
+
- OpenAI-compatible custom endpoint
|
|
79
|
+
- Bring your own model ID
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# clawspark v2 default skills
|
|
2
|
+
# Edit this file and re-run `bash v2/install.sh` to re-apply skill setup.
|
|
3
|
+
|
|
4
|
+
skills:
|
|
5
|
+
enabled:
|
|
6
|
+
# Core
|
|
7
|
+
- name: local-whisper
|
|
8
|
+
description: Offline voice transcription via Whisper
|
|
9
|
+
- name: self-improvement
|
|
10
|
+
description: Agent learns from your corrections
|
|
11
|
+
- name: memory-setup
|
|
12
|
+
description: Persistent memory across conversations
|
|
13
|
+
|
|
14
|
+
# Voice
|
|
15
|
+
- name: whatsapp-voice-chat-integration-open-source
|
|
16
|
+
description: Voice notes to conversational flow
|
|
17
|
+
|
|
18
|
+
# Productivity
|
|
19
|
+
- name: deep-research-pro
|
|
20
|
+
description: Multi-step research with planning
|
|
21
|
+
- name: agent-browser
|
|
22
|
+
description: Web automation and browsing
|
|
23
|
+
|
|
24
|
+
# Knowledge
|
|
25
|
+
- name: second-brain
|
|
26
|
+
description: Personal knowledge base
|
|
27
|
+
- name: proactive-agent
|
|
28
|
+
description: Proactive assistance and suggestions
|
|
29
|
+
|
|
30
|
+
# Web Search
|
|
31
|
+
- name: ddg-web-search
|
|
32
|
+
description: DuckDuckGo search (no API key needed)
|
|
33
|
+
- name: local-web-search-skill
|
|
34
|
+
description: Local web search fallback
|
|
35
|
+
|
|
36
|
+
custom: []
|
package/v2/install.sh
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
|
|
6
|
+
CLAWSPARK_DEFAULTS="${CLAWSPARK_DEFAULTS:-false}"
|
|
7
|
+
FLAG_RUNTIME_MODE=""
|
|
8
|
+
FLAG_PROVIDER=""
|
|
9
|
+
FLAG_API_KEY=""
|
|
10
|
+
FLAG_BASE_URL=""
|
|
11
|
+
FLAG_PROVIDER_NAME=""
|
|
12
|
+
FLAG_MODEL=""
|
|
13
|
+
FLAG_MESSAGING=""
|
|
14
|
+
AIR_GAP="false"
|
|
15
|
+
|
|
16
|
+
while [[ $# -gt 0 ]]; do
|
|
17
|
+
case "$1" in
|
|
18
|
+
--defaults)
|
|
19
|
+
CLAWSPARK_DEFAULTS="true"
|
|
20
|
+
shift ;;
|
|
21
|
+
--runtime=*)
|
|
22
|
+
FLAG_RUNTIME_MODE="${1#*=}"
|
|
23
|
+
shift ;;
|
|
24
|
+
--provider=*)
|
|
25
|
+
FLAG_PROVIDER="${1#*=}"
|
|
26
|
+
shift ;;
|
|
27
|
+
--api-key=*)
|
|
28
|
+
FLAG_API_KEY="${1#*=}"
|
|
29
|
+
shift ;;
|
|
30
|
+
--base-url=*)
|
|
31
|
+
FLAG_BASE_URL="${1#*=}"
|
|
32
|
+
shift ;;
|
|
33
|
+
--provider-name=*)
|
|
34
|
+
FLAG_PROVIDER_NAME="${1#*=}"
|
|
35
|
+
shift ;;
|
|
36
|
+
--model=*)
|
|
37
|
+
FLAG_MODEL="${1#*=}"
|
|
38
|
+
shift ;;
|
|
39
|
+
--messaging=*)
|
|
40
|
+
FLAG_MESSAGING="${1#*=}"
|
|
41
|
+
shift ;;
|
|
42
|
+
--air-gap|--airgap)
|
|
43
|
+
AIR_GAP="true"
|
|
44
|
+
shift ;;
|
|
45
|
+
-h|--help)
|
|
46
|
+
cat <<HELP
|
|
47
|
+
Usage: v2/install.sh [OPTIONS]
|
|
48
|
+
|
|
49
|
+
Options:
|
|
50
|
+
--defaults Skip interactive prompts
|
|
51
|
+
--runtime=<mode> local-gpu | local-cpu | api-only | hybrid
|
|
52
|
+
--provider=<name> ollama | openai | anthropic | openrouter | google | custom
|
|
53
|
+
--api-key=<key> Provider API key for API modes
|
|
54
|
+
--base-url=<url> Override provider API base URL
|
|
55
|
+
--provider-name=<name> Label for custom API provider
|
|
56
|
+
--model=<id> Override default model ID
|
|
57
|
+
--messaging=<type> whatsapp | telegram | both | skip
|
|
58
|
+
--air-gap Enable outbound network lock-down after setup
|
|
59
|
+
-h, --help Show this help
|
|
60
|
+
HELP
|
|
61
|
+
exit 0 ;;
|
|
62
|
+
*)
|
|
63
|
+
echo "Unknown option: $1" >&2
|
|
64
|
+
exit 1 ;;
|
|
65
|
+
esac
|
|
66
|
+
done
|
|
67
|
+
|
|
68
|
+
CLAWSPARK_REPO_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
69
|
+
|
|
70
|
+
export CLAWSPARK_DEFAULTS FLAG_RUNTIME_MODE FLAG_PROVIDER FLAG_API_KEY FLAG_BASE_URL FLAG_PROVIDER_NAME FLAG_MODEL
|
|
71
|
+
export FLAG_MESSAGING AIR_GAP CLAWSPARK_REPO_DIR
|
|
72
|
+
|
|
73
|
+
source "${SCRIPT_DIR}/lib/common.sh"
|
|
74
|
+
source "${SCRIPT_DIR}/lib/detect-hardware.sh"
|
|
75
|
+
source "${SCRIPT_DIR}/lib/select-runtime.sh"
|
|
76
|
+
source "${SCRIPT_DIR}/lib/setup-provider.sh"
|
|
77
|
+
source "${SCRIPT_DIR}/lib/setup-openclaw.sh"
|
|
78
|
+
source "${SCRIPT_DIR}/lib/setup-extras.sh"
|
|
79
|
+
source "${SCRIPT_DIR}/lib/verify.sh"
|
|
80
|
+
|
|
81
|
+
mkdir -p "${CLAWSPARK_V2_DIR}"
|
|
82
|
+
: > "${CLAWSPARK_V2_LOG}"
|
|
83
|
+
|
|
84
|
+
show_banner_v2() {
|
|
85
|
+
printf '\n%s%sclawspark v2%s\n' "${BOLD}" "${BLUE}" "${RESET}"
|
|
86
|
+
printf '%sCPU-ready, API-ready OpenClaw installer%s\n\n' "${CYAN}" "${RESET}"
|
|
87
|
+
hr
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
show_banner_v2
|
|
91
|
+
|
|
92
|
+
detect_hardware_v2
|
|
93
|
+
select_runtime_v2
|
|
94
|
+
select_provider_v2
|
|
95
|
+
select_model_v2
|
|
96
|
+
|
|
97
|
+
if [[ -n "${FLAG_MODEL}" ]]; then
|
|
98
|
+
SELECTED_MODEL_ID="${FLAG_MODEL}"
|
|
99
|
+
SELECTED_MODEL_NAME="${FLAG_MODEL}"
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
collect_provider_credentials_v2
|
|
103
|
+
setup_provider_v2
|
|
104
|
+
setup_openclaw_v2
|
|
105
|
+
setup_v2_extras
|
|
106
|
+
verify_v2_installation
|
|
107
|
+
|
|
108
|
+
printf '\n'
|
|
109
|
+
log_success "clawspark v2 setup finished."
|
|
110
|
+
print_box \
|
|
111
|
+
"${BOLD}Summary${RESET}" \
|
|
112
|
+
"" \
|
|
113
|
+
"Runtime : ${RUNTIME_MODE}" \
|
|
114
|
+
"Provider : ${PRIMARY_PROVIDER}" \
|
|
115
|
+
"Model : ${SELECTED_MODEL_ID}" \
|
|
116
|
+
"API URL : ${INFERENCE_API_URL:-n/a}"
|