Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "Hermes-CodeSpace",
"name": "Hermes-Coding-Agent",
"customizations": {
"vscode": {
"extensions": ["saoudrizwan.claude-dev","joaompfp.hermes-ai-agent"]
}
},
"postCreateCommand": "bash ./.devcontainer/post-create-cmd.sh",
"postStartCommand": "bash echo '[post-start-cmd.sh] Container started' >> /tmp/post-start-cmd.log"
}
"postCreateCommand": "bash ./.devcontainer/post-create-cmd.sh > /tmp/post-create-cmd.log",
"postStartCommand": "bash ./.devcontainer/post-start-cmd.sh > /tmp/post-start-cmd.log"
}
27 changes: 22 additions & 5 deletions .devcontainer/post-create-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,36 @@

# Install modelrelay globally
sudo npm install modelrelay -g --prefix /usr/local/lib/modelrelay
sudo ln -s /usr/local/lib/modelrelay/bin/modelrelay /usr/local/bin/modelrelay
sudo ln -sf /usr/local/lib/modelrelay/bin/modelrelay /usr/local/bin/modelrelay
sudo npm cache clean --force

echo "[post-create-cmd.sh] Starting modelrelay in the background..."
echo "[post-create-cmd.sh] Checking modelrelay..."
if command -v modelrelay &>/dev/null; then
setsid /usr/local/bin/modelrelay >> /tmp/modelrelay.log 2>&1 &
if pgrep -f modelrelay > /dev/null; then
echo "[post-create-cmd.sh] modelrelay is already running, skipping"
else
echo "[post-create-cmd.sh] Starting modelrelay in the background..."
setsid /usr/local/bin/modelrelay >> /tmp/modelrelay.log 2>&1 &
fi
else
echo "[post-create-cmd.sh] modelrelay not found, skipping start"
fi

# Install ripgrep for better search performance in hermes-agent
if ! command -v rg &>/dev/null; then
echo "[post-create-cmd.sh] Installing ripgrep for better search performance in hermes-agent..."
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# Linux
cd /tmp
curl -LO https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep_14.1.1-1_amd64.deb
sudo dpkg -i ripgrep_14.1.1-1_amd64.deb
rm ripgrep_14.1.1-1_amd64.deb
fi
fi

# Install hermes-agent
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash -s -- --skip-setup
HERMES_VERSION="v2026.5.7"
curl -fsSL "https://raw.githubusercontent.com/NousResearch/hermes-agent/${HERMES_VERSION}/scripts/install.sh" | bash -s -- --skip-setup
Comment thread
gitricko marked this conversation as resolved.
npm cache clean --force
sudo rm -rf /var/lib/apt/lists/*

Expand All @@ -24,4 +42,3 @@ if command -v hermes &>/dev/null && [ -d "$HOME/.hermes/sessions" ] && [ -z "$(l
hermes config set model.base_url http://localhost:7352/v1
hermes config set model.default auto-fastest
fi

16 changes: 16 additions & 0 deletions .devcontainer/post-start-cmd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

echo "[post-start-cmd.sh] Checking modelrelay..."
if command -v modelrelay &>/dev/null; then
if pgrep -f modelrelay > /dev/null; then
echo "[post-start-cmd.sh] modelrelay is already running, skipping"
else
echo "[post-start-cmd.sh] Starting modelrelay in the background..."
setsid /usr/local/bin/modelrelay >> /tmp/modelrelay.log 2>&1 &
fi
else
echo "[post-start-cmd.sh] modelrelay not found, skipping start"
fi

# so that the script doesn't exit immediately before modelrelay has a chance to start properly
sleep 60