Phew Install

A free AI coding agent in VS Code: four ways to start

Updated · 2 min read

An AI coding agent does not have to cost money. Phew is free and open source, and it works with free models too. Here are four ways to start, what each one gives you, and what to watch for.

First, install Phew

Install Phew from the Visual Studio Marketplace, or from Open VSX in VSCodium, Cursor, Windsurf, and other editors. Open the Phew view in the activity bar. The first card shows what is ready on your computer and what is free to start.

The first card of Phew: OpenAI is ready with a key from an environment variable; GitHub Copilot, Google Gemini, and OpenRouter are free to start; Ollama is private
The first card shows what is ready on your computer, what is free to start, and the private option.

1. GitHub Copilot Free: no key at all

If you sign in to GitHub in VS Code, Phew can use the models of your Copilot plan, also of the free one. There is no key to copy: choose GitHub Copilot on the first card and pick a model.

  • Good for: a quick start in VS Code itself.
  • See what is left: turn on Show what is left of the plan in the settings of the model, and a click on the small ring next to it shows your chat messages and when they start again. GitHub has no official API for this, so Phew reads it from the address that Copilot itself uses, only when you click.
  • Watch for: the free plan has monthly limits. Forks of VS Code do not offer Copilot models, so there you need one of the other ways.

2. A free Gemini key from Google AI Studio

  1. Open Google AI Studio, sign in, and create an API key. No card is needed.
  2. In Phew, choose Google Gemini, paste the key, and click Connect and test.
  3. Pick a Flash model for everyday work: it is fast and has a generous free quota.

Watch for: on the free tier, Google may use your requests to improve its products. Do not use it for code that must stay private.

3. Free models on OpenRouter

OpenRouter has free versions of several open models. A free key gives about 50 requests a day: enough to try Phew, not for a full working day. Choose OpenRouter in Phew, paste the key, and pick a model whose name ends with :free.

4. A local model: free and private

With Ollama, LM Studio, or vLLM, the model runs on your computer. It costs nothing per request, and your code never leaves your machine. You need a good computer, and small models are weaker than the big cloud models.

Which one to choose

WaySetupLimitsPrivacy
Copilot FreeSign in to GitHubMonthly limitsGitHub's terms
Gemini free keyOne keyDaily limitsRequests may be used
OpenRouter freeOne keyAbout 50 requests a dayDepends on the model host
Local modelInstall and downloadYour hardwareStays on your computer

Make a free quota last

  • Connect two of them. In Settings → Models, give your main model a fallback model: when its quota runs out, the fallback goes on with the task.
  • Keep the chat short. Start a new chat for a new task. Phew compacts long chats on its own.
  • Use a fast model for research. Set phew.subagents.model to a fast free model, so subagents that read the code do not spend the quota of your main model.