AI Forward - Expose local LLM services (Ollama, LM Studio) to the cloud
Project description
DLab AI Forward CLI
Command-line interface for AI Forward - expose your local LLM services (Ollama, LM Studio) to the cloud via secure WebSocket tunnel.
Features
- 🔌 Easy Tunneling - Connect local LLM services to cloud infrastructure
- 🤖 Multi-Service Support - Works with Ollama and LM Studio
- 📊 System Monitoring - Reports CPU, RAM, and GPU metrics
- 🔄 Auto-Discovery - Automatically detects available models
- 🔒 Secure - Token-based authentication
- 🖥️ Cross-Platform - Works on macOS, Linux, and Windows
Installation
pip install dlab-ai-forward
For NVIDIA GPU monitoring support:
pip install dlab-ai-forward[nvidia]
Or using pipx (recommended for CLI tools):
pipx install dlab-ai-forward
pipx install dlab-ai-forward[nvidia] # With NVIDIA support
Usage
# Basic usage
dlab-ai-forward --name demo --server https://ai.example.com --token YOUR_TOKEN
# With custom ports
dlab-ai-forward --name my-node --server https://ai.example.com --token YOUR_TOKEN \
--ollama-port 11434 --lmstudio-port 1234
# Expose only specific services
dlab-ai-forward --name ollama-only --server https://ai.example.com --token YOUR_TOKEN \
--services ollama
# Verbose mode (debug logging)
dlab-ai-forward --name demo --server https://ai.example.com --token YOUR_TOKEN --verbose
Options
| Option | Description | Default |
|---|---|---|
--name |
Tunnel name (unique identifier) | Required |
--server |
Backend server URL | Required |
--token |
Authentication token (32 chars) | Required |
--ollama-port |
Ollama local port | 11434 |
--lmstudio-port |
LM Studio local port | 1234 |
--services |
Services to expose | ollama lmstudio |
--verbose, -v |
Enable debug logging | False |
System Requirements
- Python 3.8+
- Ollama (optional) - running on localhost:11434
- LM Studio (optional) - running on localhost:1234
GPU Monitoring
GPU metrics are automatically detected and reported:
- NVIDIA GPUs: Install with
pip install dlab-ai-forward[nvidia] - AMD GPUs (Windows): Install with
pip install dlab-ai-forward[amd] - Apple Silicon (M1/M2/M3): Automatically supported on macOS
- Other GPUs: Not currently supported
AMD GPU on Windows
For AMD GPU monitoring on Windows, you have two options:
-
Using WMI (built-in, no extra install):
- Works with most AMD GPUs
- Uses Windows Performance Counters
- May require running as Administrator for full metrics
-
Using pyadl (optional):
pip install dlab-ai-forward[amd]
- Uses AMD Display Library (ADL)
- More accurate metrics
- Requires AMD drivers installed
How It Works
- CLI connects to backend via WebSocket with authentication token
- CLI detects local LLM services and available models
- CLI reports system metrics (CPU, RAM, GPU)
- Cloud services can proxy requests through the backend to your local models
Example: Call Local Model from Cloud
# Cloud service makes request to backend
curl https://ai.example.com/api/demo/ollama/api/tags \
-H "Authorization: Bearer YOUR_TOKEN"
# Or for LM Studio
curl https://ai.example.com/api/demo/lmstudio/v1/models \
-H "Authorization: Bearer YOUR_TOKEN"
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dlab_ai_forward-0.1.0.tar.gz.
File metadata
- Download URL: dlab_ai_forward-0.1.0.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee6b35a1f323419dfce3323bc300df865011e22864abcfe6bcb3d6431dc77f24
|
|
| MD5 |
e2ea9d95574a1f0b578b9f662f6de8da
|
|
| BLAKE2b-256 |
492e6decfdf4df8b84ce65cabbca60a8cf7437cf6b5f7736c54924f7fe3f5a39
|
File details
Details for the file dlab_ai_forward-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dlab_ai_forward-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f23432a68b36d75bd363f4ca655826e1090cf6a353b9e561d8c5b7951f658bfe
|
|
| MD5 |
85ab773c6b41a1aad456c1360ca717cd
|
|
| BLAKE2b-256 |
fe50335b2553aaf77d0711cf94634b391795d8278ce57277dd070c1302bba1f5
|