Get the FREE Ultimate OpenClaw Setup Guide →

install

Scanned
npx machina-cli add skill cyrus-cai/claude-cobrain/install --openclaw
Files (1)
SKILL.md
3.0 KB

install

Install claude-cobrain daemon and start it with python3 directly.

Language

Infer language from the user's message. If there is no context, default to English.

Options

  • English (default)
  • 中文简体
  • 中文繁体
  • 日本语
  • 한국어
  • Others (allow user to specify)

Source files

Find the plugin root directory. The plugin root directory is most likely in <USER_ROOT>/.claude/plugins/.

Required source files:

  • <CLAUDE_PLUGIN_ROOT>/scripts/cobrain.py - daemon script to copy
  • <CLAUDE_PLUGIN_ROOT>/scripts/control.sh - process controller script

Execution principle

Minimize user approval prompts: chain independent shell commands with && into single Bash calls.

Flow

1. Choose output directory

  • Default: ~/.claude/cobrain
  • Allow custom absolute path if user asks.
  • Resolve to absolute path and use it as OUTPUT_DIR.

2. Prerequisite check (one-shot, 1 Bash call)

Run all checks in a single command:

command -v python3 && python3 --version && \
command -v ollama && ollama --version && \
python3 -c "import PIL, ollama; print('ok')" && \
ollama list | grep qwen3-vl

If success: skip installation steps.

If failure: install only missing prerequisites.

  • Missing Python 3: brew install python
  • Missing Ollama CLI: brew install ollama
  • Missing Python packages: pip3 install Pillow ollama
  • Missing model: ollama pull qwen3-vl:2b

3. Deploy files (1 Bash call)

Chain file operations into one Bash call:

  1. Create OUTPUT_DIR if needed.
  2. Copy daemon script from <CLAUDE_PLUGIN_ROOT>/scripts/cobrain.py to <OUTPUT_DIR>/cobrain.py.
  3. Copy controller script from <CLAUDE_PLUGIN_ROOT>/scripts/control.sh to <OUTPUT_DIR>/control.sh and chmod +x.
  4. Write .source_repo marker to <OUTPUT_DIR>/.source_repo.
  5. Remove stale pid file <OUTPUT_DIR>/cobrain.pid if it exists.

4. Start service (1 Bash call)

Run direct python3 start through the controller:

if [[ -n "${CLAUDE_PLUGIN_ROOT:-}" && -f "${CLAUDE_PLUGIN_ROOT}/scripts/control.sh" ]]; then
  CONTROL_SCRIPT="${CLAUDE_PLUGIN_ROOT}/scripts/control.sh"
elif [[ -f "./plugin/scripts/control.sh" ]]; then
  CONTROL_SCRIPT="./plugin/scripts/control.sh"
else
  CONTROL_SCRIPT="$(ls -dt "$HOME"/.claude/plugins/cache/*/claude-cobrain/*/scripts/control.sh 2>/dev/null | head -1)"
fi
[[ -n "${CONTROL_SCRIPT:-}" && -f "$CONTROL_SCRIPT" ]] || { echo "control.sh not found"; exit 1; }
bash "$CONTROL_SCRIPT" start

5. Completion output

Return:

  • Done. Daemon is running. Logs:
  • - <OUTPUT_DIR>/daemon.log
  • - <OUTPUT_DIR>/runtime.stdout.log
  • - <OUTPUT_DIR>/runtime.stderr.log
  • macOS permission note below.

macOS Permissions

If logs show permission errors, add your terminal app to both permissions in:

  • System Settings -> Privacy & Security -> Accessibility
  • System Settings -> Privacy & Security -> Screen Recording

Source

git clone https://github.com/cyrus-cai/claude-cobrain/blob/main/plugin/skills/install/SKILL.mdView on GitHub

Overview

This skill automates installing the claude-cobrain daemon to run directly with python3, skipping LaunchAgent. It locates the plugin root, copies cobrain.py and control.sh into an OUTPUT_DIR, writes a .source_repo marker, and prepares the daemon for immediate use.

How This Skill Works

It first resolves OUTPUT_DIR (default ~/.claude/cobrain). It then performs a one-shot Bash prerequisite check to verify python3, Ollama, Pillow, and the model, installing any missing components. Finally, it copies the daemon and controller scripts to OUTPUT_DIR, marks the source repository, and starts the daemon via the control.sh script using python3 directly.

When to Use It

  • You want to run claude-cobrain without LaunchAgent on your machine.
  • You need to deploy the daemon to a custom or portable OUTPUT_DIR.
  • You want an all-in-one shell flow that checks and installs missing prerequisites.
  • You need to start and manage the daemon via the included control.sh script.
  • You want clear completion output and logs listed under OUTPUT_DIR.

Quick Start

  1. Step 1: Choose OUTPUT_DIR (default ~/.claude/cobrain).
  2. Step 2: Run the one-shot prerequisite check to install any missing components.
  3. Step 3: Deploy files, start the service with control.sh, and inspect the logs.

Best Practices

  • Use the default OUTPUT_DIR ~/.claude/cobrain or specify an absolute path for portability.
  • Run the one-shot prerequisite check to minimize prompts and ensure a clean environment.
  • Keep cobrain.py and control.sh updated in the plugin's scripts path.
  • After starting, verify daemon activity by inspecting OUTPUT_DIR/daemon.log and related logs.
  • On macOS, resolve permission errors by granting your terminal app Accessibility and Screen Recording permissions.

Example Use Cases

  • Deploying claude-cobrain on a local macOS machine using the default OUTPUT_DIR.
  • Deploying to a custom OUTPUT_DIR for isolated testing environments.
  • Re-deploying after plugin updates by re-running the install flow.
  • Setting up a CI runner to automate daemon startup during tests.
  • Troubleshooting with logs and performing ollama model pulls if needed.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers