Quickstart
Get up and running with Gambiarra in under 5 minutes
Installation
Install the CLI and SDK for your environment
CLI commands
Learn about all available CLI commands
SDK reference
Integrate Gambiarra with the Vercel AI SDK
Why Gambiarra?
If you’re working with local LLMs, you know the challenge: your gaming PC has a powerful GPU running Ollama, but your laptop doesn’t. Your teammate has a different model you’d like to try. Gambiarra solves this by creating a shared pool of LLM resources on your local network.Key features
Local-first
Your data stays on your network. No cloud services, no external dependencies.
Universal compatibility
Works with any OpenAI-compatible API: Ollama, LM Studio, LocalAI, vLLM, and more.
Vercel AI SDK integration
Drop-in replacement for your existing AI SDK workflows.
Auto-discovery
mDNS/Bonjour support for zero-config networking.
Real-time monitoring
Beautiful Terminal UI for tracking room activity and participant health.
Production ready
Built with TypeScript, Bun, and modern tooling for reliability.
Use cases
Development teams
Share expensive LLM endpoints across your team. Let your team access your high-powered GPU server without giving everyone SSH access.Hackathons
Pool resources for AI projects. Everyone brings their laptop, and collectively you have access to multiple models running on different machines.Research labs
Coordinate LLM access across multiple workstations. Each researcher can contribute their local models to a shared pool.Home labs
Share your gaming PC’s LLM with your laptop. Run the heavy model on your desktop, access it from anywhere on your network.Education
Classroom environments where students share compute resources. The instructor’s machine runs the models, students access them for assignments.How it works
Gambiarra uses a simple HTTP + SSE architecture for universal compatibility:Core components
HubCentral HTTP server that routes requests and manages rooms. Can run on any machine on your network. Participants
LLM endpoints registered in a room. Each participant exposes an OpenAI-compatible API (Ollama, LM Studio, etc.). SDK
Vercel AI SDK provider that proxies requests to the hub. Use it in your applications just like any other AI SDK provider. CLI
Command-line tool for starting hubs, creating rooms, and joining as a participant. TUI
Real-time monitoring interface using Server-Sent Events. Track participant health, model usage, and room activity.
Model routing
The SDK provides three ways to route requests:| Pattern | Example | Description |
|---|---|---|
| Participant ID | gambiarra.participant("joao") | Route to specific participant |
| Model name | gambiarra.model("llama3") | Route to first participant with this model |
| Any | gambiarra.any() | Route to random online participant |
Architecture highlights
Health checking
Participants automatically send health checks every 10 seconds. If a participant doesn’t respond for 30 seconds, it’s marked offline. This ensures your application always routes to available models.OpenAI compatibility
Gambiarra acts as a transparent proxy for OpenAI-compatible requests. Your existing code works without modification:Streaming support
Full support for streaming responses using Server-Sent Events:Security considerations
Best practices for production use:- Run on an isolated network (VPN, WireGuard, or air-gapped)
- Use a reverse proxy (Caddy, Nginx) for HTTPS and authentication
- Enable password protection for rooms when creating them:
- Consider network-level security (firewall rules, VLANs)
Supported providers
Gambiarra works with any OpenAI-compatible API:| Provider | Default endpoint | Notes |
|---|---|---|
| Ollama | http://localhost:11434 | Most popular local LLM server |
| LM Studio | http://localhost:1234 | GUI-based LLM management |
| LocalAI | http://localhost:8080 | Self-hosted OpenAI alternative |
| vLLM | http://localhost:8000 | High-performance inference |
| text-generation-webui | http://localhost:5000 | Gradio-based interface |
| Custom | Any URL | Any OpenAI-compatible endpoint |
Next steps
Installation
Install the CLI and SDK
Quickstart
Get started in 5 minutes
CLI reference
Learn all CLI commands
SDK reference
Integrate with your app