@urbackend/cli

中文文档
0.2.3发布于 2026/11/03MITES Module

Official CLI for urBackend — manage projects, schemas, and more from your terminal

原始使用文档
文档目录6 节
  1. Quick Start (Onboarding)
  2. 1. Install & Login
  3. 2. Initialize Workspace
  4. 3. Pull Schemas & Generate Types
  5. Documentation
  6. License

@urbackend/cli

The official CLI for urBackend. Sync your schemas, generate TypeScript types, and manage your projects from the terminal.

Quick Start (Onboarding)

Get started with the CLI in just three steps:

1. Install & Login

Install the CLI globally (exposed as ub) and authenticate with your Personal Access Token (PAT).

npm install -g @urbackend/cli
ub login

2. Initialize Workspace

Link your local directory to a remote urBackend project.

ub init

3. Pull Schemas & Generate Types

Fetch your remote collection schemas and automatically generate strict TypeScript definitions (urbackend.d.ts).

ub pull
ub generate

Documentation

For a comprehensive list of every command (project, collection, doctor, etc.) and detailed explanations of how the CLI works under the hood, please read the full documentation:

👉 urBackend CLI Reference Documentation

License

MIT

版本与发布记录

@urbackend/cli 共发布 6 个版本,首次发布于 2026/06/29;过去 12 个月发布了 6 个版本。

版本发布日期距今
0.2.3latest2026/11/03今天
0.2.22026/11/03今天
0.2.12026/11/03今天
0.2.02026/07/014 个月前
0.1.12026/06/294 个月前
0.1.02026/06/294 个月前

关于 @urbackend/cli 的常见问题

@urbackend/cli 是什么?

urBackend的官方CLI -从您的终端管理项目,模式等

如何安装 @urbackend/cli?

在项目目录运行 npm install @urbackend/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 ub,可以用 npx ub 直接运行。

@urbackend/cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/urbackend__cli 是否存在。

@urbackend/cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@urbackend/cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@urbackend/cli 可以商用吗?

@urbackend/cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@urbackend/cli 还在维护吗?

最新版本 0.2.3 发布于 2026/11/03(今天);至今共发布 6 个版本,其中过去 12 个月发布了 6 个;首次发布于 2026/06/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。