From 4982831883875e64751b0b5ebc2483a7a47c8984 Mon Sep 17 00:00:00 2001 From: Thierry Pouplier Date: Thu, 14 May 2026 17:12:10 -0400 Subject: [PATCH] Command to send stuff to hermes --- zsh/.zshrc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index 0afbe72..23bd7c6 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -22,6 +22,30 @@ alias oc="opencode" # Hermes Agent - SSH directly to remote server alias hermes="ssh -t lazyworkhorse 'docker exec -it hermes /opt/hermes/.venv/bin/hermes'" +hermes-cp() { + if [ $# -eq 0 ]; then + echo "Usage: hermes-cp [...]" + echo "" + echo "Copies files/directories from your Arch laptop into the Hermes" + echo "agent container at /opt/data/home/ preserving directory structure." + echo "" + echo "Examples:" + echo " hermes-cp document.pdf # single file" + echo " hermes-cp *.pdf # multiple files (glob)" + echo " hermes-cp manuals/ # whole directory" + echo " hermes-cp manuals/ keyence-docs/ # multiple items" + echo "" + echo "To copy to a different destination inside the container:" + echo " tar -czf - . | ssh gortium@lazyworkhorse \\" + echo " \"docker exec -i hermes sh -c 'cd /opt/data/projects && tar -xzf -'\"" + return 1 + fi + # tar everything into a single SSH pipe, extract inside container + # Supports: single files, directories, glob patterns, mixed args + tar -czf - "$@" | ssh gortium@lazyworkhorse \ + "docker exec -i hermes sh -c 'cd /opt/data/home && tar -xzf -'" +} + # Yazi alias y="yazi" function yy() {