Merge pull request #25 from ibelick/feat/add-installer

feat: add installer
This commit is contained in:
Julien Thibeaut
2026-02-12 08:15:18 +01:00
committed by GitHub
4 changed files with 207 additions and 7 deletions
+7 -1
View File
@@ -8,7 +8,13 @@ Fast web client for OpenClaw.
Currently in beta.
## Setup
## Installation
```bash
curl -fsSL https://webclaw.dev/install | bash
```
## Other option
Create `apps/webclaw/.env.local` with `CLAWDBOT_GATEWAY_URL` and either
`CLAWDBOT_GATEWAY_TOKEN` (recommended) or `CLAWDBOT_GATEWAY_PASSWORD`. These map
+93
View File
@@ -0,0 +1,93 @@
#!/usr/bin/env bash
set -euo pipefail
REPO_URL="https://github.com/ibelick/webclaw"
APP_DIR="webclaw"
ENV_FILE="apps/webclaw/.env.local"
TRACKING_URL="https://collector.onedollarstats.com/events"
cat <<'EOF'
▄▄ ▄▄
██ ██
██ ██ ▄█▀█▄ ████▄ ▄████ ██ ▀▀█▄ ██ ██
██ █ ██ ██▄█▀ ██ ██ ██ ██ ▄█▀██ ██ █ ██
██▀██ ▀█▄▄▄ ████▀ ▀████ ██ ▀█▄██ ██▀██
Fast web client for OpenClaw
EOF
function track_install() {
if ! command -v curl >/dev/null 2>&1; then
return
fi
local os
local arch
os="$(uname -s 2>/dev/null || echo "unknown")"
arch="$(uname -m 2>/dev/null || echo "unknown")"
curl -sS -X POST \
-H "Content-Type: application/json" \
-d "{\"name\":\"install\",\"event\":\"install\",\"properties\":{\"source\":\"install-script\",\"os\":\"${os}\",\"arch\":\"${arch}\"}}" \
"$TRACKING_URL" >/dev/null 2>&1 || true
}
track_install
if ! command -v git >/dev/null 2>&1; then
echo "git is required but not found."
exit 1
fi
if ! command -v pnpm >/dev/null 2>&1; then
echo "pnpm is required but not found."
echo "Install it with: corepack enable && corepack prepare pnpm@latest --activate"
exit 1
fi
if [ -d "$APP_DIR" ]; then
echo "Directory '$APP_DIR' already exists. Skipping clone."
else
git clone "$REPO_URL" "$APP_DIR"
fi
cd "$APP_DIR"
pnpm install
echo ""
printf "Create %s now? [Y/n]: " "$ENV_FILE"
read -r create_env
if [ -z "$create_env" ] || [ "$create_env" = "y" ] || [ "$create_env" = "Y" ]; then
if [ -f "$ENV_FILE" ]; then
printf "%s already exists. Overwrite? [y/N]: " "$ENV_FILE"
read -r overwrite_env
if [ "$overwrite_env" != "y" ] && [ "$overwrite_env" != "Y" ]; then
echo "Keeping existing $ENV_FILE"
create_env="skip"
fi
fi
if [ "$create_env" != "skip" ]; then
printf "CLAWDBOT_GATEWAY_URL: "
read -r gateway_url
printf "CLAWDBOT_GATEWAY_TOKEN: "
read -r gateway_token
mkdir -p "$(dirname "$ENV_FILE")"
{
echo "CLAWDBOT_GATEWAY_URL=$gateway_url"
echo "CLAWDBOT_GATEWAY_TOKEN=$gateway_token"
} > "$ENV_FILE"
echo "Wrote $ENV_FILE"
fi
else
echo "Skipping env file. Create it later at $ENV_FILE with:"
echo "CLAWDBOT_GATEWAY_URL=..."
echo "CLAWDBOT_GATEWAY_TOKEN=..."
fi
echo ""
echo "Next step: pnpm -C apps/webclaw dev"
+2 -5
View File
@@ -256,10 +256,7 @@ export function App() {
<h2 className="font-[450]">Installation</h2>
<CodeBlock className="rounded-[6px] border-none bg-[#FCFCFC] shadow-2xs outline-1 outline-neutral-950/10 [&>div]:bg-[#FCFCFC] [&>div>pre]:!bg-[#FCFCFC]">
<CodeBlockCode
code={`gh repo clone ibelick/webclaw
cd webclaw
pnpm i
pnpm run dev`}
code={`curl -fsSL https://webclaw.dev/install | bash`}
language="bash"
/>
</CodeBlock>
@@ -270,7 +267,7 @@ pnpm run dev`}
style={{ pointerEvents: "auto" }}
>
<span>
<span>©2026</span>{" "}
<span>©{new Date().getFullYear()}</span>{" "}
<a
href="https://interfaceoffice.com"
target="_blank"
+105 -1
View File
@@ -6,10 +6,17 @@ settings:
importers:
.: {}
.:
devDependencies:
lefthook:
specifier: ^1.11.1
version: 1.13.6
apps/landing:
dependencies:
'@base-ui/react':
specifier: ^1.1.0
version: 1.1.0(@types/react@19.2.13)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
react:
specifier: ^19.2.0
version: 19.2.4
@@ -2452,6 +2459,60 @@ packages:
resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
engines: {node: '>=6'}
lefthook-darwin-arm64@1.13.6:
resolution: {integrity: sha512-m6Lb77VGc84/Qo21Lhq576pEvcgFCnvloEiP02HbAHcIXD0RTLy9u2yAInrixqZeaz13HYtdDaI7OBYAAdVt8A==}
cpu: [arm64]
os: [darwin]
lefthook-darwin-x64@1.13.6:
resolution: {integrity: sha512-CoRpdzanu9RK3oXR1vbEJA5LN7iB+c7hP+sONeQJzoOXuq4PNKVtEaN84Gl1BrVtCNLHWFAvCQaZPPiiXSy8qg==}
cpu: [x64]
os: [darwin]
lefthook-freebsd-arm64@1.13.6:
resolution: {integrity: sha512-X4A7yfvAJ68CoHTqP+XvQzdKbyd935sYy0bQT6Ajz7FL1g7hFiro8dqHSdPdkwei9hs8hXeV7feyTXbYmfjKQQ==}
cpu: [arm64]
os: [freebsd]
lefthook-freebsd-x64@1.13.6:
resolution: {integrity: sha512-ai2m+Sj2kGdY46USfBrCqLKe9GYhzeq01nuyDYCrdGISePeZ6udOlD1k3lQKJGQCHb0bRz4St0r5nKDSh1x/2A==}
cpu: [x64]
os: [freebsd]
lefthook-linux-arm64@1.13.6:
resolution: {integrity: sha512-cbo4Wtdq81GTABvikLORJsAWPKAJXE8Q5RXsICFUVznh5PHigS9dFW/4NXywo0+jfFPCT6SYds2zz4tCx6DA0Q==}
cpu: [arm64]
os: [linux]
lefthook-linux-x64@1.13.6:
resolution: {integrity: sha512-uJl9vjCIIBTBvMZkemxCE+3zrZHlRO7Oc+nZJ+o9Oea3fu+W82jwX7a7clw8jqNfaeBS+8+ZEQgiMHWCloTsGw==}
cpu: [x64]
os: [linux]
lefthook-openbsd-arm64@1.13.6:
resolution: {integrity: sha512-7r153dxrNRQ9ytRs2PmGKKkYdvZYFPre7My7XToSTiRu5jNCq++++eAKVkoyWPduk97dGIA+YWiEr5Noe0TK2A==}
cpu: [arm64]
os: [openbsd]
lefthook-openbsd-x64@1.13.6:
resolution: {integrity: sha512-Z+UhLlcg1xrXOidK3aLLpgH7KrwNyWYE3yb7ITYnzJSEV8qXnePtVu8lvMBHs/myzemjBzeIr/U/+ipjclR06g==}
cpu: [x64]
os: [openbsd]
lefthook-windows-arm64@1.13.6:
resolution: {integrity: sha512-Uxef6qoDxCmUNQwk8eBvddYJKSBFglfwAY9Y9+NnnmiHpWTjjYiObE9gT2mvGVpEgZRJVAatBXc+Ha5oDD/OgQ==}
cpu: [arm64]
os: [win32]
lefthook-windows-x64@1.13.6:
resolution: {integrity: sha512-mOZoM3FQh3o08M8PQ/b3IYuL5oo36D9ehczIw1dAgp1Ly+Tr4fJ96A+4SEJrQuYeRD4mex9bR7Ps56I73sBSZA==}
cpu: [x64]
os: [win32]
lefthook@1.13.6:
resolution: {integrity: sha512-ojj4/4IJ29Xn4drd5emqVgilegAPN3Kf0FQM2p/9+lwSTpU+SZ1v4Ig++NF+9MOa99UKY8bElmVrLhnUUNFh5g==}
hasBin: true
levn@0.4.1:
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
engines: {node: '>= 0.8.0'}
@@ -5708,6 +5769,49 @@ snapshots:
kleur@4.1.5: {}
lefthook-darwin-arm64@1.13.6:
optional: true
lefthook-darwin-x64@1.13.6:
optional: true
lefthook-freebsd-arm64@1.13.6:
optional: true
lefthook-freebsd-x64@1.13.6:
optional: true
lefthook-linux-arm64@1.13.6:
optional: true
lefthook-linux-x64@1.13.6:
optional: true
lefthook-openbsd-arm64@1.13.6:
optional: true
lefthook-openbsd-x64@1.13.6:
optional: true
lefthook-windows-arm64@1.13.6:
optional: true
lefthook-windows-x64@1.13.6:
optional: true
lefthook@1.13.6:
optionalDependencies:
lefthook-darwin-arm64: 1.13.6
lefthook-darwin-x64: 1.13.6
lefthook-freebsd-arm64: 1.13.6
lefthook-freebsd-x64: 1.13.6
lefthook-linux-arm64: 1.13.6
lefthook-linux-x64: 1.13.6
lefthook-openbsd-arm64: 1.13.6
lefthook-openbsd-x64: 1.13.6
lefthook-windows-arm64: 1.13.6
lefthook-windows-x64: 1.13.6
levn@0.4.1:
dependencies:
prelude-ls: 1.2.1