Skip to main content

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:

  1. Using WMI (built-in, no extra install):

    • Works with most AMD GPUs
    • Uses Windows Performance Counters
    • May require running as Administrator for full metrics
  2. Using pyadl (optional):

    pip install dlab-ai-forward[amd]
    
    • Uses AMD Display Library (ADL)
    • More accurate metrics
    • Requires AMD drivers installed

How It Works

  1. CLI connects to backend via WebSocket with authentication token
  2. CLI detects local LLM services and available models
  3. CLI reports system metrics (CPU, RAM, GPU)
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dlab_ai_forward-0.1.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dlab_ai_forward-0.1.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

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

Hashes for dlab_ai_forward-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ee6b35a1f323419dfce3323bc300df865011e22864abcfe6bcb3d6431dc77f24
MD5 e2ea9d95574a1f0b578b9f662f6de8da
BLAKE2b-256 492e6decfdf4df8b84ce65cabbca60a8cf7437cf6b5f7736c54924f7fe3f5a39

See more details on using hashes here.

File details

Details for the file dlab_ai_forward-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dlab_ai_forward-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f23432a68b36d75bd363f4ca655826e1090cf6a353b9e561d8c5b7951f658bfe
MD5 85ab773c6b41a1aad456c1360ca717cd
BLAKE2b-256 fe50335b2553aaf77d0711cf94634b391795d8278ce57277dd070c1302bba1f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page