somratpro Claude Sonnet 4.6 commited on
Commit
0613ee9
Β·
1 Parent(s): 775b8b3

docs: add JupyterLab terminal setup instructions to README

Browse files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. README.md +30 -1
README.md CHANGED
@@ -22,6 +22,10 @@ secrets:
22
  description: "Hugging Face token with write access. Used for automatic workspace backup and HF providers."
23
  - name: CLOUDFLARE_WORKERS_TOKEN
24
  description: "Cloudflare API token for automatic Worker proxy and KeepAlive setup."
 
 
 
 
25
  ---
26
 
27
  <!-- Badges -->
@@ -44,7 +48,7 @@ secrets:
44
  - [πŸ’Ύ Backup & Persistence](#-backup--persistence)
45
  - [πŸ’“ Staying Alive](#-staying-alive-recommended-on-free-hf-spaces)
46
  - [πŸ” Security & Advanced](#-security--advanced)
47
- - [πŸ’» Local Development](#-local-development)
48
  - [πŸ—οΈ Architecture](#-architecture)
49
  - [πŸ› Troubleshooting](#-troubleshooting)
50
  - [🌟 More Projects](#-more-projects)
@@ -57,6 +61,7 @@ secrets:
57
  - πŸ“Š **Dashboard:** Real-time view of uptime, sync health, and agent status at `/`.
58
  - πŸ’Ύ **Persistent Backup:** Syncs chats, config, and session data to a private HF Dataset.
59
  - ⏰ **Keep-Alive:** Can provision a cron-triggered Cloudflare Worker to keep the Space awake.
 
60
  - πŸ€– **Broad Provider Support:** Supports Hermes' native providers, direct API-key providers, OAuth providers, and custom OpenAI-compatible endpoints.
61
 
62
  ## πŸŽ₯ Video Tutorial
@@ -197,6 +202,29 @@ With `CLOUDFLARE_WORKERS_TOKEN` set, HuggingMes can create a keep-alive worker t
197
  | `SYNC_INTERVAL` | `600` | Backup frequency in seconds |
198
  | `CLOUDFLARE_KEEPALIVE_ENABLED` | `true` | Set `false` to disable keep-awake worker |
199
  | `TELEGRAM_MODE` | `webhook` | `webhook` or `polling` |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
 
201
  ## πŸ’» Local Development
202
 
@@ -211,6 +239,7 @@ docker compose up --build
211
  - **Dashboard (`/`)**: Real-time management and monitoring.
212
  - **Hermes App (`/app/`)**: Secure proxied access to the Hermes UI.
213
  - **API (`/v1/*`)**: Proxied OpenAI-compatible agent API.
 
214
  - **Health Check (`/health`)**: Readiness probe for HF and keep-alive.
215
  - **Sync Engine**: Python background task for HF Dataset persistence.
216
 
 
22
  description: "Hugging Face token with write access. Used for automatic workspace backup and HF providers."
23
  - name: CLOUDFLARE_WORKERS_TOKEN
24
  description: "Cloudflare API token for automatic Worker proxy and KeepAlive setup."
25
+ - name: DEV_MODE
26
+ description: "Set to 'true' to enable the JupyterLab terminal at /terminal/."
27
+ - name: JUPYTER_TOKEN
28
+ description: "Strong token to secure JupyterLab terminal access (required when DEV_MODE=true). Generate: openssl rand -hex 32"
29
  ---
30
 
31
  <!-- Badges -->
 
48
  - [πŸ’Ύ Backup & Persistence](#-backup--persistence)
49
  - [πŸ’“ Staying Alive](#-staying-alive-recommended-on-free-hf-spaces)
50
  - [πŸ” Security & Advanced](#-security--advanced)
51
+ - [πŸ’» Terminal Access (JupyterLab)](#-terminal-access-jupyterlab)
52
  - [πŸ—οΈ Architecture](#-architecture)
53
  - [πŸ› Troubleshooting](#-troubleshooting)
54
  - [🌟 More Projects](#-more-projects)
 
61
  - πŸ“Š **Dashboard:** Real-time view of uptime, sync health, and agent status at `/`.
62
  - πŸ’Ύ **Persistent Backup:** Syncs chats, config, and session data to a private HF Dataset.
63
  - ⏰ **Keep-Alive:** Can provision a cron-triggered Cloudflare Worker to keep the Space awake.
64
+ - πŸ’» **Terminal Access:** Optional JupyterLab terminal at `/terminal/` for direct shell access (enable with `DEV_MODE=true`).
65
  - πŸ€– **Broad Provider Support:** Supports Hermes' native providers, direct API-key providers, OAuth providers, and custom OpenAI-compatible endpoints.
66
 
67
  ## πŸŽ₯ Video Tutorial
 
202
  | `SYNC_INTERVAL` | `600` | Backup frequency in seconds |
203
  | `CLOUDFLARE_KEEPALIVE_ENABLED` | `true` | Set `false` to disable keep-awake worker |
204
  | `TELEGRAM_MODE` | `webhook` | `webhook` or `polling` |
205
+ | `DEV_MODE` | `false` | Set `true` to enable JupyterLab terminal at `/terminal/` |
206
+ | `JUPYTER_TOKEN` | β€” | Required when `DEV_MODE=true` β€” secures terminal access |
207
+
208
+ ## πŸ’» Terminal Access (JupyterLab)
209
+
210
+ HuggingMes includes an optional JupyterLab terminal at `/terminal/` for direct shell access to the container β€” useful for running `hermes` commands, inspecting files, installing packages, and debugging.
211
+
212
+ ### Setup
213
+
214
+ 1. Add two secrets to your Space:
215
+ - `DEV_MODE` = `true`
216
+ - `JUPYTER_TOKEN` = a strong random token (`openssl rand -hex 32`)
217
+ 2. Restart the Space.
218
+ 3. Open `https://your-space.hf.space/terminal/` β€” log in with your `GATEWAY_TOKEN` first, then JupyterLab will prompt for `JUPYTER_TOKEN`.
219
+
220
+ > **Security:** JupyterLab grants full shell access to the container. Always use a strong, unique `JUPYTER_TOKEN`. The terminal will refuse to start if `JUPYTER_TOKEN` is empty or set to the insecure default.
221
+
222
+ ### What you can do
223
+
224
+ - Run `hermes` CLI commands directly
225
+ - Browse and edit files in the workspace
226
+ - Install Python packages with `pip` or `uv pip`
227
+ - Check logs, inspect config, debug issues
228
 
229
  ## πŸ’» Local Development
230
 
 
239
  - **Dashboard (`/`)**: Real-time management and monitoring.
240
  - **Hermes App (`/app/`)**: Secure proxied access to the Hermes UI.
241
  - **API (`/v1/*`)**: Proxied OpenAI-compatible agent API.
242
+ - **Terminal (`/terminal/`)**: JupyterLab terminal (requires `DEV_MODE=true`).
243
  - **Health Check (`/health`)**: Readiness probe for HF and keep-alive.
244
  - **Sync Engine**: Python background task for HF Dataset persistence.
245