Skip to content

Commit f5148b8

Browse files
committed
docs(cli): document local tarball install flow
Describe the repository-local pack and global install flow for the standalone CLI so beta.2 users have an accurate upgrade path before npm publishing is finalized.
1 parent 38e9f20 commit f5148b8

3 files changed

Lines changed: 36 additions & 9 deletions

File tree

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,17 @@ PromptHub 同时提供 GUI 和 CLI。CLI 适合脚本化管理、批量导入导
313313
> ⚠️ **当前状态**
314314
>
315315
> - 桌面版不会自动安装 `prompthub` 命令
316-
> - 当前仓库内已提供 standalone CLI 源码入口和构建后的 bundle
317-
> - 独立包发布渠道尚未完成前,请使用下面的源码或 bundle 方式
316+
> - 当前仓库内已提供 standalone CLI 源码入口、构建后的 bundle,以及本地 pack 安装方式
317+
> - 如需全局命令,请先在仓库里打包再本地安装 CLI tarball
318+
319+
### 从仓库本地打包并全局安装
320+
321+
```bash
322+
pnpm pack:cli
323+
pnpm add -g ./apps/cli/prompthub-cli-0.5.6-beta.2.tgz
324+
prompthub --help
325+
prompthub prompt list
326+
```
318327

319328
### 从源码运行 CLI
320329

@@ -350,7 +359,7 @@ node apps/cli/out/prompthub.cjs skill list
350359

351360
- CLI 直接读写 PromptHub 的本地数据库和受管 Skill 仓库
352361
- 桌面版当前只在设置页展示 CLI 说明,不会自动安装 shell 命令
353-
- `apps/cli` 目前仍以仓库内源码运行和构建后 bundle 方式使用为准
362+
- `apps/cli` 现在也支持通过 `pnpm pack:cli` 生成本地 tarball 后全局安装
354363

355364
<div id="self-hosted-web"></div>
356365

docs/README.en.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,17 @@ PromptHub includes both a GUI and a CLI. The CLI is useful for scripts, batch op
262262
> ⚠️ **Current status**
263263
>
264264
> - The desktop app does not install the `prompthub` command automatically
265-
> - This repository currently provides a standalone CLI source entry and a built bundle
266-
> - Until standalone package publishing is finished, use one of the methods below
265+
> - This repository currently provides a standalone CLI source entry, a built bundle, and a local pack/install flow
266+
> - If you need a global `prompthub` command, pack the CLI tarball from the repository and install it locally
267+
268+
### Pack it locally and install globally
269+
270+
```bash
271+
pnpm pack:cli
272+
pnpm add -g ./apps/cli/prompthub-cli-0.5.6-beta.2.tgz
273+
prompthub --help
274+
prompthub prompt list
275+
```
267276

268277
### Run from source
269278

@@ -299,7 +308,7 @@ node apps/cli/out/prompthub.cjs skill list
299308

300309
- The CLI reads and writes PromptHub's local database and managed skill repository directly
301310
- The desktop app currently only shows CLI guidance in Settings and does not install a shell wrapper
302-
- For now, `apps/cli` should be used via source execution or the built bundle
311+
- `apps/cli` can also be packed from the repository and installed locally as a global tarball
303312

304313
## 🌐 Self-Hosted Web
305314

docs/README.zh-TW.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,17 @@ PromptHub 同時提供 GUI 與 CLI。CLI 適合腳本化管理、批次作業、
262262
> ⚠️ **目前狀態**
263263
>
264264
> - 桌面版不會自動安裝 `prompthub` 命令
265-
> - 目前倉庫內已提供 standalone CLI 的原始碼入口與構建後 bundle
266-
> - 在獨立套件正式發佈前,請使用下方的原始碼或 bundle 方式
265+
> - 目前倉庫內已提供 standalone CLI 的原始碼入口、構建後 bundle,以及本地 pack 安裝流程
266+
> - 如需全域 `prompthub` 命令,請先在倉庫中打包 CLI tarball 再本地安裝
267+
268+
### 從倉庫本地打包並全域安裝
269+
270+
```bash
271+
pnpm pack:cli
272+
pnpm add -g ./apps/cli/prompthub-cli-0.5.6-beta.2.tgz
273+
prompthub --help
274+
prompthub prompt list
275+
```
267276

268277
### 從原始碼執行
269278

@@ -299,7 +308,7 @@ node apps/cli/out/prompthub.cjs skill list
299308

300309
- CLI 會直接讀寫 PromptHub 的本地資料庫與受管 Skill 倉庫
301310
- 桌面版目前只會在設定頁顯示 CLI 說明,不會自動安裝 shell 命令
302-
- `apps/cli` 目前以原始碼執行或構建後 bundle 使用為準
311+
- `apps/cli` 現在也支援先用 `pnpm pack:cli` 產生本地 tarball,再做全域安裝
303312

304313
## 🌐 自部署網頁版
305314

0 commit comments

Comments
 (0)