# freebuff | Codebuff | Knowledge Base | Instagit

The free coding agent

GitHub Stars: 10.2k

Repository: https://github.com/CodebuffAI/freebuff

---

## Articles

### [How to Contribute to the Freebuff Project: A Developer's Guide to the AI Agent Framework](/CodebuffAI/freebuff/freebuff-contribution-guide)

Learn how to contribute to the Freebuff AI agent framework. Fork the repo, install dependencies, branch, and submit a pull request to join the Freebuff project.

- Tags: how-to-guide
- Published: 2026-09-01

### [How the Public Freebuff Repository Mirrors the Private Codebuff Source Tree](/CodebuffAI/freebuff/freebuff-public-private-repo-relationship)

Discover the relationship between the public Freebuff repository and the private Codebuff source tree. Learn how contributions flow through a port-and-export workflow.

- Tags: internals
- Published: 2026-09-01

### [How Freebuff Handles Strict Typing with TypeScript: A Layered Type Safety Architecture](/CodebuffAI/freebuff/freebuff-typescript-strict-typing)

Learn how Freebuff achieves strict typing with TypeScript using a layered architecture. Discover its approach to type safety, project references, and Zod runtime validation.

- Tags: architecture
- Published: 2026-09-01

### [How Freebuff Uses tmux Helper Scripts for End-to-End Testing](/CodebuffAI/freebuff/freebuff-tmux-scripts-testing)

Learn how Freebuff leverages tmux helper scripts to automate its end-to-end testing suite. Discover how shell scripts and TypeScript wrappers control the interactive TUI for seamless testing.

- Tags: how-to-guide
- Published: 2026-09-01

### [What Is the Role of the `freebuff/` Workspace in the CodebuffAI/freebuff Repository?](/CodebuffAI/freebuff/freebuff-freebuff-workspace-role)

Discover the role of the freebuff/ workspace in CodebuffAI/freebuff. Learn how it isolates the CLI product's code, build, tests, and release automation within the monorepo.

- Tags: internals
- Published: 2026-09-01

### [Freebuff LLM Providers: Complete Guide to Supported Services and Integration](/CodebuffAI/freebuff/freebuff-supported-llm-providers)

Explore Freebuff LLM providers. Integrate seamlessly with OpenAI, Azure OpenAI, OpenRouter & more via the OpenAI API. Simplify your LLM services.

- Tags: getting-started
- Published: 2026-09-01

### [How Freebuff Uses Tree-Sitter for Source Code Parsing: A Complete Technical Guide](/CodebuffAI/freebuff/freebuff-treesitter-source-code-parsing)

Discover how Freebuff uses Tree-Sitter with WebAssembly for efficient, language-agnostic source code parsing across Node, Bun, and browsers. A complete technical guide.

- Tags: deep-dive
- Published: 2026-09-01

### [What Does the agent-runtime Package Do in Freebuff?](/CodebuffAI/freebuff/freebuff-agent-runtime-package-functionality)

Discover the @codebuff/agent-runtime package, Freebuff's LLM agent execution engine. It handles prompt construction, token budgeting, tool dispatching, and output validation in a continuous loop.

- Tags: internals
- Published: 2026-09-01

### [How Freebuff Manages Public Agent Definitions: Bundled and Custom Agents Explained](/CodebuffAI/freebuff/freebuff-public-agent-definitions-management)

Discover how Freebuff manages public agent definitions using bundled and custom agents. Learn about its dual-layer system for efficient agent management and dynamic loading.

- Tags: architecture
- Published: 2026-09-01

### [What Is the Common Workspace in Freebuff? Purpose, Architecture, and Code Examples](/CodebuffAI/freebuff/freebuff-common-workspace-purpose)

Discover the common workspace in Freebuff, its purpose, architecture, and how it centralizes shared types, schemas, and utilities across the monorepo for consistency and efficiency. Explore code examples.

- Tags: deep-dive
- Published: 2026-09-01

### [How to Get Diagnostic Information About Active Terminal Command Processes in Freebuff](/CodebuffAI/freebuff/freebuff-sdk-diagnostics-active-terminal-processes)

Get Freebuff diagnostic information for active terminal commands using collectProcessDiagnostics() or runTerminalCommand. Capture PID, args, timestamps, and output easily.

- Tags: how-to-guide
- Published: 2026-09-01

### [TerminalCommandBroker Interface in the Freebuff SDK: A Deep Dive into Process Isolation](/CodebuffAI/freebuff/freebuff-sdk-terminalcommandbroker-interface)

Explore the TerminalCommandBroker interface in Freebuff SDK. Learn how it enables cross-platform process isolation and prevents UI blocking for reliable CLI operations.

- Tags: deep-dive
- Published: 2026-09-01

### [How to Embed Freebuff Agents in External Applications Using the SDK](/CodebuffAI/freebuff/freebuff-sdk-embedding-agents-external-applications)

Easily embed Freebuff agents in your applications with the SDK. Leverage the TypeScript wrapper to load agents and stream real-time events via WebSocket for enhanced functionality.

- Tags: how-to-guide
- Published: 2026-09-01

### [Complete Guide to the Core Exports of the Freebuff SDK](/CodebuffAI/freebuff/freebuff-sdk-core-exports)

Explore the core exports of the Freebuff SDK, including runtime functions, client classes, file utilities, agent loaders, and LLM helpers. Access the full API from a single entry point.

- Tags: api-reference
- Published: 2026-09-01

### [Freebuff CLI Architecture: Key Files and Code Flow Explained](/CodebuffAI/freebuff/freebuff-cli-architecture-key-files)

Explore the Freebuff CLI architecture. Discover key files like entry.ts and index.tsx and understand the code flow in this modular TypeScript pipeline.

- Tags: architecture
- Published: 2026-09-01

### [How Freebuff Detects and Handles Parent Process Termination in Its Terminal Command Broker](/CodebuffAI/freebuff/freebuff-broker-parent-process-termination)

Learn how Freebuff's terminal command broker detects parent process termination via stdin EOF events, ensuring clean exits and classified failures. Understand the mechanism.

- Tags: internals
- Published: 2026-09-01

### [How the Freebuff Broker Manages the Process Tree: A Deep Dive into Isolated Command Execution](/CodebuffAI/freebuff/freebuff-broker-process-tree-management)

Discover how the Freebuff broker manages the process tree by spawning commands in detached helper processes and ensuring group reaping on parent disconnect for robust execution.

- Tags: deep-dive
- Published: 2026-09-01

### [What Is the `run_terminal_command` Tool in Freebuff? Core Responsibilities and Implementation](/CodebuffAI/freebuff/freebuff-run-terminal-command-tool-role)

Explore Freebuff's run_terminal_command tool, the core engine for safe, bounded, and abort-aware shell command execution with cross-platform compatibility and process management.

- Tags: internals
- Published: 2026-09-01

### [How the Freebuff SDK Handles Terminal Command Execution and Output Buffering](/CodebuffAI/freebuff/freebuff-sdk-terminal-command-execution)

Explore how the Freebuff SDK executes terminal commands and buffers output efficiently. Discover its approach to detached processes and memory management for safe output capture.

- Tags: internals
- Published: 2026-09-01

### [How Freebuff Ensures Process Isolation for Terminal Commands](/CodebuffAI/freebuff/freebuff-process-isolation-terminal-commands)

Discover how Freebuff ensures process isolation for terminal commands. It uses a detached broker process for a separate execution environment, enhancing security and stability.

- Tags: internals
- Published: 2026-09-01

### [What Is the Terminal Command Broker in Freebuff and Why It Matters for Cross-Platform CLI Reliability](/CodebuffAI/freebuff/freebuff-terminal-command-broker-purpose)

Discover the Freebuff terminal command broker. This detached helper process ensures reliable cross-platform CLI execution via a stable JSON protocol for Windows, macOS, and Linux.

- Tags: deep-dive
- Published: 2026-09-01

### [How the Freebuff CLI Entry Point Dispatches Commands: A Deep Dive](/CodebuffAI/freebuff/freebuff-cli-entry-point-dispatch)

Explore the Freebuff CLI entry point and its two-stage command dispatch system. Learn how it handles broker mode, argument parsing, and command routing to specific handlers or the interactive TUI.

- Tags: deep-dive
- Published: 2026-09-01

### [What Technologies Power the Freebuff Project: A Deep Dive into the CodebuffAI Stack](/CodebuffAI/freebuff/freebuff-project-technologies)

Explore the CodebuffAI stack powering the Freebuff project. Discover the TypeScript monorepo, Bun runtime, and composable agent-runtime orchestrating LLM agents.

- Tags: deep-dive
- Published: 2026-09-01

### [Freebuff Monorepo Workspace Structure: Complete Technical Guide](/CodebuffAI/freebuff/freebuff-monorepo-workspace-structure)

Explore the Freebuff monorepo structure. Learn how its TypeScript workspaces, including agents, cli, and sdk, enable isolated development with cross-workspace dependencies.

- Tags: architecture
- Published: 2026-09-01

### [How to Update Freebuff to the Latest Version: NPM and Source Guide](/CodebuffAI/freebuff/how-to-update-freebuff-to-latest-version)

Update Freebuff to the latest version easily. Follow our NPM or source guide to install the newest release and get the latest features.

- Tags: how-to-guide
- Published: 2026-08-22

### [Release History of Freebuff: Complete Version Timeline from v0.1.0 to v2.1.x](/CodebuffAI/freebuff/what-is-release-history-of-freebuff)

Explore the complete Freebuff release history. Track its evolution from v0.1.0 to v2.1.x and understand its journey as a multi-agent orchestration platform.

- Tags: release-history
- Published: 2026-08-22

### [How to Troubleshoot Common Freebuff Errors: A Complete Diagnostic Guide](/CodebuffAI/freebuff/how-to-troubleshoot-common-freebuff-errors)

Troubleshoot common Freebuff errors quickly. This guide helps you diagnose issues by tracing stack traces, validating API keys, and checking environment requirements for the CodebuffAI/freebuff repository.

- Tags: how-to-guide
- Published: 2026-08-22

### [Freebuff Example Configurations: A Complete Guide to Starter Templates](/CodebuffAI/freebuff/are-there-any-example-configurations-for-freebuff)

Explore Freebuff example configurations for starter templates. Discover agent definitions, MCP server schemas, and TypeScript tooling in our complete guide. Get started with freebuff init.

- Tags: how-to-guide
- Published: 2026-08-22

### [What Are the Main Components of Freebuff?](/CodebuffAI/freebuff/what-are-main-components-of-freebuff)

Explore the 8 core components of Freebuff including CLI SDK Agent Runtime LLM Providers and more Discover how this composable TypeScript monorepo powers AI coding agents

- Tags: internals
- Published: 2026-08-22

### [How to Run Freebuff Tests: Complete Guide to the Bun-Based Suite](/CodebuffAI/freebuff/how-to-run-freebuff-tests)

Learn how to run Freebuff tests in this comprehensive guide. Execute the full suite with bun test or target specific packages for efficient testing.

- Tags: how-to-guide
- Published: 2026-08-22

### [Is Freebuff Compatible with VS Code? Complete Integration and Detection Guide](/CodebuffAI/freebuff/is-freebuff-compatible-with-vs-code)

Discover if Freebuff works with VS Code. Learn how Freebuff integrates seamlessly with VS Code's terminal for optimized color handling, clipboard, and file operations.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Suggest a New Feature for Freebuff: The Complete Contributor Workflow](/CodebuffAI/freebuff/how-to-suggest-new-feature-for-freebuff)

Suggest a new feature for Freebuff via GitHub Issues using our Feature Request template. Learn the complete contributor workflow and how your contributions are integrated.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Report a Bug in Freebuff: Complete Guide to Issue Templates and Best Practices](/CodebuffAI/freebuff/how-to-report-a-bug-in-freebuff)

Learn how to report a bug in Freebuff effectively. Use GitHub issue templates, provide detailed steps, and follow best practices for quick resolution. Protect your credentials.

- Tags: how-to-guide
- Published: 2026-08-21

### [What License Does Freebuff Use? Understanding the Apache 2.0 Terms](/CodebuffAI/freebuff/what-license-does-freebuff-use)

Freebuff uses the Apache 2.0 license. Discover its permissive terms for commercial use, modification, and distribution with patent protection. Learn more now.

- Tags: licensing-guide
- Published: 2026-08-21

### [Where to Find Freebuff Documentation: A Complete Guide to the CodebuffAI Repository](/CodebuffAI/freebuff/where-can-i-find-freebuff-documentation)

Find freebuff documentation in the CodebuffAI repository. Explore the docs directory and inline READMEs for comprehensive guides.

- Tags: documentation-guide
- Published: 2026-08-21

### [How to Contribute to the Freebuff Project: A Complete Guide for Developers](/CodebuffAI/freebuff/how-to-contribute-to-freebuff-project)

Learn how to contribute to the freebuff project. Clone the monorepo, install dependencies, build locally, and submit pull requests to help develop this open-source tool.

- Tags: how-to-guide
- Published: 2026-08-21

### [What Are the Benefits of Using Freebuff? A Deep Dive into the Codebuff Framework](/CodebuffAI/freebuff/what-are-the-benefits-of-using-freebuff)

Discover the benefits of Freebuff, an AI coding assistant. Boost productivity across platforms without subscriptions or API keys. Explore its multi-agent architecture.

- Tags: deep-dive
- Published: 2026-08-21

### [How to Use Freebuff for Code Formatting: CLI Guide and Architecture](/CodebuffAI/freebuff/how-to-use-freebuff-for-code-formatting)

Learn how to use Freebuff for code formatting with our CLI guide. Freebuff integrates AI-powered formatting and sanitizes output from tools like Prettier for safe display.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Use Freebuff for Code Linting: AI-Powered Linting with the Freebuff SDK](/CodebuffAI/freebuff/how-to-use-freebuff-for-code-linting)

Learn how to use Freebuff for code linting with its powerful AI-powered SDK. Get structured feedback via CLI or programmatically for cleaner code.

- Tags: how-to-guide
- Published: 2026-08-21

### [Does Freebuff Support CI/CD Pipelines? Complete GitHub Actions Integration Guide](/CodebuffAI/freebuff/does-freebuff-support-ci-cd-pipelines)

Freebuff seamlessly integrates with GitHub Actions for automated CI/CD pipelines. Automate build, lint, test, and deploy your TypeScript monorepo effortlessly.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Configure Freebuff Settings: CLI, Agents, and MCP Setup](/CodebuffAI/freebuff/how-to-configure-freebuff-settings)

Learn to configure Freebuff settings using CLI, agents, and MCP setup. Master Freebuff configuration with our easy-to-follow guide.

- Tags: how-to-guide
- Published: 2026-08-21

### [Command-Line Interface (CLI) for Freebuff: Complete Usage Guide](/CodebuffAI/freebuff/what-is-the-command-line-interface-cli-for-freebuff)

Explore the Freebuff command-line interface (CLI) with this comprehensive guide. Learn to leverage its interactive TUI or terminal-command broker for efficient development.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Integrate Freebuff into an Existing Project: CLI and SDK Methods](/CodebuffAI/freebuff/how-to-integrate-freebuff-into-existing-project)

Easily integrate Freebuff into your project with the global CLI for instant AI coding or the TypeScript SDK for advanced programmatic control in CI/CD pipelines.

- Tags: how-to-guide
- Published: 2026-08-21

### [What Programming Languages Does Freebuff Support?](/CodebuffAI/freebuff/what-programming-languages-does-freebuff-support)

Discover the programming languages Freebuff supports including JavaScript, TypeScript, Python, Go, Rust, C/C++, and web formats. Learn more about its language registry.

- Tags: getting-started
- Published: 2026-08-21

### [How to Set Up a Development Environment for Freebuff: Complete 2024 Guide](/CodebuffAI/freebuff/how-to-set-up-development-environment-for-freebuff)

Set up your freebuff development environment easily. Clone the monorepo, install Bun, build the SDK and CLI, and launch the terminal UI with this 2024 guide.

- Tags: getting-started
- Published: 2026-08-21

### [Prerequisites for Running Freebuff: Complete Setup Guide](/CodebuffAI/freebuff/what-are-the-prerequisites-for-running-freebuff)

Discover the essential prerequisites for running Freebuff. Learn how to set up Bun, npm, Node.js, Docker, Git, and your .env.local file for a smooth development experience.

- Tags: how-to-guide
- Published: 2026-08-21

### [How to Install CodebuffAI/freebuff Locally: Global CLI vs. Development Setup](/CodebuffAI/freebuff/how-to-install-codebuffai-freebuff-locally)

Install CodebuffAI/freebuff locally! Learn to set up the global CLI with npm or build the TypeScript monorepo for development. Get started quickly.

- Tags: getting-started
- Published: 2026-08-21

### [How to Run the Typecheck Job Efficiently Across CI Lanes in Freebuff](/CodebuffAI/freebuff/how-to-run-typecheck-job-efficiently-ci-lanes)

Slash typecheck job runtime from 15 to 3 minutes in Freebuff. Learn how to efficiently split monorepo type-checking across parallel CI lanes using bun.

- Tags: how-to-guide
- Published: 2026-08-20

### [How to Configure Dependency Injection Contracts in Common Types for Freebuff](/CodebuffAI/freebuff/how-to-configure-dependency-injection-contracts-common-types)

Learn how to configure dependency injection contracts in common types using TypeScript interfaces in Freebuff. Streamline your code with clear contracts and efficient implementations.

- Tags: how-to-guide
- Published: 2026-08-20

### [How the Composio Integration Extends Freebuff's Tool Capabilities: A Deep Dive](/CodebuffAI/freebuff/how-composio-integration-extend-freebuff-tool-capabilities)

Discover how the Composio integration extends Freebuff's tool capabilities by enabling dynamic API discovery, configuration, and execution, eliminating hard-coding for external services.

- Tags: deep-dive
- Published: 2026-08-20

### [How the Gravity‑Index Tool Optimizes File Discovery in Freebuff](/CodebuffAI/freebuff/how-gravity-index-tool-optimize-file-discovery)

Discover how the gravity-index tool optimizes file discovery in Freebuff by delegating search queries, attaching metadata, and providing deterministic link resolution. Streamline service discovery now.

- Tags: deep-dive
- Published: 2026-08-20

### [How to Add a New Tool Definition with Zod Schemas in Freebuff](/CodebuffAI/freebuff/how-to-add-new-tool-definition-zod-schemas)

Learn to add a new tool definition in Freebuff using Zod schemas for input validation and an async execute function. Simplify your custom tool integration.

- Tags: how-to-guide
- Published: 2026-08-20

### [How to Set Up tmux‑Based CLI Testing for Terminal Scenarios](/CodebuffAI/freebuff/how-to-set-up-tmux-cli-testing-terminal-scenarios)

Master tmux-based CLI testing for terminal scenarios with Freebuff. Run commands in isolated sessions, capture YAML output, and inspect results with a React viewer. Avoid flaky stdin/stdout piping.

- Tags: how-to-guide
- Published: 2026-08-20

