Skip to content

First run with a local model

This walks through running Polyglot against a model on your own machine. No account, no API key.

Ollama - install it, then pull a coding model:

Terminal window
ollama pull qwen2.5-coder

Ollama serves an OpenAI-compatible API at http://localhost:11434/v1 automatically.

LM Studio - in the app, load a model, then start the local server from the Developer tab. It listens on http://localhost:1234/v1 by default.

Any other OpenAI-compatible server (vLLM, llama.cpp server, …) works the same way - see Local servers.

The fastest way is environment variables:

Terminal window
export POLYGLOT_PROVIDER=openai-compatible
export POLYGLOT_MODEL=qwen2.5-coder # a model your server has
export POLYGLOT_BASE_URL=http://localhost:11434/v1 # Ollama's default; adjust for LM Studio etc.

Or put it in a file so you don’t have to repeat it - see Configuration.

Terminal window
polyglot

You’ll get a TUI. Type a request and press Enter:

› list the TypeScript files in this directory and tell me which one is the entry point

Polyglot starts in manual mode: it reads files freely, but asks before running a command or writing anything. Approve with y, deny with n, or press c to type a redirection instead of a plain yes/no.

Press Shift+Tab to cycle to auto (runs without asking) or plan (read-only until it presents a plan). Ctrl+C exits.

Small local models sometimes get the tool-call syntax wrong. If Polyglot reports the model “isn’t reliably producing valid tool calls”, try a stronger coding model, or - if your server supports it - turn on structured output:

Terminal window
export POLYGLOT_STRUCTURED_OUTPUT=true