Compare commits

...
Author SHA1 Message Date
luccast 37a4db51de 1.0.2 2026-01-26 19:32:46 -05:00
luccast caf185f917 Refactor Clawdbot client initialization to use configurable WebSocket URL
- Updated the Clawdbot client to accept a WebSocket URL from the environment variable `CLAWDBOT_URL`, defaulting to 'ws://127.0.0.1:18789' if not set. This change enhances flexibility for different deployment environments.
2026-01-26 19:28:39 -05:00
luccast c1a6d38c26 Add gateway token config instructions to README 2026-01-26 17:07:03 -05:00
luccast ef1d8d2052 Fix build output path (dist not .output) 2026-01-26 16:56:05 -05:00
luccast ff50cafe34 Add Docker support and GitHub release workflow 2026-01-26 16:51:47 -05:00
luccast ad791b25af Add version 1.0.1 to package.json 2026-01-26 16:45:52 -05:00
Luciano Castillo 11d642f4e7 Merge pull request #2 from luccast/luccast-patch-1
Update copyright name in LICENSE file
2026-01-26 15:15:09 -05:00
9 changed files with 148 additions and 16 deletions
+7
View File
@@ -0,0 +1,7 @@
node_modules
.output
.git
.github
*.md
.env*
.DS_Store
+66
View File
@@ -0,0 +1,66 @@
name: Release
on:
release:
types: [published]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Create build artifact
run: |
tar -czvf crabwalk-${{ github.ref_name }}.tar.gz dist
- name: Upload build to release
uses: softprops/action-gh-release@v1
with:
files: crabwalk-${{ github.ref_name }}.tar.gz
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+1 -1
View File
@@ -7,7 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
```bash
npm run dev # start dev server on port 3000
npm run build # production build
npm start # run production server (.output/server/index.mjs)
npm start # run production server (dist/server/server.js)
```
## Architecture
+24
View File
@@ -0,0 +1,24 @@
# Build stage
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package.json ./
EXPOSE 3000
CMD ["node", "dist/server/server.js"]
+34 -11
View File
@@ -16,28 +16,51 @@ Watch your AI agents work across WhatsApp, Telegram, Discord, and Slack in a liv
- **Action tracing** - Expand nodes to inspect tool args and payloads
- **Session filtering** - Filter by platform, search by recipient
## Getting Started
## Installation
### Docker (recommended)
```bash
npm install
npm run dev
docker run -d \
-p 3000:3000 \
-e CLAWDBOT_API_TOKEN=your-token \
ghcr.io/luccast/crabwalk:latest
```
Open `http://localhost:3000/monitor` (or `http://<server-ip>:3000/monitor` for remote access)
Or with docker-compose:
```bash
curl -O https://raw.githubusercontent.com/luccast/crabwalk/master/docker-compose.yml
CLAWDBOT_API_TOKEN=your-token docker-compose up -d
```
### From source
```bash
git clone https://github.com/luccast/crabwalk.git
cd crabwalk
npm install
CLAWDBOT_API_TOKEN=your-token npm run dev
```
Open `http://localhost:3000/monitor`
## Configuration
Requires clawdbot gateway running on the same machine.
## Config
### Gateway Token
Token is in `~/.clawdbot/clawdbot.json`
Find your token in the clawdbot config file:
```bash
# Option 1: command line
CLAWDBOT_API_TOKEN=your-token npm run dev
cat ~/.clawdbot/clawdbot.json | grep api_token
```
# Option 2: env file
echo "CLAWDBOT_API_TOKEN=your-token" > .env.local
npm run dev
Or copy it directly:
```bash
export CLAWDBOT_API_TOKEN=$(cat ~/.clawdbot/clawdbot.json | grep -o '"api_token": *"[^"]*"' | cut -d'"' -f4)
```
## Stack
+8
View File
@@ -0,0 +1,8 @@
services:
crabwalk:
image: ghcr.io/luccast/crabwalk:latest
ports:
- "3000:3000"
environment:
- CLAWDBOT_API_TOKEN=${CLAWDBOT_API_TOKEN}
restart: unless-stopped
+4 -2
View File
@@ -37,7 +37,8 @@
"tailwindcss": "^4.0.0",
"typescript": "^5.7.0",
"vite": "^7.0.0"
}
},
"version": "1.0.2"
},
"node_modules/@babel/code-frame": {
"version": "7.28.6",
@@ -5524,5 +5525,6 @@
"url": "https://github.com/sponsors/wooorm"
}
}
}
},
"version": "1.0.2"
}
+2 -1
View File
@@ -1,11 +1,12 @@
{
"name": "crabwalk",
"version": "1.0.2",
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev --port 3000 --host",
"build": "vite build",
"start": "node .output/server/index.mjs"
"start": "node dist/server/server.js"
},
"dependencies": {
"@tanstack/db": "^0.5.0",
+2 -1
View File
@@ -241,8 +241,9 @@ let clientInstance: ClawdbotClient | null = null
export function getClawdbotClient(): ClawdbotClient {
if (!clientInstance) {
const url = process.env.CLAWDBOT_URL || 'ws://127.0.0.1:18789'
const token = process.env.CLAWDBOT_API_TOKEN
clientInstance = new ClawdbotClient('ws://127.0.0.1:18789', token)
clientInstance = new ClawdbotClient(url, token)
}
return clientInstance
}