### [How to Configure the Freebuff CLI Terminal Command Broker for Headless Operation](/CodebuffAI/freebuff/how-to-configure-cli-terminal-command-broker-headless-operation)

Configure the Freebuff CLI terminal command broker for headless operation by setting FREEBUFF_HEADLESS=1. Bypass UI detection in CI pipelines and Docker containers.

- Tags: how-to-guide
- Published: 2026-08-20

### [How the spawn-agents Tool Coordinates Parallel Agent Execution in Freebuff](/CodebuffAI/freebuff/how-spawn-agents-tool-coordinate-parallel-agent-execution)

Discover how Freebuff's spawn-agents tool orchestrates parallel agent execution using Promise.allSettled, ensuring efficient coordination and consolidated results for your AI workflows.

- Tags: internals
- Published: 2026-08-20

### [How File Change Hooks Trigger and Propagate in the Freebuff Agent Runtime](/CodebuffAI/freebuff/how-file-change-hooks-trigger-propagate-agent-runtime)

Learn how Freebuff agent runtime triggers file change hooks after tool execution. Discover how changed file paths propagate and hook results enhance LLM decision-making.

- Tags: internals
- Published: 2026-08-20

### [How Freebuff Handles Environment Variable Validation Across Test Packages](/CodebuffAI/freebuff/how-freebuff-handle-environment-variable-validation-test-packages)

Discover how Freebuff ensures consistent environment variable validation across test packages using a centralized Zod schema for type-safe access throughout your codebase.

- Tags: how-to-guide
- Published: 2026-08-20

### [How to Debug Flaky Tests Using the flake‑hunt Harness in Freebuff](/CodebuffAI/freebuff/how-to-debug-flaky-tests-flake-hunt-harness)

Debug flaky tests with flake-hunt harness. Isolate and reproduce issues using automatic retries, log capture, and timing instrumentation. Get reliable tests faster.

- Tags: how-to-guide
- Published: 2026-08-20

### [How to Integrate a New LLM Provider into Freebuff: A Step-by-Step Guide](/CodebuffAI/freebuff/how-to-integrate-new-llm-provider-freebuff)

Learn to integrate a new LLM provider into Freebuff easily. Follow our step-by-step guide extending OpenAICompatibleProvider, registering your provider, and configuring SDK options for seamless integration.

- Tags: how-to-guide
- Published: 2026-08-20

### [How the Context Pruner Decides What to Keep or Discard in CodebuffAI](/CodebuffAI/freebuff/how-context-pruner-decide-keep-discard)

Learn how CodebuffAI's context pruner decides what to keep or discard using a deterministic, budget-driven pipeline with separate token caps for user and assistant messages, ensuring the latest entry is always retained.

- Tags: internals
- Published: 2026-08-20

### [How to Build a Programmatic Agent Using `handleSteps` Generators in FreeBuff](/CodebuffAI/freebuff/how-to-build-programmatic-agent-handlesteps-generators)

Learn to build programmatic agents with FreeBuff handleSteps generators. Execute step-by-step workflows efficiently using this powerful feature.

- Tags: how-to-guide
- Published: 2026-08-20

### [How the Terminal Command Broker Isolates Process Execution in Freebuff: A Deep Dive](/CodebuffAI/freebuff/how-terminal-command-broker-isolate-process-execution)

Discover how the terminal command broker in Freebuff isolates process execution using sandboxed processes, detached spawning, PID tracking, and IPC for secure CLI operations.

- Tags: deep-dive
- Published: 2026-08-20

### [How Freebuff's Multi-Agent Orchestration Architecture Works](/CodebuffAI/freebuff/how-freebuff-multi-agent-orchestration-architecture-work)

Discover how Freebuff's multi-agent orchestration architecture works. Buffy the orchestrator agent delegates tasks efficiently to specialized coding sub-agents for seamless file operations.

- Tags: architecture
- Published: 2026-08-20

