PHPackages                             kain/think-bit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. kain/think-bit

AbandonedArchivedLibrary[API Development](/categories/api)

kain/think-bit
==============

辅助 ThinkPHP 快速集成 CURD API 的手脚架

6.0.17(4y ago)117032MITPHPPHP &gt;=7.4.0

Since Feb 21Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/kainonly/think-bit)[ Packagist](https://packagist.org/packages/kain/think-bit)[ RSS](/packages/kain-think-bit/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (2)Versions (41)Used By (0)

Think Bit
=========

[](#think-bit)

辅助 ThinkPHP 快速集成 CURD API 的工具集

[![Packagist Version](https://camo.githubusercontent.com/8782951e5add8263821c6f514ce70cff3b8e96d0b453905eba8742c50f7bc7b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b61696e2f7468696e6b2d6269742e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/8782951e5add8263821c6f514ce70cff3b8e96d0b453905eba8742c50f7bc7b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b61696e2f7468696e6b2d6269742e7376673f7374796c653d666c61742d737175617265)[![Packagist](https://camo.githubusercontent.com/51ef4a8da2f958d28e9109151703a9a801627aa904e2da45d4a877c7adf23118/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b61696e2f7468696e6b2d6269742e7376673f636f6c6f723d626c7565267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/51ef4a8da2f958d28e9109151703a9a801627aa904e2da45d4a877c7adf23118/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b61696e2f7468696e6b2d6269742e7376673f636f6c6f723d626c7565267374796c653d666c61742d737175617265)[![PHP from Packagist](https://camo.githubusercontent.com/cf4d89572df80266a4fea0e236948c8540458476441eaeaab179dc75db314bdd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6b61696e2f7468696e6b2d6269742e7376673f636f6c6f723d626c7565267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/cf4d89572df80266a4fea0e236948c8540458476441eaeaab179dc75db314bdd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6b61696e2f7468696e6b2d6269742e7376673f636f6c6f723d626c7565267374796c653d666c61742d737175617265)[![Packagist](https://camo.githubusercontent.com/05d11192c42f21599a3e7dba8b898b74c34936df9471f1ea0ec309fe843d4c45/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b61696e2f7468696e6b2d6269742e7376673f636f6c6f723d626c7565267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/05d11192c42f21599a3e7dba8b898b74c34936df9471f1ea0ec309fe843d4c45/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b61696e2f7468696e6b2d6269742e7376673f636f6c6f723d626c7565267374796c653d666c61742d737175617265)

#### 安装

[](#安装)

```
composer require kain/think-bit
```

#### 扩展配置

[](#扩展配置)

首先需要将 `config/app.php` 配置文件更新与新增相关定义

```
return [

    // 应用名称
    'app_name' => Env::get('app.name', null),
    // 应用标识
    'app_id' => Env::get('app.id', null),
    // 应用密钥
    'app_secret' => Env::get('app.secret', null),
    // 应用地址
    'app_host' => Env::get('app.host', 'http://localhost:8000'),
    // 管理后台域名
    'app_backstage' => Env::get('app.backstage', 'http://localhost:4200'),
];
```

#### 相关扩展

[](#相关扩展)

从 `kain/think-bit` 版本 `>= 6.0.6` 组件开始独立组件，并逐步遵循 `PSR` 规范与 `PHP` 严格模式

- [kain/think-extra](https://packagist.org/packages/kain/think-extra) ThinkPHP 工具扩展库
- [kain/think-support](https://packagist.org/packages/kain/think-support) ThinkPHP 依赖与功能支持库
- [kain/think-redis](https://packagist.org/packages/kain/think-redis) ThinkPHP Redis 扩展
- [kain/think-amqp](https://packagist.org/packages/kain/think-amqp) ThinkPHP RabbitMQ 消息队列 AMQP 操作类
- [kain/think-elastic](https://packagist.org/packages/kain/think-elastic) ThinkPHP ElasticSearch 扩展
- [kain/think-aliyun-extra](https://packagist.org/packages/kain/think-aliyun-extra) ThinkPHP 阿里云相关扩展

#### 依赖安装

[](#依赖安装)

在容器项目中可以使用 `docker-compose` 编排

```
version: '3.7'
services:
  dev:
    image: composer
    command: 'composer update --prefer-dist -o --ignore-platform-reqs'
    volumes:
      - /composer:/tmp
      - ./:/app
  update:
    image: composer
    command: 'composer update --prefer-dist -o --no-dev --ignore-platform-reqs'
    volumes:
      - /composer:/tmp
      - ./:/app
```

然后执行 `composer` 更新

```
docker-compose run --rm --no-deps update
```

#### 推荐库

[](#推荐库)

- [topthink/think-helper](https://www.kancloud.cn/manual/thinkphp6_0/1149630) Think 助手工具库
- [composer require guzzlehttp/guzzle](http://docs.guzzlephp.org/en/stable/) GuzzleHttp 请求库
- [nesbot/carbon](https://carbon.nesbot.com/docs/) Carbon 时间处理库
- [overtrue/wechat](https://www.easywechat.com/docs) EasyWechat 微信第三方库
- [overtrue/easy-sms](https://github.com/overtrue/easy-sms) EasySMS 短信库
- [overtrue/pinyin](https://github.com/overtrue/pinyin) Pinyin 拼音库
- [casbin/casbin](https://github.com/php-casbin/php-casbin/blob/master/README_CN.md) PHP-Casbin 授权库
- [swiftmailer/swiftmailer](https://swiftmailer.symfony.com/docs/introduction.html) swiftmailer 邮件库

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance46

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~66 days

Total

39

Last Release

1771d ago

Major Versions

1.8.2 → 5.1.12019-03-05

1.8.3 → 5.1.72019-04-18

1.8.4 → 5.1.132019-05-20

5.1.14 → 6.0.02019-08-12

5.1.15 → 6.0.62019-11-01

PHP version history (2 changes)5.1.13PHP &gt;=7.2.0

6.0.11PHP &gt;=7.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9986159?v=4)[Kain](/maintainers/kainonly)[@kainonly](https://github.com/kainonly)

---

Top Contributors

[![kainonly](https://avatars.githubusercontent.com/u/9986159?v=4)](https://github.com/kainonly "kainonly (285 commits)")

---

Tags

php

### Embed Badge

![Health badge](/badges/kain-think-bit/health.svg)

```
[![Health](https://phpackages.com/badges/kain-think-bit/health.svg)](https://phpackages.com/packages/kain-think-bit)
```

###  Alternatives

[naixiaoxin/think-wechat

EasyWechat For Thnkphp5.1+

27316.1k1](/packages/naixiaoxin-think-wechat)[weiwei/api-doc

The ThinkPHP6 Api Doc Package

10710.2k](/packages/weiwei-api-doc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
