22
33# HPC-Relay
44
5- ### Control AI Coding Agents on Your HPC Cluster, WSL, or macOS -- From Your Phone
5+ ### Opencode AI agent on your phone - Access anywhere!
66
77[ ![ Python 3.9+] ( https://img.shields.io/badge/Python-3.9+-blue?style=flat-square&logo=python )] ( https://python.org )
88[ ![ Telegram Bot API] ( https://img.shields.io/badge/Telegram-Bot%20API-26A5E4?style=flat-square&logo=telegram )] ( https://core.telegram.org/bots/api )
@@ -70,9 +70,9 @@ You authenticate **once**. Everything else is automatic.
7070| ---| ---|
7171| ** No VPN on phone** | Relay sits inside the authenticated network |
7272| ** AI session memory** | Parses & re-injects ` sessionID ` -- full context from cold start |
73- | ** File transfer** | Download files from the target machine to Telegram (` @@ send: path@@ ` ) |
74- | ** File upload** | Upload files from target to cloud (` @@ upload:file@@ ` ) |
75- | ** Wildcard fetch** | Send multiple files with glob patterns (e.g. ` @@ send: Auto*.png@@ ` ) |
73+ | ** File transfer** | Download files from the target machine to Telegram (` / send < path> ` ) |
74+ | ** File upload** | Upload files from target to cloud (` / upload <path> ` ) |
75+ | ** Wildcard fetch** | Send multiple files with glob patterns (e.g. ` / send Auto*.png` ) |
7676| ** Chat history viewer** | Generate interactive HTML viewer of all AI conversations |
7777| ** Agent-agnostic** | Works with OpenCode, Claude Code, Aider, or any headless CLI agent |
7878
@@ -82,22 +82,28 @@ You authenticate **once**. Everything else is automatic.
8282
8383### Talking to the AI Agent
8484
85+ > Use slash commands only.
86+
87+
8588Simply type a message. It gets forwarded to the AI agent on your target machine, for example:
8689
8790```
8891Generate an expression heatmap with random synthetic data.
8992```
9093
91- ### Inline Directives
94+ ### Slash Commands
9295
9396| Syntax | Action | Example |
9497| ---| ---| ---|
95- | ` @@model: <alias>@@ ` | Change the AI model for this message | ` @@model: opus46@@ refactor my script ` |
96- | ` @@session: <id>@@ ` | Switch to a specific AI session | ` @@session: ses_abc123@@ ` / ` @@session: new@@ ` |
97- | ` @@kill@@ ` or ` !kill ` | Kill the currently running AI process | ` @@kill@@ ` |
98- | ` @@send: <path>@@ ` | Download a file from target machine to Telegram | ` @@send: ~/results/plot.png@@ ` |
99- | ` @@send: Auto*.png@@ ` | Download matching files (wildcard) | ` @@send: /project/Auto*.png@@ ` |
100- | ` @@upload: file@@ ` | Upload a file from target machine to cloud | ` @@upload: ~/data/input.csv@@ ` |
98+ | ` /model ` | Open interactive provider -> model picker | ` /model ` |
99+ | ` /new ` | Start a fresh AI session | ` /new ` |
100+ | ` /id <session_id> ` | Switch to a specific session ID | ` /id ses_abc123... ` |
101+ | ` /id ` | Show recent sessions and pick one interactively | ` /id ` |
102+ | ` /kill ` or ` /q ` | Kill the currently running AI process | ` /kill ` |
103+ | ` /send <path> ` | Download a file from target machine to Telegram | ` /send ~/results/plot.png ` |
104+ | ` /send Auto*.png ` | Download matching files (wildcard) | ` /send /project/Auto*.png ` |
105+ | ` /upload <path> ` | Upload a file from target machine to cloud | ` /upload ~/data/input.csv ` |
106+ | ` /scheduled ` | Open scheduled tasks manager (edit/delete interactively) | ` /scheduled ` |
101107
102108### Shell Commands
103109
@@ -114,13 +120,14 @@ Prefix with `!` to run raw shell commands directly on the target machine (bypass
114120Change models persistently (applies to all subsequent messages):
115121
116122```
117- @@ model: opus46@@
123+ / model
118124```
119125
120126Or change just for one message:
121127
122128```
123- @@model: g5@@ explain this error in my GWAS script
129+ (after selecting model via /model)
130+ explain this error in my GWAS script
124131```
125132
126133** Available model aliases (For Github Copilot Pro):**
@@ -140,8 +147,9 @@ Or change just for one message:
140147Sessions provide conversation memory. The bot auto-tracks sessions, but you can:
141148
142149```
143- @@session: ses_abc123@@ # Switch to a specific session
144- @@session: new@@ # Start a fresh session (clear context)
150+ /id ses_abc123 # Switch to a specific session
151+ /new # Start a fresh session (clear context)
152+ /id # Show recent sessions to pick
145153```
146154
147155The AI retains full context within a session -- ask follow-ups without re-explaining.
@@ -155,16 +163,16 @@ The AI retains full context within a session -- ask follow-ups without re-explai
155163The AI automatically sends files it creates. You can also request files manually:
156164
157165```
158- @@ send: ~/results/summary.pdf@@
159- @@ send: /project/output/Auto*.png@@ # wildcard: sends all matching files
166+ / send ~/results/summary.pdf
167+ / send /project/output/Auto*.png # wildcard: sends all matching files
160168```
161169
162170### Upload to cloud
163171
164172Upload any file to your pre-configured cloud storage:
165173
166174```
167- @@ upload : ~/data/input.csv@@
175+ / upload ~/data/input.csv
168176```
169177
170178The file will be transferred to your preferred cloud storage such as google drive or onedrive.
@@ -280,7 +288,7 @@ python3 tools/chat_viewer.py
280288
281289``` bash
282290! python3 /path/to/tools/chat_viewer.py
283- @@ send: ~ /opencode_chat_viewer/index.html@@
291+ / send ~ /opencode_chat_viewer/index.html
284292# Can be downloaded and viewed on Telegram
285293```
286294
@@ -311,7 +319,7 @@ Many HPC clusters **prohibit heavy computation on login nodes**. HPC-Relay is de
3113191 . ** Use the AI agent to generate job scripts** -- not to run heavy computation directly
3123202 . ** Submit jobs** via ` sbatch ` , ` qsub ` , etc. directly from the HPC (or using ` ! ` shell commands if supported by your workflow).
3133213 . ** Monitor jobs** through your HPC's scheduling commands (e.g. ` squeue ` , ` qstat ` ).
314- 4 . ** Retrieve results** with ` @@ send: path@@ ` or rclone
322+ 4 . ** Retrieve results** with ` / send < path> ` or rclone
315323
316324### Example
317325
@@ -413,3 +421,27 @@ BSD-3 -- free for academic and personal use. See [LICENSE](LICENSE).
413421If this helped your workflow, please star the repo -- it helps others find it.
414422
415423</div >
424+
425+
426+ ### Schedule Management
427+
428+ Use ` /scheduled ` to open an interactive task list. Tap a task to:
429+ - Delete it
430+ - Edit schedule presets (hourly/daily/once-after)
431+
432+ Use ` /scheduled ` for all scheduled task management.
433+
434+
435+ ### Workspace Separation (multi-chat isolation)
436+
437+ HPC-Relay can isolate sessions/tasks/workdir per chat. Configure with env:
438+
439+ ``` bash
440+ CHANNEL_WORKSPACES={" 8670800334" :{" name" :" mg" ," workdir" :" ~/workspace_mg" ," allowed_users" :[8670800334]}}
441+ AUTO_WORKSPACE_PER_CHAT=1
442+ AUTO_WORKSPACE_PREFIX=chat
443+ ```
444+
445+ - Explicit mapping (` CHANNEL_WORKSPACES ` ) has highest priority.
446+ - If unmapped and ` AUTO_WORKSPACE_PER_CHAT=1 ` , bot uses namespace ` <prefix>_<chat_id> ` .
447+ - Session/task stores become ` hpc_relay_sessions_<name>.json ` and ` hpc_relay_tasks_<name>.json ` .
0 commit comments