Files
nocobase/docs/docs/vi/api/cli/self/update.md
T
chenos 48bbc1f8b8 fix(cli): support pnpm and yarn global self update (#9912)
* fix(cli): support pnpm and yarn global self update

* fix(cli): detect pnpm global installs in self check

* fix(cli): detect hashed pnpm global installs

* test(cli): cover custom pnpm global roots
2026-06-26 10:11:00 +08:00

1.8 KiB

title, description, keywords
title description keywords
nb self update Tham khảo lệnh nb self update: cập nhật NocoBase CLI được cài global qua npm, pnpm hoặc yarn. nb self update,NocoBase CLI,cập nhật,tự cập nhật

nb self update

Khi CLI hiện tại được quản lý bởi cài đặt global tiêu chuẩn của npm, pnpm hoặc yarn, lệnh này cập nhật NocoBase CLI đã cài.

Cách dùng

nb self update [flags]

Tham số

Tham số Kiểu Mô tả
--channel string Channel phát hành để cập nhật, mặc định auto; có thể chọn auto, latest, test, beta, alpha
--yes, -y boolean Bỏ qua xác nhận cập nhật
--json boolean Đầu ra dạng JSON
--skills boolean Đồng thời cập nhật các NocoBase AI coding skills được cài đặt toàn cục
--verbose boolean Hiển thị thông tin cập nhật chi tiết

Hành vi cập nhật

nb self update trước tiên phát hiện phương thức cài đặt hiện tại khi chạy. Lệnh này không dùng cache lịch sử self-install-methods.json.

Khi có bản cập nhật, lệnh sử dụng cùng package manager đang quản lý cài đặt CLI global hiện tại:

Phương thức cài đặt Lệnh cập nhật
npm-global npm install -g @nocobase/cli@<channel>
pnpm-global pnpm add -g @nocobase/cli@<channel>
yarn-global yarn global add @nocobase/cli@<channel>

Xác nhận tương tác mặc định là yes. Dùng --yes để bỏ qua prompt trong script.

Ví dụ

nb self update
nb self update --yes
nb self update --skills
nb self update --channel alpha --json

Lệnh liên quan