# tt-minigame-ide-cli

> Command line interface for micro app development

Latest version **2.1.2** (published 2026-10-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install tt-minigame-ide-cli
pnpm add tt-minigame-ide-cli
yarn add tt-minigame-ide-cli
bun add tt-minigame-ide-cli
```

Provides the command `tmg`.

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2026-10-26 |
| First published | 2022-04-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 17 |
| Unpacked size | 1.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bramblex, windtraveler, bingming, xiongchengyao, dededd |

## Links

- npm: https://www.npmjs.com/package/tt-minigame-ide-cli
- npm.io page: https://npm.io/package/tt-minigame-ide-cli

## Dependencies (17)

- [ora](https://npm.io/package/ora.md) ^5.4.1
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [qrcode](https://npm.io/package/qrcode.md) ^1.4.4
- [archiver](https://npm.io/package/archiver.md) ^5.3.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.0
- [inquirer](https://npm.io/package/inquirer.md) ^8.2.0
- [unzipper](https://npm.io/package/unzipper.md) ^0.10.11
- [commander](https://npm.io/package/commander.md) 5.1.0
- [fast-glob](https://npm.io/package/fast-glob.md) ^3.2.11
- [form-data](https://npm.io/package/form-data.md) ^4.0.0
- [clipboardy](https://npm.io/package/clipboardy.md) ^2.2.0
- [deep-clone](https://npm.io/package/deep-clone.md) ^3.0.3
- [easy-table](https://npm.io/package/easy-table.md) ^1.2.0
- [folder-hash](https://npm.io/package/folder-hash.md) ^4.0.1
- [semver-compare](https://npm.io/package/semver-compare.md) ^1.0.0
- [qrcode-terminal](https://npm.io/package/qrcode-terminal.md) ^0.12.0
- [@tt-miniprogram/ext-pack](https://npm.io/package/@tt-miniprogram/ext-pack.md) 1.0.33

## Recent versions

- 2.1.2 (latest) — 2026-10-26
- 2.0.8-beta.0 (beta) — 2024-01-17
- 2.1.1 — 2025-12-03
- 2.1.0 — 2025-11-05
- 2.0.17 — 2025-08-11
- 2.0.16 — 2025-08-06
- 2.0.15 — 2025-07-08
- 2.0.14 — 2025-02-06
- 2.0.13 — 2025-01-07
- 2.0.12 — 2024-09-11
- 2.0.11 — 2024-07-29
- 2.0.10 — 2024-07-17
- 2.0.9 — 2024-07-11
- 2.0.8 — 2024-04-01
- 2.0.7 — 2023-12-06
- … 22 more at https://npm.io/package/tt-minigame-ide-cli/versions

## README

# `tt-minigame-ide-cli`

## 介绍

开发者工具提供了命令行供外部调用，开发者可以通过命令行工具进行登录、预览、上传等操作。

小游戏命令行工具已升级至 2.0.0 版本，在命令行使用方式上同 1.x.x 版本一致。默认情况下自 2.0.0 版本起，会采集部分行为数据以帮助我们了解如何更好地改进产品，您也可以通过 set-config 命令来禁止该行为。

命令行工具安装方式：

```js
npm install -g tt-minigame-ide-cli
```

---

## 使用

### 设置全局配置

主要用于配置工具的全局代理

#### 命令行使用

```bash
Usage: tmg set-config [options]

Set tt-ide-cli config

Options:
-p, --proxy <proxy>           Set global proxy（配置全局代理）
--default                     Use default（恢复为默认配置）
-r, --allow-report-event      允许采集使用行为（yes|no），默认为 yes
```

### 登录

登录到开发者平台。支持代理设置。

```js
Usage: tmg login [options]

Login to the developer platform

Options:

  -m, --mobile         Login by mobile

  -e, --email          Login by email

  -p, --proxy <proxy>  Login with proxy

  -h, --help           output usage information
```

### 通过 email 登录

```js
Usage: tmg login-e [email] [password]

Login to the developer platform by E-mail

Options:

  -p, --proxy <proxy>  Login with proxy

  -h, --help           Output usage information
```

### 登出（清除本地 session）

#### 命令行使用

```bash
Usage: tmg logout

Logout and clear the session.
```

### 预览小游戏

将项目上传后，扫码二维码来预览小游戏。

```js
Usage: tmg preview [options] [entry]

preview project by remote

Options:

  -f, --force          Preview project without local cache(deprecated)

  --disable-cache      Preview project without local cache

  -s, --small          Use small QR Code, but it does not take effect in some environments

  -u, --copy           Copy remote url to clipboard

  -p, --proxy <proxy>  Preview with proxy

  -h, --help           output usage information

  -o, --output <path>  QRCode image output path
```

### 上传项目

把项目上传到开发者平台进行发布。

```js
Usage: tmg upload [options] [entry]

upload project to the developer platform

Options:

  -v, --app-version <version>  App version (eg: [major].[minor].[patch])

  -c, --app-changelog <log>    Changelog for this version

  -p, --proxy <proxy>          Update request proxy

  -u, --copy                  Copy remote url to clipboard

  -h, --help                   output usage information

  -o, --output <path>          QRCode image output path
```

### 获取项目版本

获取项目线上版本号。

```js
Usage: tmg version [entry]

Get latest released version of project
```

### 构建 NPM

对应开发者工具 <a href="https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/framework/npm/" target="_blank">构建 NPM</a> 功能

#### 命令行使用

```bash
Usage: tmg build-npm [entry]

Build npm
```

---
_Source: https://npm.io/package/tt-minigame-ide-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
