simonw/codespaces-llm

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Anyone with a GitHub account can now get a free, pre-configured command-line LLM tool in the browser with one URL, using their Codespaces token as the API key.

Read this as

Simon Willison built a GitHub Codespaces setup where opening one link gives you a terminal command called 'llm' that can talk to AI models. GitHub Codespaces is a free browser-based Linux development environment, and it secretly includes a token that works as an API key for GitHub's model catalogue, which includes OpenAI's gpt-4.1. The result is free, rate-limited access to AI models with no sign-up beyond a GitHub account. It works for any GitHub user today.

Willison's codespaces-llm repo exploits a quirk: every GitHub Codespaces container carries a GITHUB_TOKEN that doubles as an API key for GitHub Models, a catalogue spanning OpenAI, Microsoft, Mistral, xAI, DeepSeek and Meta. That gives any GitHub account holder free, rate-limited LLM access via a one-click link, undercutting paid API onboarding for experimentation. The llm-github-models plugin v0.18.0, shipped by Anthony Shaw within hours, picks the token up automatically.

Codespaces containers expose a GITHUB_TOKEN environment variable that authenticates against the GitHub Models API. Willison suggested Anthony Shaw's llm-github-models plugin (v0.18.0) auto-read that variable, so four commands, pip install llm, llm install llm-github-models, llm models default github/gpt-4.1, then a prompt, yield a working CLI. The simonw/codespaces-llm repo pre-runs these via a devcontainer; a companion TIL documents devcontainer configuration. Access is free but rate-limited.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

GitHub Codespaces GitHub Models simonw/codespaces-llm llm-github-models LLM tool

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading