Thanks for your interest in BitFun! BitFun is a multi-platform AI programming environment powered by Rust and TypeScript, with shared core logic across Desktop/CLI/Server. This guide explains how to contribute effectively.
Be respectful, kind, and constructive. We welcome contributors of all backgrounds and experience levels.
- Node.js (LTS recommended)
- pnpm
- Rust toolchain (install via rustup)
- Tauri prerequisites for desktop development
The desktop app includes SSH remote support, which pulls in OpenSSL. On Windows the workspace does not use vendored OpenSSL; link against pre-built binaries (no Perl/NASM/OpenSSL source build).
- Default:
pnpm run desktop:devcallsensure-openssl-windows.mjson Windows.pnpm run desktop:preview:debugdoes the same whenever it needs to fast-rebuildbitfun-desktopbefore preview. Everydesktop:build*script runs viascripts/desktop-tauri-build.mjs, which does the same before invoking Cargo. - Manual / CI: Download the FireDaemon OpenSSL 3.5.5 LTS ZIP, extract, set
OPENSSL_DIRto thex64folder,OPENSSL_STATIC=1, or runscripts/ci/setup-openssl-windows.ps1. - Opt out of auto-download:
BITFUN_SKIP_OPENSSL_BOOTSTRAP=1and configureOPENSSL_DIRyourself. desktop:dev:rawskips the dev script (no OpenSSL bootstrap); setOPENSSL_DIRyourself, runscripts/ci/setup-openssl-windows.ps1, ornode scripts/ensure-openssl-windows.mjs(warms.bitfun/cache/and prints PowerShellOPENSSL_*lines to paste).
pnpm install# Desktop (recommended for daily development)
pnpm run desktop:dev # full hot-reload: Vite HMR + Rust auto-rebuild & restart
# Desktop (lightweight preview, no Rust auto-rebuild)
pnpm run desktop:preview:debug # reuse pre-built binary + Vite HMR; Rust changes require manual restart
# Desktop (production build)
pnpm run desktop:build
# E2E
pnpm run e2e:test
desktop:devvsdesktop:preview:debug:desktop:devrunstauri dev, which provides full hot-reload — frontend changes apply instantly via Vite HMR, and Rust/backend changes trigger an incremental rebuild followed by an automatic app restart. This is the recommended workflow for active development.desktop:preview:debuglaunches a pre-built debug binary alongside a Vite dev server; frontend edits still get HMR, but Rust-side changes are not auto-rebuilt — you must stop and re-run the command (or use--force-rebuild). Usedesktop:preview:debugwhen you only need to iterate on frontend code or want a faster cold-start without waiting fortauri devinitialization.
For the full script list, see
package.json. For agent-specific commands, verification, and architecture rules, seeAGENTS.md.
When working on desktop UI/UX, the devtools Cargo feature provides additional debugging capabilities. It is automatically enabled in dev builds and release-fast profile builds, but never in release builds for end users.
| Shortcut | Action |
|---|---|
Cmd/Ctrl + Shift + I |
Toggle element inspector — hover to highlight elements, click to capture metadata |
Cmd/Ctrl + Shift + J |
Open native webview DevTools window |
The element inspector injects a lightweight script into the main webview. When you click an element, it captures:
- Tag, id, class, CSS selector path
- Computed styles and CSS variables
- Box model (margin, padding, border)
- Color values (text, background, border)
- Element attributes
Captured data is logged as structured JSON under the bitfun::devtools target.
- English only, avoid verbose logs
- Frontend:
createLogger('ModuleName') - Backend:
log::{info, debug, warn, error}macros
Do not use platform-specific dependencies in core:
- ❌
tauri::AppHandle - ✅
bitfun_events::EventEmitter
- Command names use
snake_case - Keep Rust and TypeScript naming aligned
- Always use structured request format:
#[tauri::command]
pub async fn your_command(
state: State<'_, AppState>,
request: YourRequest,
) -> Result<YourResponse, String>await api.invoke("your_command", { request: { /* ... */ } });- Contribute good ideas/creativity (features, interactions, visuals, etc.) by opening issues
Product managers and UI designers are welcome to submit ideas quickly via PI. We will help refine them for development.
- Improve the Agent system and overall quality
- Improve system stability and strengthen foundational capabilities
- Expand the ecosystem (Skills, MCP, LSP plugins, or better support for domain-specific development scenarios)
We welcome contributions beyond standard feature or bug-fix PRs. Examples include:
| Contribution area | Location / files | Example |
|---|---|---|
| Prompts | src/crates/core/src/agentic/agents/prompts/ |
Add or refine prompts, and update related logic as needed |
| Tools | src/crates/core/src/agentic/tools/implementations/, src/crates/core/src/agentic/tools/registry.rs |
Add tool implementations and register them in the tool registry |
| Subagents | src/crates/core/src/agentic/agents/custom_subagents/, src/crates/core/src/agentic/agents/registry.rs |
Add subagent implementations and register them in the subagent registry |
| Mode contributions | src/crates/core/src/agentic/agents/*_mode.rs, src/crates/core/src/agentic/agents/prompts/*_mode.md, src/web-ui/src/locales/*/settings/modes.json |
Add/improve agent modes (e.g. Plan/Debug/Agentic or custom modes) and keep prompts + UI copy in sync |
| Scenario guides for Code Agent and AIIde | website/src/docs/ |
Add workflows, playbooks, and real-world scenario docs (or link them from README.md) |
- Open an issue to describe the problem or proposal, especially for larger changes, to avoid duplication and design conflicts
- For new features or UI changes, discuss the design direction early to ensure it fits the product experience
We recommend using Conventional Commits for clearer history and better automation:
feat:new featurefix:bug fixdocs:documentationchore:maintenance/depsrefactor:refactor without behavior changetest:tests
UI changes should include before/after screenshots or a short recording for fast review.
If your work is AI-assisted, please note it in the PR and indicate testing level (untested/lightly tested/fully tested) to help reviewers assess risk.
The main branch is the default collaboration branch and accepts feature PRs. Since this repo encourages product managers and developers to use AI-generated code for rapid validation or idea submission, please open all PRs targeting the main branch.
Keep PRs small and focused. Avoid bundling unrelated changes.
Run relevant tests for your change:
# Rust
cargo test --workspace
# E2E
pnpm run e2e:testIf you cannot run tests, explain why in the PR and provide manual verification steps.
- Do not commit secrets, tokens, certificates, or any sensitive data
- When adding dependencies, ensure license compatibility and explain the purpose
Every contribution matters. Issues, PRs, and suggestions are all welcome!