0408c27e6e
Includes agents, skills, scripts, container launch scripts, and project configuration files (opencode.json, crush.json, Dockerfile). Add repo reference for skill container Add workspace for persist container, used for testing cli aa
43 lines
1.4 KiB
Bash
Executable File
43 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
[ ! -f .env ] || export $(grep -v '^#' .env | xargs)
|
|
|
|
RAND_NAME=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 16; echo)
|
|
mkdir -p /tmp/opencode
|
|
WORKDIR=/tmp/opencode/cleveragents-core-$RAND_NAME
|
|
|
|
trap 'cd /tmp/opencode && rm -rf "$WORKDIR"' EXIT
|
|
|
|
git clone \
|
|
https://$FORGEJO_PAT@git.cleverthis.com/cleveragents/cleveragents-core.git \
|
|
$WORKDIR
|
|
|
|
cd $WORKDIR
|
|
|
|
docker run -it --rm \
|
|
--network=host \
|
|
--cpus="12" \
|
|
--name "cleveragents_dev_${RAND_NAME}" \
|
|
--user $(id -u):$(id -g) \
|
|
--volume "${WORKDIR}:/app" \
|
|
--volume "/home/skyblond/opencode/agents:/home/devuser/.config/opencode/agents:ro" \
|
|
--volume "/home/skyblond/opencode/skills:/home/devuser/.config/opencode/skills:ro" \
|
|
--volume "/home/skyblond/opencode/scripts:/external/opencode/scripts:ro" \
|
|
--env "OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
|
|
--env "OPENAI_API_KEY=${OPENAI_API_KEY}" \
|
|
--env "ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}" \
|
|
--env "GOOGLE_API_KEY=${GOOGLE_API_KEY}" \
|
|
--env "GEMINI_API_KEY=${GEMINI_API_KEY}" \
|
|
--env "HF_TOKEN=${HF_TOKEN}" \
|
|
--env "FORGEJO_PAT=${FORGEJO_PAT}" \
|
|
cleveragents-dev zsh -c "/home/devuser/.opencode/bin/opencode upgrade && /home/devuser/.opencode/bin/opencode -m anthropic/claude-opus-4.6"
|
|
|
|
# anthropic/claude-opus-4.6
|
|
# openrouter/anthropic/claude-opus-4.6
|
|
# openai/gpt-5.3-codex
|
|
|
|
# server: opencode serve --hostname 0.0.0.0 --print-logs --log-level WARN
|
|
# tui: opencode -m anthropic/claude-opus-4.6
|