Sawan SrivastavaandClaude Opus 5.5 7bdb5ef89f Copy the distro into the agent directory instead of loading the clone
pi loads a local package in place, so the extensions and skills were read
from the clone the installer ran in: deleting or moving it silently dropped
them, and a git pull changed the live install. The installers now copy the
package to <agent-dir>/lemonade-pi and install that. --dev (-Dev) keeps
loading from the clone for working on the distro.

configure.mjs drops earlier installs from settings.json and folders.json, so
upgrading, re-cloning, or switching to and from --dev doesn't load every
extension twice or keep pointing at a deleted folder.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-11-06 14:10:59 -08:00
2026-11-04 12:19:31 -08:00

lemonade-pi 🍋

Lemonade flavored pi: an opinionated pi distro for local models.

One install gives you a Claude-Code-like setup tuned for models such as Qwen3.8 27B on Lemonade: web search, subagents, plan mode, permission modes, questions, a todo list, thinking-level control, and a few skills. It keeps the prompt small, about 3.5k tokens of system prompt and tools in total.

Install

git clone https://github.com/lemonade-sdk/lemonade-pi && cd lemonade-pi
./install.sh                                          # macOS, Linux
powershell -ExecutionPolicy Bypass -File install.ps1  # Windows
lemonade launch pi

To try it without touching your global ~/.pi/agent, install into a self-contained directory and launch with it:

./install.sh --dir ~/.pi/lemonade-pi-test                  # Windows: install.ps1 -Dir $HOME\.pi\lemonade-pi-test
PI_CODING_AGENT_DIR=~/.pi/lemonade-pi-test lemonade launch pi

The installer asks how new sessions should handle permissions:

  • Full access (pi's default, preselected): edits and commands run without asking.
  • Ask first (Claude Code's default): you approve edits and commands.

Pass --permissions full or --permissions ask (-Permissions on Windows) to skip the question. Without a terminal to ask on, it picks full access. Re-running keeps your choice unless you pass the flag. Either way the permission extension stays installed, so you can switch at any time.

If pi isn't installed, the installer runs pi's official installer first. It then runs pi install for each package below, pinned to tested versions. It copies lemonade-pi's extensions and skills to ~/.pi/agent/lemonade-pi and installs them from there, so you can delete the clone afterwards. To update, pull and re-run the installer. It writes config files only where none exist, with three small edits to files you already have:

  • keybindings.json: adds "app.thinking.cycle": "alt+t", which frees shift+tab for the mode cycle, unless you've already bound that action.
  • pi-ask-permission's folders.json: gets the package folder as read-only, so loading a skill doesn't prompt.
  • Permission settings: the allow list is updated if it still matches an earlier lemonade-pi default, and the starting mode changes only when you pass --permissions.

It leaves models.json, mcp.json, and your default model (which lemonade launch pi manages) alone.

When working on lemonade-pi itself, install with --dev (-Dev on Windows): pi then loads the extensions and skills from the clone, so your edits apply in the next session without re-installing. Re-running without it goes back to the copy.

What you get

Feature Provided by Use
Plan mode @narumitw/pi-plan-mode shift+tab, /plan, ctrl+alt+p
Permission prompts, ask-user questions @adeildo/pi-ask-permission shift+tab; alt+m for all modes
Subagents pi-lite-subagent agents: explore, plan, general-purpose, reviewer
Web search and fetch pi-web-access works without a key
Todo list pi-todo-lite ctrl+alt+t, /todos
Thinking levels for Qwen3 on Lemonade extensions/lemonade-thinking.ts alt+t cycles off → high
Lean system prompt extensions/lean-prompt.ts always on
Skills skills/ /skill:grill-me, code-review, simplify, init

Permission modes

New sessions start in the mode you chose at install: full or ask first (manual). To change it later, re-run the installer with --permissions, or set permission.mode in ~/.pi/agent/extensions/pi-harness/settings.json.

Mode What runs without asking Key
ask first (manual) Reads, web search, todos, and anything you've marked "always yes" shift+tab
accept edits (edits) The same, plus file edits and writes shift+tab
plan Read-only exploration until you approve a plan shift+tab
judge Like accept edits; a judge model answers the routine calls (by default TypeSafe's hosted Jev, via /login typesafe, so it isn't local) alt+m
full Everything: no permission prompts at all shift+tab if it's your starting mode, else alt+m

shift+tab cycles ask first → accept edits → plan, as in Claude Code. If sessions start with full access, full joins the end of that cycle, as bypass mode does in Claude Code when you launch with it; otherwise it stays off shift+tab, so a stray keypress can't turn off every prompt. Plans run in your starting mode, so finishing one returns you there. alt+m reaches every mode (manual → edits → judge → full); the footer shows the active one.

All extensions come from their upstream authors, unmodified. This repository adds only glue:

  • lean-prompt.ts replaces pi's default prompt with a short behavioral one, mentions only tools that are active, and lists your subagents.
  • claude-keys.ts makes shift+tab cycle modes like Claude Code: ask first → accept edits → plan, then full access if that's your starting mode. The thinking-level cycle moves to alt+t (in keybindings.json) and the todo toggle to ctrl+alt+t.
  • lemonade-thinking.ts marks Qwen3-family Lemonade models as reasoning models. pi then sends enable_thinking and llama.cpp's thinking_budget_tokens, so off disables thinking and each level caps it (budgets come from pi's thinkingBudgets setting). It steps aside once Lemonade writes reasoning into models.json itself.
  • subagent-permissions.ts runs headless subagent children in full permission mode. Delegating isn't on the allow list, so in default and accept-edits modes you approve each delegation, seeing the agent and its task, in the parent. Agents are still limited by their tools:.
  • Config defaults in config/:
    • read-only tools, web search, todos, and plan mode's own tools are allowed without prompting
    • plan mode may use read-only bash and web tools
    • web search is routed SearXNG → Brave → Tavily → Exa (free) → DuckDuckGo

Configuration

  • Better search: set SEARXNG_BASE_URL, BRAVE_API_KEY, or TAVILY_API_KEY. Unconfigured providers are skipped.
  • Agents: edit or add Markdown agents in ~/.pi/agent/agents/. Leave out model: so they use the model you launched.
  • Permissions: ~/.pi/agent/extensions/pi-harness/settings.json, or the settings screen.
  • Plan mode: ~/.pi/agent/pi-plan-mode.json, or /plan settings.

Known gaps

  • Subagent concurrency is fixed at 4 in pi-lite-subagent 0.2.2, the most tasks of one parallel call that run at once. That suits discrete GPUs serving several slots. Lemonade starts llama.cpp with one slot (--parallel 1), though, so on a single GPU such as Strix Halo the extra requests just queue on the server and evict each other's prompt cache. A setting for this is planned upstream.
  • No subagents in plan mode. pi-lite-subagent can't restrict which agent runs, so plan mode leaves subagent out to stay read-only.
  • Two question tools. Plan mode's plan_mode_question is declared in every request next to ask_questions, about 340 extra tokens; it only works while a plan is active. Plan mode keeps its tool list fixed on purpose, because changing tools mid-session would make llama.cpp reprocess the whole prompt.
S
Description
Lemonade flavored pi: an opinionated pi distro for local models.
Readme MIT
77 KiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 36.5%
JavaScript 25.3%
PowerShell 19.4%
Shell 18.8%