diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..6463297 --- /dev/null +++ b/.env.example @@ -0,0 +1,9 @@ +# Environment Template +OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 +PWD=/Users/MWsatwareAG/internal/mw-macbook-pro +OLDPWD=/Users/MWsatwareAG/internal/mw-macbook-pro/imsg +ELEVENLABS_API_KEY= +HOMEBREW_CELLAR=/usr/local/Cellar +INFOPATH=/usr/local/share/info +KITTY_PUBLIC_KEY= +COLORTERM=truecolor diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1e592ad --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.env +node_debug.log +node_foreground.log diff --git a/docs/shell-standard.md b/docs/shell-standard.md new file mode 100644 index 0000000..c9ad12a --- /dev/null +++ b/docs/shell-standard.md @@ -0,0 +1,22 @@ +# Shell Standardization Plan + +To ensure a consistent development environment across local machines and remote servers (within the satware AG infrastructure), we are standardizing on `bash` with `starship` as the prompt. + +## Deployment Guide + +### Prerequisites +- Access to the target environment. +- `curl` installed (for prompt installation). + +### Execution +Run the provided bootstrap script: + +```bash +/path/to/inner/repo/scripts/bootstrap-shell.sh +``` + +### Manual Verification +After running the script, initiate the shell switch: +1. Ensure the new login shell is available in `/etc/shells` (if on Linux). +2. Run `chsh -s /bin/bash`. +3. Restart your terminal session. diff --git a/scripts/bootstrap-shell.sh b/scripts/bootstrap-shell.sh new file mode 100644 index 0000000..6f2c7c3 --- /dev/null +++ b/scripts/bootstrap-shell.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Standardize shell configuration (bash) + +set -euo pipefail + +echo "Standardizing shell configuration to bash..." + +# Ensure we are in home +cd "$HOME" + +# Install starship if missing +if ! command -v starship &> /dev/null; then + echo "Installing starship prompt..." + curl -sS https://starship.rs/install.sh | sh +fi + +# Apply .bashrc +cat << 'EOF' > .bashrc +# Starship prompt +if command -v starship &> /dev/null; then + eval "$(starship init bash)" +fi + +# Basic Coder Tools +alias ll='ls -la' +alias gs='git status' +alias gp='git pull' +alias gco='git checkout' + +# AI Agent Friendly Aliases +alias ai-logs='tail -f mcp_keepalive.log' +alias node-logs='tail -f node_debug.log' +alias edit-bash='${EDITOR:-nano} ~/.bashrc' +alias source-bash='source ~/.bashrc' + +# Path fixes +export PATH="$HOME/.local/bin:$PATH" +export PATH="$HOME/bin:$PATH" +EOF + +# Apply .bash_profile +cat << 'EOF' > .bash_profile +if [ -f ~/.bashrc ]; then + source ~/.bashrc +fi +EOF + +echo "Bash standardized. Restart your terminal." diff --git a/scripts/openclaw-check.sh b/scripts/openclaw-check.sh new file mode 100755 index 0000000..4c146c8 --- /dev/null +++ b/scripts/openclaw-check.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# OpenClaw Health Check Utility + +echo "--- Service Status ---" +launchctl list | grep ai.openclaw +echo "" + +echo "--- Connectivity Check ---" +curl -i http://127.0.0.1:18789/health +echo "" + +echo "--- Node Logs (Last 10 lines) ---" +tail -n 10 ~/.openclaw/logs/node.err.log +echo "" + +echo "--- Tunnel Logs (Last 10 lines) ---" +tail -n 10 ~/.openclaw/logs/ssh-tunnel.err.log +echo "" diff --git a/scripts/vision-bridge.sh b/scripts/vision-bridge.sh new file mode 100755 index 0000000..297f5ba --- /dev/null +++ b/scripts/vision-bridge.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -euo pipefail + +# vision-bridge.sh: Bridge Peekaboo screenshots to Ollama Vision +# Usage: ./vision-bridge.sh "Describe this screen" [app_name] + +PROMPT="${1:-Describe this image}" +APP="${2:-}" +RETINA="${3:-true}" + +TMP_IMG=$(mktemp /tmp/openclaw-vision-XXXXXX.png) + +cleanup() { + rm -f "$TMP_IMG" +} +trap cleanup EXIT + +# Capture +PEEKABOO_ARGS=(image --path "$TMP_IMG") +if [ -n "$APP" ]; then + PEEKABOO_ARGS+=(--app "$APP") +fi +if [ "$RETINA" = "true" ]; then + PEEKABOO_ARGS+=(--retina) +fi + +echo "[vision] Capturing screen..." >&2 +peekaboo "${PEEKABOO_ARGS[@]}" >/dev/null + +# Analyze +echo "[vision] Analyzing with llama3.2-vision..." >&2 +ollama run llama3.2-vision "$PROMPT" "$TMP_IMG" diff --git a/skills/ollama-vision/SKILL.md b/skills/ollama-vision/SKILL.md new file mode 100644 index 0000000..fa37a7f --- /dev/null +++ b/skills/ollama-vision/SKILL.md @@ -0,0 +1,37 @@ +--- +name: ollama-vision +description: Automated Vision pipeline using Peekaboo for capture and Ollama (llama3.2-vision) for analysis. +homepage: https://ollama.com +metadata: { "openclaw": { "emoji": "👁️", "requires": { "bins": ["peekaboo", "ollama"] } } } +--- + +# Ollama Vision + +Bridge macOS screen capture directly to local vision models. + +## Usage + +```bash +# General screen description +./scripts/vision-bridge.sh "What's on my screen?" + +# Focus on a specific app +./scripts/vision-bridge.sh "Describe this window" "Slack" + +# Higher detail (retina) +./scripts/vision-bridge.sh "Read the text in this terminal" "iTerm2" true +``` + +## Tools + +### vision.see +Capture the screen or a specific app and describe what is visible using Ollama Llama 3.2 Vision. + +**Run configuration:** +- `command`: `/Users/MWsatwareAG/internal/mw-macbook-pro/scripts/vision-bridge.sh` +- `args`: ["{{prompt}}", "{{app}}", "{{retina}}"] + +**Arguments:** +- `prompt`: (string) What to look for or ask about the image. +- `app`: (optional string) Name or bundle ID of the app to focus on. +- `retina`: (optional boolean, default true) Capture at high resolution.