mirror of
https://github.com/crabwise-ai/crabwalk.git
synced 2026-08-17 10:32:03 +00:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37a4db51de | ||
|
|
caf185f917 | ||
|
|
c1a6d38c26 | ||
|
|
ef1d8d2052 | ||
|
|
ff50cafe34 | ||
|
|
ad791b25af | ||
|
|
11d642f4e7 |
@@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
.output
|
||||
.git
|
||||
.github
|
||||
*.md
|
||||
.env*
|
||||
.DS_Store
|
||||
@@ -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 }}
|
||||
@@ -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
@@ -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"]
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
Generated
+4
-2
@@ -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
@@ -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",
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user