freebuff

CLI Tool

CodebuffAI/freebuff

Free AI coding agent offering CLI, desktop, and cloud tools for development.

Overview

Freebuff is a free coding agent that brings specialized AI agents and leading models to the terminal, desktop, browser, and GitHub repositories. It supports parallel agents, file-finding, code editing, and running checks, with no subscription or API key required. Built as a TypeScript monorepo, it offers CLI, desktop, web, cloud, and chat products.

README Preview

# Freebuff\n\nEnglish | [简体中文](./README.zh-CN.md)\n\n**Five free AI products for coding, building, and research.** No subscription, credits, or API key required.\n\n[Freebuff](https://freebuff.com) brings specialized agents and a choice of leading models to your terminal, desktop, browser, and GitHub repositories. Text ads support access to the included models.\n\n## Choose your Freebuff\n\n| Product              | What it does                        | Get started                                                           |\n| -------------------- | ----------------------------------- | --------------------------------------------------------------------- |\n| **Freebuff Desktop** | Run parallel agents locally         | [Download for macOS, Windows, or Linux](https://freebuff.com/desktop) |\n| **Freebuff CLI**     | Code from your terminal             | [Install the CLI](https://freebuff.com/cli)                           |\n| **Freebuff Web**     | Build and ship full-stack apps      | [Build an app](https://freebuff.com/web)                              |\n| **Freebuff Cloud**   | Run agents on any GitHub repository | [Connect a repository](https://freebuff.com/cloud)                    |\n| **Freebuff Chat**    | Research and think with AI          | [Start a chat](https://freebuff.com/chat)                             |\n\n## Quick start\n\nRun Freebuff in any project from your terminal:\n\n```bash\nnpm install -g freebuff\ncd ~/my-project\nfreebuff\n```\n\nThen describe what you want. Freebuff finds the relevant files, makes changes, and runs the checks that matter for your project.\n\n## Models\n\nFreebuff includes a curated model catalog. The regular picker currently offers:\n\n| Model                       | Access                  | Best for                                                           |\n| --------------------------- | ----------------------- | ------------------------------------------------------------------ |\n| **GPT-5.6 Luna**            |

FAQ (3)

Troubleshooting
How do I fix "terminal command broker protocol response was missing" in Freebuff CLI on Linux?

This error usually means the terminal command broker process failed before it could write its protocol response; the underlying cause is often ENOSPC (disk full) or EACCES (permission denied). Upgrade Freebuff CLI to the latest release containing the broker stderr fix, then re-run the command so the real write error is shown. Check available space with df -h $HOME /tmp and free space if the disk or temp filesystem is full. Verify Freebuff config/cache directories are writable, for example with ls -ld $HOME/.config/freebuff $HOME/.cache/freebuff /tmp and a write test such as touch $HOME/.cache/freebuff/.write-test && rm $HOME/.cache/freebuff/.write-test. Fix ownership/permissions with chown -R $USER:$USER $HOME/.config/freebuff $HOME/.cache/freebuff if needed, then restart Freebuff.

GitHub Issue #1359
Troubleshooting
How do I fix OpenRouter credits being double-counted or inflated in the SDK?

The SDK incorrectly adds usage.cost and cost_details.upstream_inference_cost. OpenRouter's top-level usage.cost already includes the upstream inference cost, so adding them charges roughly twice the normal cost. Replace the sum with Math.max(...) in all three credit-calculation paths in sdk/src/impl/llm.ts (streaming reportCost, non-stream generateText, and Responses):

costOverrideDollars = Math.max(
  openrouterUsage.cost ?? 0,
  openrouterUsage.costDetails?.upstreamInferenceCost ?? 0,
)

This also handles BYOK requests correctly because BYOK reports cost: 0 and the actual spend in upstreamInferenceCost. Rebuild the SDK after patching, or use patch-package if the SDK is consumed as an installed dependency. The issue was closed automatically as stale, so verify the fix is present in your installed version.

GitHub Issue #1164
Troubleshooting
Why does /compact erase all previous chat history and leave only an empty summary?

This happens when compaction accepts an empty model response or identifies a summary by message content instead of provenance. Fix it in packages/agent-runtime/src/run-agent-step.ts by replacing the history only when fullResponse.trim() is non-empty; otherwise retain agentState.messageHistory, log the empty completion, and let the retry regenerate the summary. In compact-history.ts and agents/context-pruner.ts, stamp generated summaries with a CONVERSATION_SUMMARY marker/metadata field and make isConversationSummary require that provenance. Keep a legacy fallback only for messages containing the complete envelope: opening and closing <conversation_summary> tags, the summary header, and <historical_memory>. Also validate messages in set-messages.ts so user-quoted <conversation_summary> text cannot become the active summary. A separate resume issue can cause similar amnesia when run-state.json is unreadable: handle that case instead of falling back to a RunState with empty sessionState. Temporary workaround: avoid relying on /compact after an empty model response and do not paste <conversation_summary> markers into normal user messages.

GitHub Issue #1166