diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 20b0346..b61e4e8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,8 +4,8 @@ updates: directory: "/" schedule: interval: "weekly" - + - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "weekly" \ No newline at end of file + interval: "weekly" diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 5ebe594..e475fd5 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -35,6 +35,17 @@ jobs: runs-on: ubuntu-latest steps: + # --- Free space becos the docker build is large --- + - name: Free Disk Space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: true + android: true + dotnet: true + haskell: true + large-packages: true + swap-storage: true + - name: Checkout repository uses: actions/checkout@v6 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..30fe95e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +**/*.pyc +backup/**.tar.gz \ No newline at end of file diff --git a/Makefile b/Makefile index 46b85ed..61f829c 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,8 @@ VOLUME_NAME=tradingview-agent-config BACKUP_FILE=tradingview-agent_config_backup.tar.gz BACKUP_DIR=./backup -.PHONY: backup restore clean +.PHONY: backup restore clean docker-image-clean docker-vol-clean docker-clean docker-build + colima-start: colima start --profile tradingview-agent --cpu 4 --memory 4 --disk 100 @@ -38,8 +39,10 @@ dev: $(MAKE) start-locally-baked docker-image-clean: - # docker rm -f $$(docker ps -qa) - docker rm -f $(DOCKER_NAME) + $(MAKE) stop + -docker rm -f $(DOCKER_NAME) + -docker rmi $(DOCKER_IMAGE_NAME) ghcr.io/gitricko/$(DOCKER_IMAGE_NAME) + docker-vol-clean: docker volume rm -f $(VOLUME_NAME) @@ -76,4 +79,4 @@ restore: docker compose up -d docker-build: - docker build -t $(DOCKER_IMAGE_NAME) -f ./docker/Dockerfile ./docker \ No newline at end of file + docker build -t $(DOCKER_IMAGE_NAME) -f ./docker/Dockerfile ./docker diff --git a/README.md b/README.md index 7c19c96..5ae4868 100644 --- a/README.md +++ b/README.md @@ -2,46 +2,53 @@ _Run TradingView Agent inside a browser-based Linux desktop with free LLM support through ModelRelay._
- Your personal TradingView AI agent in the browser — no GPU required
+
+
-
-
+ She will grow with you ...
+
+
3. In the Codespace terminal run:
```bash
make start
```
+
+
+4. Wait ~60 seconds after first launch. It takes about 5-7 minutes if docker image is not loaded yet. When the web desktop URL appears in the Codespace Ports tab, click it.
-4. Wait ~60 seconds. When the web desktop URL appears in the Codespace Ports tab, click it.
+
+
+ __Demo on pre-installed WebApps__
+
+
-5. Inside the WebTop desktop:
+5. Use VSCode on Web (Code-Server) to interact wit your agents:
- - You see `TradingView Agent` is already running
- - Run `hermes` from the terminal; OR:
- - Go to chromium at `http://localhost:9119` to access Hermes WebUI
- - Recommendation to use CodeServer instead of WebTop
+ - Interact with files system using VSCode on the browser
+ - Interact with Hermes Agent using VSCode Extension OR via hermes-cli in the VSCode Terminal
+ - Claude Code + Hermes (both using Terminal-Cli or VSCode Extension) shared the persistent memory via [mnemon](https://github.com/mnemon-dev/mnemon) so that Hermes remembers what you did in Claude and vice-versa.
+ - Use WebTop interface in port 3000 when you need to do computer-use
+
+
+6. Configure your Hermes with your favourite messaging app !
+
+ - Recommendation: Watch Youtube ;-)
+
+7. Last NOTE:
+ - For localhost install.. just use http://localhost:[3000,8888,9119,7352,20128]
+
## 🔧 Features
- **Zero local install** — everything runs in browser via GitHub Codespaces
@@ -70,12 +95,15 @@ Perfect for:
- **Persistent config** — docker volume backup and restore after Codespace recreation
- **Easy backup/restore** — `make backup` / `make restore`
- **One-command everything** — powerful Makefile + clean `docker-compose.yml`
-- **Auto-start ModelRelay** — Default configuration for Free LLM API
+- **Auto-start ModelRelay** — Default configuration for Free LLM API to Hermes
+- **Auto-start OmniRoute** — You need some configuration before it work but it is flexible and powerful
- **Auto-start Ollama** — custom init script on WebTop boot
- **Colima / local Docker support** ready
- **Built-in code-server IDE** — browser-based VS Code on port `8888`
+- **Multiple AI VSCode Extension preinstall/config with ModelRelay** - Cline, Hermes and ClaudeCode
+- **Mnemon as default memory provider** - a knowledge store for Hermes with intent-aware recall, importance decay, and auto-deduplication
-## 🧑💻 Built-in code-server IDE
+## 🧑💻 Built-in code-server IDE (VSCode on the Web - Interface to Agent)
This image includes `code-server` and exposes it on port `8888`.
@@ -87,8 +115,8 @@ This image includes `code-server` and exposes it on port `8888`.
> Note: this setup may use `code-server --auth none` in development, so keep port `8888` private. For local production use, secure it with an authenticated reverse proxy or firewall.
- Hermes Agent's Extension is preinstalled and configured in VSCode
-- Cline Extension is also preinstall and configured to ModelRelay
-- Start Hacking away in VSCode, use WebTop if you need to monitor agent do desktop-use operations. eg: Non-Headless Chrome debugging for instance.
+- Claude Code Extension is also preinstall and configured to ModelRelay
+- Start Hacking away in VSCode, use WebTop if you need to monitor agent do desktop-use operations. eg: Non-Headless Chrome debugging for instance / Linux Computer-Use
## 🔒 Security: Protected by GitHub Authentication
@@ -124,8 +152,8 @@ Your configuration and settings are persisted in a Docker volume.
The project includes convenient `make` targets to back up and restore this data in codespace:
```bash
-make backup # creates backup/tradingview-agent_config_backup.tar.gz
-make restore # restores from backup/tradingview-agent_config_backup.tar.gz
+make backup # creates backup/hermes_config_backup.tar.gz
+make restore # restores from backup/hermes_config_backup.tar.gz
```
### When to Use It
@@ -137,7 +165,7 @@ make restore # restores from backup/tradingview-agent_config_backup.tar.
### How to Migrate to a New Environment
- In your current environment, run `make backup`.
-- Download the generated file: `backup/tradingview-agent_config_backup.tar.gz`.
+- Download the generated file: `backup/hermes_config_backup.tar.gz`.
- Place the file in the `backup/` folder of the new environment.
- Run `make restore`.
@@ -152,26 +180,13 @@ make build-local # especially if you modified the ./docker/Dockerfil
make start-locally-baked # start from your local baked image
```
-## ⚠️ Current Limitations (honest)
-
-- GitHub Codespaces free tier has monthly limits (great for testing, less ideal for 24/7 as Codespace auto-shutdown during inactivity)
-- Ollama cloud [credits](https://ollama.com/settings) are daily — heavy use will push you to paid/local models. Or if you have multiple accounts, just `ollama signout` and `ollama signin` with different account.
-- Browser desktop has slight latency vs native (expected). You can shutdown your codespace and [change](https://docs.github.com/en/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace) to 4-core codespace to improve responsiveness or the need to run heavy applications.
-
-## 🛣️ Roadmap
-
-- [ ] More screenshots + video demo
-- [ ] Pre-built Docker image tags for stable releases
-- [ ] Community templates (Telegram-only, WhatsApp-only, etc.)
-- [ ] One-click "deploy to VPS" guide (Railway / Fly.io / cheap VPS)
-
## 🤝 Contributing
This is a community project — every star, issue, or PR helps enormously!
Feel free to open issues for bugs or feature requests.
-[](https://star-history.com/#gitricko/tradingview-agent&type=date&legend=top-left)
+[](https://star-history.com/#intricko/tradingview-agent&type=date&legend=top-left)
## 📄 License
-MIT — see [LICENSE](./LICENSE)
\ No newline at end of file
+MIT — see [LICENSE](./LICENSE)
diff --git a/docker-compose.yml b/docker-compose.yml
index a7c1eb1..8ddc95e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,3 +1,4 @@
+
name: tradingview-agent
services:
tradingview-agent:
@@ -10,6 +11,7 @@ services:
# - seccomp:unconfined
environment:
+ # - PATH=/config/.local/bin:${PATH}
# Set your User ID and Group ID to match the host user (run 'id $USER' in your terminal)
- PUID=${DOCKER_PUID:-501}
- PGID=${DOCKER_PGID:-20}
@@ -26,9 +28,9 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- # Access the Webtop GUI on port 3000 (http)
+ # Access the Webtop GUI on port 3000 (http) ~ this is turn off becos you can access via ports 3000 from code-server
- 3000:3000
- # tradingview-agent dashboard specific ports (adjust as needed)
+ # hermes dashboard specific ports (adjust as needed)
- 9119:9119
# modelrelay specific ports (adjust as needed)
- 7352:7352
@@ -52,4 +54,4 @@ networks:
volumes:
tradingview-agent-config:
external: false
- name: tradingview-agent-config
\ No newline at end of file
+ name: tradingview-agent-config
diff --git a/docker/.claude.json b/docker/.claude.json
new file mode 100644
index 0000000..e472a3d
--- /dev/null
+++ b/docker/.claude.json
@@ -0,0 +1,9 @@
+{
+ "hasCompletedOnboarding": true,
+ "customApiKeyResponses": {
+ "approved": [
+ "sk-whatever"
+ ],
+ "rejected": []
+ }
+}
\ No newline at end of file
diff --git a/docker/CLAUDE.md b/docker/CLAUDE.md
new file mode 100644
index 0000000..9e9716c
--- /dev/null
+++ b/docker/CLAUDE.md
@@ -0,0 +1,3 @@
+# Session Start
+
+When the SessionStart hook reports mnemon insights available (>0), immediately run `mnemon recall "" --limit 20` to load relevant context before responding to the user.
diff --git a/docker/Dockerfile b/docker/Dockerfile
index ca02059..39ab7dd 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,10 +1,10 @@
-ARG HERMES_VERSION="v2026.5.7"
+ARG HERMES_VERSION="v2026.5.29.2"
ARG OMNIROUTE_VERSION=3.7.9
ARG MODELRELAY_VERSION=1.17.1
-ARG OLLAMA_VERSION=0.21.0
+ARG OLLAMA_VERSION=0.24.0
ARG NODE_VERSION=24
-ARG CODE_SERVER_VERSION=4.118.0
-ARG MNEMON_VERSION=0.1.3
+ARG CODE_SERVER_VERSION=4.122.0
+ARG MNEMON_VERSION=0.1.11
ARG TARGETARCH
# Use the official Ollama image to get the binary
@@ -16,12 +16,19 @@ FROM node:${NODE_VERSION}-slim AS node-bin
# Use your preferred Webtop flavor as the base (e.g., Ubuntu, Alpine)
FROM lscr.io/linuxserver/webtop:ubuntu-mate
-# Install help utilities, Firefox, and clean up apt cache to reduce image size
-# Remove Chromium if present (webtop includes it by default)
-RUN apt-get update && \
- apt-get install -y htop zsh wget ripgrep firefox && \
- apt-get remove -y chromium chromium-browser chromium-common libchromium* 2>/dev/null || true && \
- rm -rf /var/lib/apt/lists/*
+# Add gh apt repository
+ARG TARGETARCH
+RUN GH_ARCH="${GH_ARCH:-${TARGETARCH:-amd64}}"; \
+ case "${GH_ARCH}" in \
+ amd64|x86_64) GH_ARCH=amd64 ;; \
+ arm64|aarch64) GH_ARCH=arm64 ;; \
+ *) echo "Unsupported GH_ARCH: ${GH_ARCH}" >&2; exit 1 ;; \
+ esac; \
+ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg \
+ && echo "deb [arch=${GH_ARCH} signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list
+
+# Install help utilities and clean up apt cache to reduce image size
+RUN apt-get update && apt-get install -y htop zsh ripgrep gh firefox && rm -rf /var/lib/apt/lists/*
# Copy Node.js binaries and libraries
COPY --from=node-bin --chown=abc:abc /usr/local/bin/node /usr/local/bin/
@@ -36,8 +43,9 @@ RUN mkdir -p /custom-cont-init.d
COPY --chown=abc:abc *.desktop /custom-cont-init.d
COPY --chown=abc:abc *.sh /custom-cont-init.d
COPY --chown=abc:abc *.json /custom-cont-init.d
+COPY --chown=abc:abc *.md /custom-cont-init.d
-# Install Hermes Agent (TradingView Edition)
+# Install Hermes
ARG HERMES_VERSION
RUN curl -fsSL "https://raw.githubusercontent.com/NousResearch/hermes-agent/${HERMES_VERSION}/scripts/install.sh" | bash -s -- --skip-setup && \
npm cache clean --force && \
@@ -46,7 +54,8 @@ RUN curl -fsSL "https://raw.githubusercontent.com/NousResearch/hermes-agent/${HE
# Install ModelRelay and start automatically when desktop loads
ARG MODELRELAY_VERSION
-RUN npm install -g modelrelay@${MODELRELAY_VERSION} && \
+# RUN npm install -g modelrelay@${MODELRELAY_VERSION} && \
+RUN npm install -g github:gitricko/modelrelay && \
npm cache clean --force && \
chown abc:abc -R /usr/local/lib/node_modules/modelrelay /usr/local/bin/modelrelay
@@ -63,7 +72,8 @@ RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=${CODE_SE
ln -fs /usr/local/lib/code-server-${CODE_SERVER_VERSION} /usr/local/lib/code-server && \
ln -fs /usr/local/lib/code-server/bin/code-server /usr/local/bin/code && \
rm -rf ~/.cache
-COPY default.conf /defaults/default.conf
+# Uncomment this when you want to use your own default.conf to route from your reverse proxy to code-server. I rather use codeserver to route to WebTop port 3000
+# COPY default.conf /defaults/default.conf
# Switch to the abc user and set zsh as the default shell for both root and abc
RUN usermod -s $(which zsh) root; usermod -s $(which zsh) abc
@@ -92,7 +102,7 @@ RUN set -eux; \
# https://www.tradingview.com/support/solutions/43000728898-how-to-install-and-update-desktop-app-on-linux/
RUN if [ "${TARGETARCH:-amd64}" != "arm64" ]; then \
echo "Installing TradingView Linux Desktop..." && \
- wget -O - https://tvd-packages.tradingview.com/keyring.gpg | tee /usr/share/keyrings/tradingview-desktop-archive-keyring.gpg >/dev/null && \
+ curl -fsSL https://tvd-packages.tradingview.com/keyring.gpg | tee /usr/share/keyrings/tradingview-desktop-archive-keyring.gpg >/dev/null && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/tradingview-desktop-archive-keyring.gpg] https://tvd-packages.tradingview.com/ubuntu/stable jammy multiverse" | tee /etc/apt/sources.list.d/tradingview-desktop.list >/dev/null && \
apt-get update && apt-get install -y tradingview && \
apt-get clean && \
diff --git a/docker/Dockerfile.old b/docker/Dockerfile.old
deleted file mode 100644
index e0c5fe2..0000000
--- a/docker/Dockerfile.old
+++ /dev/null
@@ -1,76 +0,0 @@
-ARG HERMES_VERSION="v2026.5.7"
-ARG OMNIROUTE_VERSION=3.7.9
-ARG MODELRELAY_VERSION=1.17.1
-ARG OLLAMA_VERSION=0.21.0
-ARG NODE_VERSION=24
-ARG CODE_SERVER_VERSION=4.118.0
-ARG MNEMON_VERSION=0.1.3
-ARG TARGETARCH
-
-# Get the binaries from official Node image
-FROM node:${NODE_VERSION}-slim AS node-bin
-
-# Use your preferred Webtop flavor as the base (e.g., Ubuntu, Alpine)
-FROM lscr.io/linuxserver/webtop:ubuntu-mate
-
-# Install help utilities, Firefox, and clean up apt cache to reduce image size
-# Remove Chromium if present (webtop includes it by default)
-RUN apt-get update && \
- apt-get install -y htop zsh firefox && \
- apt-get remove -y chromium chromium-browser chromium-common libchromium* 2>/dev/null || true && \
- rm -rf /var/lib/apt/lists/*
-
-# Copy Node.js binaries and libraries
-COPY --from=node-bin --chown=abc:abc /usr/local/bin/node /usr/local/bin/
-COPY --from=node-bin --chown=abc:abc /usr/local/lib/node_modules /usr/local/lib/node_modules
-RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
-
-# Start desktop launchers and bootstrap scripts automatically when the desktop loads
-RUN mkdir -p /custom-cont-init.d
-COPY --chown=abc:abc *.desktop /custom-cont-init.d
-COPY --chown=abc:abc *.sh /custom-cont-init.d
-COPY --chown=abc:abc *.json /custom-cont-init.d
-
-
-# Install ModelRelay and start automatically when desktop loads
-ARG MODELRELAY_VERSION
-RUN npm install -g modelrelay@${MODELRELAY_VERSION} && \
- npm cache clean --force && \
- chown abc:abc -R /usr/local/lib/node_modules/modelrelay /usr/local/bin/modelrelay
-
-# Install OmniRoute and start automatically when desktop loads
-ARG OMNIROUTE_VERSION
-RUN npm install -g omniroute@${OMNIROUTE_VERSION} && \
- npm cache clean --force && \
- mkdir -p /usr/local/lib/node_modules/omniroute/app/logs/application && \
- chown abc:abc -R /usr/local/lib/node_modules/omniroute /usr/local/bin/omniroute
-
-# Install code-server and start automatically when desktop loads
-ARG CODE_SERVER_VERSION
-RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=${CODE_SERVER_VERSION} --method=standalone --prefix=/usr/local && \
- ln -fs /usr/local/lib/code-server-${CODE_SERVER_VERSION} /usr/local/lib/code-server && \
- ln -fs /usr/local/lib/code-server/bin/code-server /usr/local/bin/code && \
- rm -rf ~/.cache
-COPY default.conf /defaults/default.conf
-
-# Switch to the abc user and set zsh as the default shell for both root and abc
-RUN usermod -s $(which zsh) root; usermod -s $(which zsh) abc
-
-# ---------------------------------------------------------------------------
-# Install TradingView Linux Desktop
-# ---------------------------------------------------------------------------
-# URL discovered from TradingView's JS bundle:
-# https://tvd-packages.tradingview.com/ubuntu/stable/latest/jammy/tradingview_amd64.deb
-RUN echo "Installing TradingView Linux Desktop..." && \
- curl -fsSL \
- "https://tvd-packages.tradingview.com/ubuntu/stable/latest/jammy/tradingview_amd64.deb" \
- -o /tmp/TradingView.deb \
- && apt-get update \
- && apt-get install -y --no-install-recommends /tmp/TradingView.deb \
- && rm -f /tmp/TradingView.deb \
- && apt-get clean \
- && rm -rf /var/lib/apt/lists/* \
- && chown -R abc:abc /opt/TradingView \
- && echo "[TradingView] Installed successfully"
-
-EXPOSE 8888
diff --git a/docker/claude-term-settings.json b/docker/claude-term-settings.json
new file mode 100644
index 0000000..623f0bb
--- /dev/null
+++ b/docker/claude-term-settings.json
@@ -0,0 +1,55 @@
+{
+ "env": {
+ "ANTHROPIC_API_KEY": "sk-whatever",
+ "ANTHROPIC_BASE_URL": "http://localhost:7352",
+ "ANTHROPIC_MODEL": "claude-sonnet-4-5"
+ },
+ "permissions": {
+ "defaultMode": "bypassPermissions",
+ "allow": [
+ "Bash(mnemon *)",
+ "Skill(update-config)",
+ "Bash(git *)",
+ "Bash(npm *)",
+ "Read(*)",
+ "Write(*)",
+ "Edit(*)",
+ "Bash(ls *)",
+ "Bash(cd *)"
+ ]
+ },
+ "hooks": {
+ "SessionStart": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "/config/.claude/hooks/mnemon/prime.sh"
+ }
+ ]
+ }
+ ],
+ "Stop": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "/config/.claude/hooks/mnemon/stop.sh"
+ }
+ ]
+ }
+ ],
+ "UserPromptSubmit": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "/config/.claude/hooks/mnemon/user_prompt.sh"
+ }
+ ]
+ }
+ ]
+ },
+ "theme": "dark",
+ "skipDangerousModePermissionPrompt": true
+}
\ No newline at end of file
diff --git a/docker/claude-vscode-settings.json b/docker/claude-vscode-settings.json
new file mode 100644
index 0000000..d5255fa
--- /dev/null
+++ b/docker/claude-vscode-settings.json
@@ -0,0 +1,18 @@
+{
+ "workbench.colorTheme": "Visual Studio Dark",
+ "claudeCode.disableLoginPrompt": true,
+ "claudeCode.environmentVariables": [
+ {
+ "name": "ANTHROPIC_BASE_URL",
+ "value": "http://localhost:7352"
+ },
+ {
+ "name": "ANTHROPIC_API_KEY",
+ "value": "sk_whatever"
+ },
+ {
+ "name": "ANTHROPIC_MODEL",
+ "value": "claude-sonnet-4-5"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/docker/start-3-ollama.sh b/docker/start-3-ollama.sh
deleted file mode 100755
index bfee693..0000000
--- a/docker/start-3-ollama.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-runuser -l abc -c 'ollama serve &'
\ No newline at end of file
diff --git a/docker/start-4-codeserver.sh b/docker/start-4-codeserver.sh
deleted file mode 100755
index 2a1b13c..0000000
--- a/docker/start-4-codeserver.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-source /custom-cont-init.d/common.sh || exit 1
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-
-SRC="/custom-cont-init.d/CodeServer.desktop"
-
-sync_desktop_file "$SRC" "/config/.config/autostart/CodeServer.desktop"
-sync_desktop_file "$SRC" "/config/Desktop/CodeServer.desktop"
-
-chown abc:abc /usr/local/lib/node_modules
-chown abc:abc /usr/local/bin
-
-# Add VSCode Extension vscode's config as soon as it appears
-(
- for i in {0..999}; do
- if [ -d "/config/.local/share/code-server/User" ]; then
- echo "[start-4-codeserver] code-server configuration found in ~/.local/share/code-server, setting permissions and installing extensions"
- break
- else
- echo "[start-4-codeserver] Force code-server to initialize by calling URI"
- curl -s http://localhost:8888 > /dev/null 2>&1
- fi
- sleep 5
- done
-
- chown -R abc:abc /config/.local/share/code-server
-
- EXTENSION=saoudrizwan.claude-dev
- if code --list-extensions | grep -q "${EXTENSION}"; then
- echo "[start-4-codeserver] Extension ${EXTENSION} already installed, skip"
- else
- echo "[start-4-codeserver] Installing Extension ${EXTENSION}..."
- mkdir -p "$HOME/.cline/data"
- cp "${SCRIPT_DIR}/globalState.json" "$HOME/.cline/data/globalState.json"
- cp "${SCRIPT_DIR}/secrets.json" "$HOME/.cline/data/secrets.json"
- runuser -l abc -c "code --install-extension ${EXTENSION}"
- chown -R abc:abc $HOME/.cline/data
-
- fi
-
- EXTENSION=joaompfp.hermes-ai-agent
- if code --list-extensions | grep -q "${EXTENSION}"; then
- echo "[start-4-codeserver] Extension ${EXTENSION} already installed, skip"
- else
- echo "[start-4-codeserver] Installing Extension ${EXTENSION}..."
- runuser -l abc -c "curl -sL https://github.com/joaompfp/hermes-vscode/releases/download/v2.0.0/hermes-ai-agent-2.0.0.vsix -o /tmp/hermes-ai-agent.vsix && code --install-extension /tmp/hermes-ai-agent.vsix --force && rm /tmp/hermes-ai-agent.vsix"
- fi
-
-) &
\ No newline at end of file
diff --git a/docker/start-5-ohmyzsh.sh b/docker/start-5-ohmyzsh.sh
deleted file mode 100755
index c7ca95d..0000000
--- a/docker/start-5-ohmyzsh.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-runuser -l abc -c 'sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" --unattended &'
\ No newline at end of file
diff --git a/docker/start-codeserver.sh b/docker/start-codeserver.sh
new file mode 100755
index 0000000..48c7cfc
--- /dev/null
+++ b/docker/start-codeserver.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+source /custom-cont-init.d/common.sh || exit 1
+# SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+SRC="/custom-cont-init.d/CodeServer.desktop"
+
+sync_desktop_file "$SRC" "/config/.config/autostart/CodeServer.desktop"
+sync_desktop_file "$SRC" "/config/Desktop/CodeServer.desktop"
+
+chown -R abc:abc custom-cont-init.d
+chown abc:abc /usr/local/lib/node_modules
+chown abc:abc /usr/local/bin
+chown -R abc:abc /config/.local
+
+# Add VSCode Extension vscode's config as soon as it appears
+runuser -l abc <<'EOF'
+
+(
+ for i in {0..999}; do
+ if [ -d "/config/.local/share/code-server/User" ]; then
+ echo "[start-codeserver] code-server configuration found in ~/.local/share/code-server, setting permissions and installing extensions"
+ break
+ else
+ echo "[start-codeserver] Force code-server to initialize by calling URI"
+ curl -s http://localhost:8888 > /dev/null 2>&1
+ fi
+ sleep 5
+ done
+
+ EXTENSION=hermes-code-agent
+ VERSION=3.0.2
+ if code --list-extensions | grep -q "${EXTENSION}"; then
+ echo "[start-codeserver] Extension ${EXTENSION} already installed, skip"
+ else
+ echo "[start-codeserver] Installing Extension ${EXTENSION}..."
+ curl -sL https://github.com/gitricko/hermes-vscode/releases/download/v${VERSION}/${EXTENSION}-${VERSION}.vsix -o /tmp/${EXTENSION}.vsix && code --install-extension /tmp/${EXTENSION}.vsix --force && rm /tmp/${EXTENSION}.vsix
+ fi
+
+ EXTENSION=saoudrizwan.claude-dev
+ if code --list-extensions | grep -q "${EXTENSION}"; then
+ echo "[start-codeserver] Extension ${EXTENSION} already installed, skip"
+ else
+ echo "[start-codeserver] Installing Extension ${EXTENSION}..."
+ mkdir -p "$HOME/.cline/data"
+ cp "/custom-cont-init.d/globalState.json" "$HOME/.cline/data/globalState.json"
+ cp "/custom-cont-init.d/secrets.json" "$HOME/.cline/data/secrets.json"
+ code --install-extension ${EXTENSION}
+ fi
+
+ EXTENSION=anthropic.claude-code
+ if code --list-extensions | grep -q "${EXTENSION}"; then
+ echo "[start-codeserver] Extension ${EXTENSION} already installed, skip"
+ else
+ echo "[start-codeserver] Installing Extension ${EXTENSION} + claude-cli..."
+ mkdir -p $HOME/.claude
+ cp /custom-cont-init.d/claude-term-settings.json $HOME/.claude/settings.json
+ curl -fsSL https://claude.ai/install.sh | bash
+ mkdir -p $HOME/.local/share/code-server/User
+ cp /custom-cont-init.d/claude-vscode-settings.json $HOME/.local/share/code-server/User/settings.json
+ cp /custom-cont-init.d/.claude.json $HOME/.claude.json
+ cp /custom-cont-init.d/CLAUDE.md $HOME/.claude/CLAUDE.md
+ code --install-extension ${EXTENSION}
+
+ # integrate mnemon into claude-code
+ mnemon setup --yes --global --target claude-code
+ fi
+
+) &
+
+EOF
\ No newline at end of file
diff --git a/docker/start-hermes.sh b/docker/start-hermes.sh
new file mode 100755
index 0000000..c3ed0f1
--- /dev/null
+++ b/docker/start-hermes.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+source /custom-cont-init.d/common.sh || exit 1
+
+SRC="/custom-cont-init.d/Hermes.desktop"
+
+chown abc:abc -R /usr/local/lib/hermes-agent/web
+chown abc:abc -R /usr/local/lib/hermes-agent &
+
+# sync_desktop_file "$SRC" "/config/.config/autostart/Hermes.desktop"
+# sync_desktop_file "$SRC" "/config/Desktop/Hermes.desktop"
+
+chown abc:abc -R ~/.hermes
+
+runuser -l abc <<'EOF'
+ if [ -d "$HOME/.hermes/logs" ] && [ -z "$(ls -A "$HOME/.hermes/logs")" ]; then
+ echo "[start-hermes] No logs found in $HOME/.hermes/logs, setting up default configuration for custom provider"
+ echo "[start-hermes] Initializing hermes config..."
+ hermes config set model.provider custom
+ hermes config set model.base_url http://localhost:7352/v1
+ hermes config set model.default auto-fastest
+ # Turn off approval alert and live dangerously since u are in a self-contained container.
+ hermes config set approvals.mode off
+ # Turn on memory by default and to mnemon
+ hermes config set memory.memory_enabled true
+ hermes config set memory.user_profile_enabled true
+ hermes config set memory.provider mnemon
+ # optimize for kanban
+ hermes config set agent.max_turns 120
+ hermes config set kanban.failure_limit 3
+ fi
+
+ # Start Hermes Gateway in background
+ echo "[start-hermes] Starting Hermes Gateway..."
+ mkdir -p ~/.hermes/logs
+ nohup hermes gateway run --no-supervise > ~/.hermes/logs/gateway.log 2>&1 &
+
+ # Start Hermes Dashboard in background
+ echo "[start-hermes] Starting Hermes Dashboard..."
+ nohup hermes dashboard --host 0.0.0.0 --insecure --no-open > ~/.hermes/logs/dashboard.log 2>&1 &
+
+ # update mnemon provider if version changes
+ echo "[start-hermes] Checking mnemon provider..."
+ rm -rf /tmp/mnemon_repo
+ if git clone https://github.com/gitricko/hermes-plugin-mnemon /tmp/mnemon_repo; then
+ if [ ! -d "$HOME/.hermes/plugins/mnemon" ] || ! diff -r -q -x __pycache__ "$HOME/.hermes/plugins/mnemon" "/tmp/mnemon_repo/mnemon" >/dev/null 2>&1; then
+ echo "[start-hermes] Mnemon plugin is missing or out of date. Updating..."
+ mkdir -p "$HOME/.hermes/plugins"
+ rm -rf "$HOME/.hermes/plugins/mnemon"
+ cp -r "/tmp/mnemon_repo/mnemon" "$HOME/.hermes/plugins/mnemon"
+ echo "[start-hermes] Mnemon plugin updated successfully."
+ else
+ echo "[start-hermes] Mnemon plugin is up to date."
+ fi
+ rm -rf /tmp/mnemon_repo
+ else
+ echo "[start-hermes] WARNING: Failed to clone gitricko/hermes-plugin-mnemon repository."
+ fi
+
+EOF
+
+chown abc:abc -R ~/.hermes
diff --git a/docker/start-2-modelrelay.sh b/docker/start-modelrelay.sh
similarity index 90%
rename from docker/start-2-modelrelay.sh
rename to docker/start-modelrelay.sh
index cca86e7..02ee964 100755
--- a/docker/start-2-modelrelay.sh
+++ b/docker/start-modelrelay.sh
@@ -7,7 +7,7 @@ add_model_if_missing() {
local file="$1"
if ! jq -e '.model_list | any(.model_name == "modelrelay")' "$file" > /dev/null; then
- echo "[start-2-modelrelay] Adding modelrelay model to $file"
+ echo "[start-modelrelay] Adding modelrelay model to $file"
jq '.model_list += [{
"model_name": "modelrelay",
"model": "openai/auto-fastest",
@@ -17,7 +17,7 @@ add_model_if_missing() {
# Set modelrelay as default for agents if not default was set
if jq -e '.agents.defaults.model_name | select(. == null or . == "")' "$file" > /dev/null; then
- echo "[start-2-modelrelay] Setting modelrelay as defaults for agents in $file"
+ echo "[start-modelrelay] Setting modelrelay as defaults for agents in $file"
jq '.agents |= (. // {}) | .agents.defaults |= (. // {}) | .agents.defaults.model_name = "modelrelay"' "$file" > "${file}.tmp" && mv "${file}.tmp" "$file"
fi
diff --git a/docker/start-ohmyzsh.sh b/docker/start-ohmyzsh.sh
new file mode 100755
index 0000000..dd0be28
--- /dev/null
+++ b/docker/start-ohmyzsh.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+(
+ runuser -l abc -c 'sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" --unattended'
+
+ ZSHRC="$HOME/.zshrc"
+ TARGET_LINE='export PATH="\$HOME/.local/bin:\$PATH"'
+
+ # 1. Check if ~/.zshrc exists
+ if [ -f "$ZSHRC" ]; then
+ echo "[start-ohmyzsh] ~/.zshrc found. Checking PATH configuration..."
+ # 2. Check if the specific PATH line is already set in the file
+ if grep -Fxq 'export PATH=$HOME/.local/bin:$PATH' "$ZSHRC"; then
+ echo "[start-ohmyzsh] PATH is already correctly configured in ~/.zshrc."
+ else
+ # 3. If not set, append it
+ runuser -l abc -c "echo $TARGET_LINE >> $ZSHRC"
+ echo "[start-ohmyzsh] Successfully added ~/.local/bin to your PATH in ~/.zshrc."
+ fi
+ else
+ echo "[start-ohmyzsh] Error: ~/.zshrc does not exist. Skipping configuration."
+ fi
+) &
\ No newline at end of file
diff --git a/docker/start-ollama.sh b/docker/start-ollama.sh
new file mode 100755
index 0000000..a649a62
--- /dev/null
+++ b/docker/start-ollama.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+echo "[start-ollama] Starting Ollama..."
+runuser -l abc -c 'ollama serve > /tmp/ollama.log 2>&1 &'
+runuser -l abc -c '( sleep 60 && ollama pull nomic-embed-text > /tmp/ollama-pull.log 2>&1 ) &'
+echo "[start-ollama] Pulling nomic-embed-text for mnemon..."
diff --git a/docker/start-2-omniroute.sh b/docker/start-omniroute.sh
similarity index 100%
rename from docker/start-2-omniroute.sh
rename to docker/start-omniroute.sh
diff --git a/docs/hermes-webtop-big.png b/docs/hermes-webtop-big.png
new file mode 100644
index 0000000..96e24e3
Binary files /dev/null and b/docs/hermes-webtop-big.png differ
diff --git a/docs/launch-codespace.gif b/docs/launch-codespace.gif
new file mode 100644
index 0000000..95032ad
Binary files /dev/null and b/docs/launch-codespace.gif differ
diff --git a/docs/launch-webtop-via-ports.png b/docs/launch-webtop-via-ports.png
new file mode 100644
index 0000000..0f759f5
Binary files /dev/null and b/docs/launch-webtop-via-ports.png differ
diff --git a/docs/make-start.gif b/docs/make-start.gif
new file mode 100644
index 0000000..e50e3d5
Binary files /dev/null and b/docs/make-start.gif differ
diff --git a/docs/working-hermes.gif b/docs/working-hermes.gif
new file mode 100644
index 0000000..9d8523a
Binary files /dev/null and b/docs/working-hermes.gif differ
diff --git a/docs/working-vm.gif b/docs/working-vm.gif
new file mode 100644
index 0000000..de218e3
Binary files /dev/null and b/docs/working-vm.gif differ