diff --git a/0claw.toml b/0claw.toml new file mode 100644 index 0000000..29e6bad --- /dev/null +++ b/0claw.toml @@ -0,0 +1,15 @@ +# 0claw default config — uses GROQ_API_KEY from environment (set in .env / docker-compose) +port = 3007 + +[llm] +base_url = "https://api.groq.com/openai/v1" +api_key = "${GROQ_API_KEY}" +model = "llama-3.3-70b-versatile" + +# [mcp_servers.filesystem] +# command = "npx" +# args = ["-y", "@modelcontextprotocol/server-filesystem", "."] + +# [telegram] +# token = "${TELEGRAM_BOT_TOKEN}" +# allowed_users = [] diff --git a/0claw.toml.example b/0claw.toml.example new file mode 100644 index 0000000..0966865 --- /dev/null +++ b/0claw.toml.example @@ -0,0 +1,17 @@ +# 0claw / zero-claw config — copy to 0claw.toml and set API key +# Or: export ZEROCLAW_CONFIG=~/0claw.toml + +port = 3007 + +[llm] +base_url = "https://api.groq.com/openai/v1" +api_key = "${GROQ_API_KEY}" +model = "llama-3.3-70b-versatile" + +# [mcp_servers.filesystem] +# command = "npx" +# args = ["-y", "@modelcontextprotocol/server-filesystem", "."] + +# [telegram] +# token = "${TELEGRAM_BOT_TOKEN}" +# allowed_users = [] diff --git a/Dockerfile b/Dockerfile index 4ac859e..1360842 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,13 +19,23 @@ RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ && apt-get install -y nodejs \ && apt-get clean && rm -rf /var/lib/apt/lists/* -# OpenClaw + miniclawd (global install, no interactive prompts) -RUN npm install -g openclaw@latest \ - && npm install -g miniclawd@latest +# OpenClaw + terminal coding CLIs +RUN npm install -g openclaw@latest opencode-ai @anthropic-ai/claude-code +RUN apt-get update && apt-get install -y git \ + && apt-get clean && rm -rf /var/lib/apt/lists/* +RUN curl -fsSL https://bun.sh/install | bash - \ + && export PATH="$HOME/.bun/bin:$PATH" \ + && git clone --depth 1 https://github.com/FoundDream/miniclawd.git /opt/miniclawd \ + && cd /opt/miniclawd && bun install && bun run build \ + && npm install -g . \ + && rm -rf /opt/miniclawd "$HOME/.bun" -# zero-claw / 0claw (single binary from Rust build stage) +# zero-claw / 0claw (binary + default config baked in) COPY --from=zeroclaw-builder /usr/local/cargo/bin/0claw /usr/local/bin/0claw RUN ln -sf /usr/local/bin/0claw /usr/local/bin/zero-claw +COPY 0claw.toml /home/kasm-user/0claw.toml +RUN chown 1000:1000 /home/kasm-user/0claw.toml +ENV ZEROCLAW_CONFIG=/home/kasm-user/0claw.toml # Pre-create OpenClaw directories with correct ownership (1000:1000 = kasm-user) RUN mkdir -p $HOME/.openclaw/canvas $HOME/.openclaw/cron $HOME/.openclaw/workspace \ diff --git a/OPENCLAW-SETUP.md b/OPENCLAW-SETUP.md index d7ebbbc..e19b69b 100644 --- a/OPENCLAW-SETUP.md +++ b/OPENCLAW-SETUP.md @@ -8,7 +8,7 @@ Welcome to Clawtainer! This desktop has OpenClaw Gateway pre-installed and runni - **OpenClaw Gateway:** http://localhost:18789 - **Gateway token:** `clawtainer` (enter in Settings → token) - **Config:** `~/.openclaw/openclaw.json` (inside the container; `/home/kasm-user/.openclaw/`) -- **Env vars:** Project `.env` is loaded by Docker Compose; `GROQ_API_KEY`, `TELEGRAM_BOT_TOKEN`, etc. are passed into the container. +- **Env vars:** Project `.env` is loaded by Docker Compose; common provider keys like `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_API_KEY`, `OPENROUTER_API_KEY`, `GROQ_API_KEY`, plus channel tokens like `TELEGRAM_BOT_TOKEN`, are passed into the container. ## What is OpenClaw? @@ -246,13 +246,15 @@ This desktop includes: - **OpenClaw** - AI agent orchestration (port 18789) - **miniclawd** - Lightweight Node AI assistant (`miniclawd onboard`, then `miniclawd agent -m "Hello!"`) -- **0claw / zero-claw** - Minimal Rust agent runtime (`0claw` or `zero-claw`; copy `0claw.toml.example` to `0claw.toml` and configure) +- **0claw / zero-claw** - Minimal Rust agent runtime. Config is baked in at `~/0claw.toml` and uses `GROQ_API_KEY` from the environment. Run `0claw` in a terminal; HTTP API on port 3007. Edit `~/0claw.toml` to change model or enable Telegram/MCP. +- **OpenCode CLI** - Terminal coding agent (`opencode`) +- **Claude Code** - Anthropic terminal coding agent (`claude`) - **Cursor** - AI-powered code editor - **VS Code** - Microsoft Visual Studio Code - **Antigravity** - Google's AI IDE with Gemini - **Anthropic SDK** - Python library for Claude (`import anthropic`) -All tools have desktop shortcuts for easy access. +GUI apps have desktop shortcuts on the desktop, and terminal CLIs like `opencode`, `claude`, `miniclawd`, and `0claw` are available from a shell. ## Gateway Token diff --git a/README.md b/README.md index 869b22f..e0d7670 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Clawtainer -Browser-accessible Linux desktop with AI coding tools pre-installed: OpenClaw, VS Code, Cursor, Antigravity, and Anthropic Python SDK. +Browser-accessible Linux desktop with AI coding tools pre-installed: OpenClaw, OpenCode, Claude Code, VS Code, Cursor, Antigravity, and the Anthropic Python SDK. ## Quick Start @@ -31,6 +31,8 @@ The nginx proxy strips TLS from the VNC connection for easy browser access. Set OpenClaw token: `OPENCLAW_GATEWAY_TOKEN=mytoken docker compose up -d` +Common provider keys can be passed through from `.env`, including `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_API_KEY`, `OPENROUTER_API_KEY`, and `GROQ_API_KEY`. + ## Build (standalone) ```bash @@ -91,6 +93,8 @@ Access the Control UI to configure API keys, set up messaging channels (Telegram **AI Coding Tools:** - **OpenClaw** - Auto-starts gateway on port 18789 +- **OpenCode** - Terminal coding agent (`opencode`) +- **Claude Code** - Anthropic terminal coding agent (`claude`) - **Cursor IDE** - AI-powered code editor - **Google Antigravity** - Google's AI IDE with Gemini - **VS Code** - Microsoft Visual Studio Code diff --git a/docker-compose.yml b/docker-compose.yml index 8ec2e85..f3965bc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,13 @@ services: shm_size: 512m ports: - "18789:18789" # OpenClaw gateway Control UI + - "3007:3007" # 0claw HTTP API environment: OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN:-clawtainer} + ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-} + OPENAI_API_KEY: ${OPENAI_API_KEY:-} + GOOGLE_API_KEY: ${GOOGLE_API_KEY:-} + OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-} GROQ_API_KEY: ${GROQ_API_KEY:-} TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-} DISCORD_BOT_TOKEN: ${DISCORD_BOT_TOKEN:-}