opencode/README.vi.md
Aiden Cline 501b15af26
Some checks are pending
check / typecheck (push) Waiting to run
deploy-files / deploy (push) Waiting to run
deploy-www / deploy (push) Waiting to run
deploy / deploy (push) Waiting to run
nix-eval / nix-eval (push) Waiting to run
publish / version (push) Waiting to run
publish / build-cli (push) Blocked by required conditions
publish / sign-cli-macos (push) Blocked by required conditions
publish / build-node-app-archive (push) Blocked by required conditions
publish / build-node-cli (map[bun_install_flags:--cpu=* host:blacksmith-4vcpu-windows-2025 target:windows-arm64]) (push) Blocked by required conditions
publish / build-node-cli (map[host:blacksmith-4vcpu-ubuntu-2404 target:linux-x64]) (push) Blocked by required conditions
publish / build-node-cli (map[host:blacksmith-4vcpu-ubuntu-2404-arm target:linux-arm64]) (push) Blocked by required conditions
publish / build-node-cli (map[host:blacksmith-4vcpu-windows-2025 target:windows-x64]) (push) Blocked by required conditions
publish / build-node-cli (map[host:macos-26 target:darwin-arm64]) (push) Blocked by required conditions
publish / sign-cli-windows (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--cpu=* host:windows-2025 platform_flag:--win --arm64 target:aarch64-pc-windows-msvc]) (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=arm64 host:macos-26 platform_flag:--mac --arm64 target:aarch64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=x64 host:macos-26-intel platform_flag:--mac --x64 target:x86_64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:x86_64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404-arm platform_flag:--linux --arm64 target:aarch64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-windows-2025 platform_flag:--win target:x86_64-pc-windows-msvc]) (push) Blocked by required conditions
publish / publish (push) Blocked by required conditions
publish / notify-discord-v2 (push) Blocked by required conditions
test / affected packages (push) Waiting to run
test / unit (linux) (push) Waiting to run
test / unit (windows) (push) Waiting to run
test / build (linux) (push) Waiting to run
test / build (windows) (push) Waiting to run
test / e2e (linux, app-1) (push) Blocked by required conditions
test / e2e (linux, app-2) (push) Blocked by required conditions
test / e2e (linux, app-components) (push) Blocked by required conditions
test / e2e (linux, session-ui-components) (push) Blocked by required conditions
test / e2e (windows, app-1) (push) Blocked by required conditions
test / e2e (windows, app-2) (push) Blocked by required conditions
test / e2e (windows, app-components) (push) Blocked by required conditions
test / e2e (windows, session-ui-components) (push) Blocked by required conditions
test / e2e (linux) (push) Blocked by required conditions
test / e2e (windows) (push) Blocked by required conditions
docs: point README install methods at V2 (#56839)
2026-10-18 12:13:28 -05:00

5.7 KiB

OpenCode logo

Trợ lý lập trình AI mã nguồn mở.

Discord npm Build status

English | 简体中文 | 繁體中文 | 한국어 | Deutsch | Español | Français | Italiano | Dansk | 日本語 | Polski | Русский | Bosanski | العربية | Norsk | Português (Brasil) | ไทย | Türkçe | Українська | বাংলা | Ελληνικά | Tiếng Việt

OpenCode Terminal UI


Cài đặt

# YOLO
curl -fsSL https://opencode.ai/v2/install | bash

# Các trình quản lý gói (Package managers)
npm i -g @opencode/cli@latest      # hoặc bun/pnpm/yarn
brew install anomalyco/tap/opencode-v2 # macOS và Linux (khuyên dùng, luôn cập nhật)
brew install opencode              # macOS và Linux (công thức brew chính thức, ít cập nhật hơn)
sudo pacman -S opencode            # Arch Linux (Bản ổn định)
paru -S opencode-beta              # Arch Linux (Bản mới nhất từ AUR)
mise use -g opencode               # Mọi hệ điều hành
nix run github:anomalyco/opencode  # Nix

Tip

Hãy xóa các phiên bản cũ hơn 0.1.x trước khi cài đặt.

Ứng dụng Desktop (BETA)

OpenCode cũng có sẵn dưới dạng ứng dụng desktop. Tải từ opencode.ai/download.

Nền tảng Tải xuống
macOS (Apple Silicon) opencode-desktop-mac-arm64.dmg
macOS (Intel) opencode-desktop-mac-x64.dmg
Windows opencode-desktop-win-x64.exe
Linux .deb, .rpm, hoặc AppImage
# macOS (Homebrew)
brew install --cask opencode-desktop

Thư mục cài đặt

Tập lệnh cài đặt tuân theo thứ tự ưu tiên sau cho đường dẫn cài đặt:

  1. $OPENCODE_INSTALL_DIR - Thư mục cài đặt tùy chỉnh
  2. $XDG_BIN_DIR - Đường dẫn tuân thủ XDG Base Directory Specification
  3. $HOME/bin - Thư mục nhị phân tiêu chuẩn của người dùng (nếu tồn tại hoặc có thể tạo)
  4. $HOME/.opencode/bin - Mặc định dự phòng
# Ví dụ
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash

Agents (Đại diện)

OpenCode bao gồm hai agent được tích hợp sẵn mà bạn có thể chuyển đổi bằng phím Tab.

  • build - Agent mặc định, có toàn quyền truy cập cho công việc lập trình
  • plan - Agent chỉ đọc dùng để phân tích và khám phá mã nguồn
    • Mặc định từ chối việc chỉnh sửa tệp
    • Hỏi quyền trước khi chạy các lệnh bash
    • Lý tưởng để khám phá các codebase lạ hoặc lên kế hoạch thay đổi

Ngoài ra còn có một subagent general dùng cho các tìm kiếm phức tạp và tác vụ nhiều bước. Agent này được sử dụng nội bộ và có thể gọi bằng cách dùng @general trong tin nhắn.

Tìm hiểu thêm về agents.

Tài liệu

Để biết thêm thông tin về cách cấu hình OpenCode, hãy truy cập tài liệu của chúng tôi.

Đóng góp

Nếu bạn muốn đóng góp cho OpenCode, vui lòng đọc tài liệu hướng dẫn đóng góp trước khi gửi pull request.

Xây dựng trên nền tảng OpenCode

Nếu bạn đang làm việc trên một dự án liên quan đến OpenCode và sử dụng "opencode" như một phần của tên dự án, ví dụ "opencode-dashboard" hoặc "opencode-mobile", vui lòng thêm một ghi chú vào README của bạn để làm rõ rằng dự án đó không được xây dựng bởi đội ngũ OpenCode và không liên kết với chúng tôi dưới bất kỳ hình thức nào.


Tham gia cộng đồng của chúng tôi Discord | X.com