Spaces:
Running
Running
docs: add JupyterLab terminal setup instructions to README
Browse filesCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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 |
-
- [π»
|
| 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 |
|