What Programming Languages Does Freebuff Support?
Freebuff natively supports JavaScript and TypeScript while extending capabilities to Python, Go, Rust, C/C++, and web formats through its centralized language registry in packages/code-map/src/languages.ts.
Freebuff is an open-source AI coding agent developed by CodebuffAI as a TypeScript monorepo running on the Bun runtime. Understanding what programming languages freebuff supports helps developers determine how the tool parses and manipulates code across different projects. The system’s language capabilities are defined in the code-map package, which maintains a strict mapping between file extensions and their corresponding parsers.
Core TypeScript and JavaScript Support
As a TypeScript codebase executing on Bun, freebuff provides first-class support for JavaScript and TypeScript files. The repository’s own CLI logic in freebuff/cli/build.ts and freebuff/cli/release.ts demonstrates this native capability through internal .ts compilation and distribution workflows.
The tool recognizes standard JavaScript and TypeScript extensions:
- JavaScript:
.js,.cjs,.mjs - TypeScript:
.ts,.tsx
These formats receive full syntax-aware editing capabilities, including context-aware refactoring and agent-driven transformations powered by the abstract syntax tree (AST) parsing logic found in packages/code-map/src/parse.ts.
Extended Language Registry
Beyond its native TypeScript foundation, freebuff maintains an extensible language registry in packages/code-map/src/languages.ts. This module exports a LANGUAGES constant that maps file extensions to lightweight parser configurations, enabling syntax-aware operations for additional programming languages.
The current registry includes support for:
- Python —
.pyfiles with comment syntax recognition - Go —
.gosource files - Rust —
.rsfiles - C/C++ —
.c,.cpp,.h,.hppheaders and implementations - Web formats —
.html,.htm,.css,.scss,.json - Configuration/Docs —
.md,.yml,.yaml
When the CLI entry point in freebuff/cli/build.ts processes a file, it cross-references the extension against this registry to determine whether to apply specialized parsing logic or fall back to plain-text handling.
Universal Plain-Text Compatibility
Freebuff can open and edit any UTF-8 encoded text file regardless of language. However, the depth of AI assistance varies based on registry membership:
- Registered languages: Receive syntax highlighting, comment-aware edits, and context-specific prompting via
packages/code-map/src/parse.ts - Unregistered languages: Treated as generic text streams suitable for basic search-and-replace operations without structural understanding
This architecture allows freebuff to operate on niche or proprietary file formats while maintaining rich functionality for mainstream languages.
Adding Custom Language Support
Developers can extend freebuff to support additional languages by modifying the registry in packages/code-map/src/languages.ts. The configuration requires specifying the file extension, parser type, and comment syntax.
For example, to add Dart support:
// packages/code-map/src/languages.ts
export const LANGUAGES = {
// existing entries...
'.dart': { parser: 'simple', comment: '//' },
};
After reloading the CLI via bun run freebuff, the tool will recognize .dart files and apply the specified comment syntax during agent-driven edits. The packages/code-map/src/parse.ts module dispatches these configurations to the appropriate handling logic.
Summary
- Native support: JavaScript and TypeScript (
.js,.ts,.tsx,.mjs,.cjs) via the Bun runtime - Extended support: Python, Go, Rust, C/C++, HTML, CSS, SCSS, JSON, Markdown, and YAML defined in
packages/code-map/src/languages.ts - Universal access: Any UTF-8 text file can be opened, but syntax-aware features require registry inclusion
- Extensibility: Add new languages by updating the
LANGUAGESmap with parser and comment metadata
Frequently Asked Questions
Does freebuff support Python projects?
Yes. Freebuff includes Python (.py) in its language registry located in packages/code-map/src/languages.ts. While the tool is written in TypeScript, it can parse Python files using the lightweight parser defined in packages/code-map/src/parse.ts, enabling comment-aware edits and basic structural operations on Python source code.
Can I use freebuff with Rust or Go codebases?
Yes. Both Rust (.rs) and Go (.go) are explicitly listed in the LANGUAGES registry. The CLI entry point in freebuff/cli/build.ts recognizes these extensions and applies the appropriate parsing logic when processing files, allowing the AI agent to perform context-aware modifications within these languages.
How do I add support for a language not in the registry?
Edit packages/code-map/src/languages.ts to add a new entry to the LANGUAGES object. Specify the file extension (e.g., .java), the parser type (typically 'simple'), and the comment syntax (e.g., // or #). The packages/code-map/src/parse.ts module will automatically incorporate the new language into its dispatch logic upon reloading the CLI.
Does freebuff support Java, C#, or Kotlin?
Not by default. While freebuff can open and edit .java, .cs, or .kt files as plain text, these languages are not currently included in the packages/code-map/src/languages.ts registry. To enable syntax-aware features for JVM or .NET languages, you must manually add their extensions and comment syntax to the language map.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →