PHPackages                             li-bao-jia/we-chat-devtools - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. li-bao-jia/we-chat-devtools

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

li-bao-jia/we-chat-devtools
===========================

Instruct WeChat devtools to perform operations such as login, preview, and upload.

2.0.2(1y ago)19MITPHPPHP &gt;=7.0.0

Since Nov 18Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/li-bao-jia/we-chat-devtools)[ Packagist](https://packagist.org/packages/li-bao-jia/we-chat-devtools)[ Docs](https://github.com/li-bao-jia/we-chat-devtools)[ RSS](/packages/li-bao-jia-we-chat-devtools/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (4)Used By (0)

WeChat Devtools

提供微信小程序上传、预览、构建等服务

 [ ![Build Status](https://github.com/laravel/framework/workflows/tests/badge.svg) ](https://github.com/li-bao-jia) [ ![Total Downloads](https://camo.githubusercontent.com/4300986cad0fd383af15d086f207a7a0d0702c0e333120d4034a437bdac5295c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c692d62616f2d6a69612f77652d636861742d646576746f6f6c73) ](https://packagist.org/packages/li-bao-jia) [ ![Latest Stable Version](https://camo.githubusercontent.com/d356889edbceae412d6a44195555192252517e5e68ecd9a923b1a173e1c65d1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c692d62616f2d6a69612f77652d636861742d646576746f6f6c73) ](https://packagist.org/packages/li-bao-jia) [ ![License](https://camo.githubusercontent.com/c6e2e4122369fe1ab574cbc9cada287d2f59c0d03658147fb9b3dce07379e897/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c692d62616f2d6a69612f77652d636861742d646576746f6f6c73) ](https://packagist.org/packages/li-bao-jia)

### 描述 we-chat-devtools

[](#描述-we-chat-devtools)

-

### 微信开发者工具小程序上传封装SDK（PHP）

[](#微信开发者工具小程序上传封装sdkphp)

PHP 开发环境下，开发者可以通 HTTP 请求指示工具进行登录、预览、上传等操作。

需求
--

[](#需求)

- PHP &gt;= 7.0.0

安装
--

[](#安装)

> 通过 Composer 安装 we-chat-devtools

1.项目目录下执行

```
composer require li-bao-jia/we-chat-devtools

```

2.或编辑 composer.json 文件安装

```
"require": {
    "li-bao-jia/we-chat-devtools": "*"
}

```

用法
--

[](#用法)

```
1、使用前，你需要根据具操作系统了解微信开发者工具端口号文件位置：

    macOS : ~/Library/Application Support/微信开发者工具//Default/.ide

    Windows : ~/AppData/Local/微信开发者工具/User Data//Default/.ide

2、如果你已经获取了端口号

    2.1、你可以这样使用

    (new Devtool())->setPort($port)->setMethod('login')->setParameters($parameters)->response()

    或

    (new Devtool(['port' => $port]))->setMethod('login')->setParameters($parameters)->response()

3、如果你想自动获取端口号，可以这样

    3.1、你需要提供你的安装路径 install_path、端口前缀 port_path_prefix、端口后缀 port_path_suffix，如下：

    (new Devtool([
        'install_path' => "/Applications/wechatwebdevtools.app/Contents/MacOS",
        'port_path_prefix' => "/Users/my-name/Library/Application Support/微信开发者工具",
        'port_path_suffix' => "/Default/.ide"
    ]))->setMethod('login')->setParameters($parameters)->response()

    或

    (new Devtool())->setConfig([
        'install_path' => "/Applications/wechatwebdevtools.app/Contents/MacOS",
        'port_path_prefix' => "/Users/my-name/Library/Application Support/微信开发者工具",
        'port_path_suffix' => "/Default/.ide"
    ])->setMethod('login')->setParameters($parameters)->response()

4、……

```

方法
--

[](#方法)

方法参数返回注释setConfigarray $config$this数组的方式改变设置项setUrlstring $url$thishttp url 改变方法setPortstring $port$this设置端口号setMethodstring $method$this设置请求方法setVersionstring $version$this定义版本 默认 v2setParametersarray $parameters$this已数组的方式传递参数response\_mixed开发者工具返回内容微信文档参考:

- [HTTP 调用 · 微信开发者工具 · 小程序](https://developers.weixin.qq.com/miniprogram/dev/devtools/http.html)

支持
--

[](#支持)

```
……

```

许可证
---

[](#许可证)

这个软件包是根据 [MIT许可证](http://opensource.org/licenses/MIT) 授权的开源软件

说明
--

[](#说明)

- [1.0.0](https://github.com/li-bao-jia/we-chat-devtools/releases/tag/1.0.0) 版本完全
- [2.0.2](https://github.com/li-bao-jia/we-chat-devtools/releases/tag/2.0.2)
-
- 坚持做一个快乐的开发者

计划
--

[](#计划)

- √ 升级V2，项目重定义
- ……
-
- x 完成单元测试、自动测试
- ……
-

联系方式
----

[](#联系方式)

- DEVELOPER: BaoJia Li
- QQ: 751818588
- QQ群: 232185834
- EMAIL:

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance57

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.3% 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 ~1283 days

Total

2

Last Release

716d ago

Major Versions

1.0.0 → 2.0.22024-05-24

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

2.0.2PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a2697553b439d91737aad65e7369fe76dbf41902d678e5ff3357bca498bfd38?d=identicon)[L-B-J](/maintainers/L-B-J)

---

Top Contributors

[![L-B-Jia](https://avatars.githubusercontent.com/u/26106978?v=4)](https://github.com/L-B-Jia "L-B-Jia (21 commits)")[![li-bao-jia](https://avatars.githubusercontent.com/u/58720952?v=4)](https://github.com/li-bao-jia "li-bao-jia (15 commits)")

---

Tags

li-bao-jiawe-chat-devtools

### Embed Badge

![Health badge](/badges/li-bao-jia-we-chat-devtools/health.svg)

```
[![Health](https://phpackages.com/badges/li-bao-jia-we-chat-devtools/health.svg)](https://phpackages.com/packages/li-bao-jia-we-chat-devtools)
```

PHPackages © 2026

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