bit README

The project's README from github.com/teambit/bit. As one markdown file: README.md.

Website | Docs | Community | Bit Cloud

apache prs Circle Status Styled with Prettier Join Discord

Bit is the build system to connect components and apps from development to CI in the AI era. Bit organizes source code into composable components, empowering to build reliable, scalable and consistent applications. It enables AI agents to intelligenly create and reuse components via MCP preventing duplication and accelerating development.

⚡ Features

Bit supports all tooling in the JS ecosystem and comes out of the box with official dev environments for NodeJS, React, Angular, Vue, React Native, NextJS and far more. All are native to TypeScript and ESM and equipped with the best dev tooling.

Bit is a fit to every codebase structure. You can use Bit components in a monorepo, polyrepo, or even without repositories at all.

Getting started

Install Bit

Use the Bit installer to install Bit to be available on your PATH.

npx @teambit/bvm install

Initialize Bit on a new folder or in an existing project by running the following command:

bit init --default-scope my-org.my-project

Make sure to create your scope on the Bit platform and use the right org and project name. After running the command, Bit is initialized on the chosen directory, and ready to be used via Bit commands, AI agent, your editor or the Bit UI!

Create shell application

Create the application shell to run, compose and deploy your application:

bit create react-app corporate-website

Run the platform:

bit run corporate-website

Head to http://localhost:3000 to view your application shell. You can start composing the application layout and specific pages to build your application. Learn more on building shell applications.

Compose components

Create the components to compose into the feature. Run the following command to create a new React UI component for the application login route:

bit create react pages/login

Find simple guides for creating NodeJS modules, UI components and apps, backend services and more on the Create Component docs.

Compose the component into the application shell:

import { Login } from '@my-org/users.pages.login';
import { Routes, Route } from 'react-router-dom';

export function CorporateWebsite() {
  return (
    <AcmeTheme>
      <NavigationProvider>
        <Routes>
          <Route path="/" element={<div>Hello world</div>} />
          <Route path="/login" element={<Login />} />
        </Routes>
      </NavigationProvider>
    </AcmeTheme>
  );
}

Head to http://localhost:3000/login to view your new login page. You can use bit templates to list official templates or find guides for creating React hooks, backend services, NodeJS modules, UI components and more on our create components docs. Optionally, use bit start to run the Bit UI to preview components in isolation.

Release and deploy

You can either use hosted scopes on Bit Cloud or by hosting scopes on your own. Use the following command to create your Bit Cloud account and your first scope.

bit login

Use semantic versioning to version your components:

bit tag --message "my first release" --major

By default, Bit uses Ripple CI to build components. You can use the --build flag to build the components on the local machine. To tag and export from your CI of choice to automate the release process or use our official CI scripts.

After versioning, you can proceed to release your components:

bit export

Modernize existing projects

Head over to your bit.cloud account to see your components build progress. Once the build process is completed, the components will be available for use using standard package managers:

npm install @my-org/users.pages.login

Next steps

Contributors

Bit is entirely built with Bit and you can find all its components on Bit Cloud.

Your contribution, no matter how big or small, is much appreciated. Before contributing, please read the code of conduct.

See Contributing.

License

Apache License, Version 2.0

bit (teambit/bit)

Searching Database…

18.5K ·GitHub
这是什么东西?Bit 是一个面向 AI 时代的开源构建系统:它把源代码组织成可组合、可复用的组件和应用。开发者和 AI 代理可以通过 MCP 创建和复用这些组件,避免代码重复。
Bit 是我要基于它写代码的框架,还是包裹我现有代码库的工具?是一个工具,不是 UI 框架:它是一个构建系统,围绕你现有的代码提供工作区。你的组件仍然是 React、Vue、Angular 或 Node.js —— Bit 只是在上面加上了版本管理、组合和 CI。
我该怎么安装它并跑起第一个应用?先运行 npx @teambit/bvm install,然后执行 bit init --default-scope my-org.my-project(需要先在 bit.cloud 上创建这个 scope)。接着运行 bit create react-app my-app 和 bit run my-app,它就会在 localhost:3000 上启动你的应用外壳。
在那之前我需要装好哪些东西?需要 Node.js 22.13.0 或更高版本(依据仓库中的 engines 字段)。Bit 支持 JS 生态中的所有工具,并且原生支持 TypeScript 和 ESM。
我必须把所有代码都搬进一个 monorepo 才能用它吗?不用。Bit 适配任何代码库结构 —— 组件可以放在 monorepo、多个独立仓库里,甚至完全不用仓库。共享组件托管在 Bit Cloud 平台的 scope 中。
它能在 Windows、macOS 和 Linux 上运行吗?可以。它通过基于 Node 的安装器以 CLI 形式安装到你的 PATH 中,在 Windows、macOS 和 Linux 上都能使用;你可以在终端、编辑器、Bit UI 或 AI 代理中操作它。
Bit 实际上能构建哪些东西?官方为 Node.js、React、Angular、Vue、React Native 和 Next.js 等提供了开箱即用的开发环境 —— 你可以创建 UI 组件、后端服务、Node 模块以及完整的应用外壳,全都自带开发工具。
AI 这部分在实际使用中是做什么的?Bit 提供了一个 MCP 服务器,让 AI 代理可以智能地创建和复用现有组件,而不是重复造代码。团队还可以定义蓝图模板,让开发者和 AI 都基于同一套标准化的构件来开发。
什么是 shell 应用?为什么我会需要它?shell 应用是由可复用组件和功能组合而成的应用外壳:用 bit create react-app 创建一个,把页面和布局组合进去,就能获得简单、安全的原子化部署,可以部署到测试环境和生产环境。
Creator
teambit
Size
247.5 MB
Stars
18.5K
Age
9y
Commits · 90 Days