mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
refactor(installation): update scoop installation method (#9243)
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
This commit is contained in:
parent
2dcca4755d
commit
f7fef99ddd
@ -26,7 +26,7 @@ curl -fsSL https://opencode.ai/install | bash
|
|||||||
|
|
||||||
# Package managers
|
# Package managers
|
||||||
npm i -g opencode-ai@latest # or bun/pnpm/yarn
|
npm i -g opencode-ai@latest # or bun/pnpm/yarn
|
||||||
scoop bucket add extras; scoop install extras/opencode # Windows
|
scoop install opencode # Windows
|
||||||
choco install opencode # Windows
|
choco install opencode # Windows
|
||||||
brew install anomalyco/tap/opencode # macOS and Linux (recommended, always up to date)
|
brew install anomalyco/tap/opencode # macOS and Linux (recommended, always up to date)
|
||||||
brew install opencode # macOS and Linux (official brew formula, updated less)
|
brew install opencode # macOS and Linux (official brew formula, updated less)
|
||||||
@ -52,6 +52,8 @@ OpenCode is also available as a desktop application. Download directly from the
|
|||||||
```bash
|
```bash
|
||||||
# macOS (Homebrew)
|
# macOS (Homebrew)
|
||||||
brew install --cask opencode-desktop
|
brew install --cask opencode-desktop
|
||||||
|
# Windows (Scoop)
|
||||||
|
scoop bucket add extras; scoop install extras/opencode-desktop
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Installation Directory
|
#### Installation Directory
|
||||||
|
|||||||
@ -26,7 +26,7 @@ curl -fsSL https://opencode.ai/install | bash
|
|||||||
|
|
||||||
# 软件包管理器
|
# 软件包管理器
|
||||||
npm i -g opencode-ai@latest # 也可使用 bun/pnpm/yarn
|
npm i -g opencode-ai@latest # 也可使用 bun/pnpm/yarn
|
||||||
scoop bucket add extras; scoop install extras/opencode # Windows
|
scoop install opencode # Windows
|
||||||
choco install opencode # Windows
|
choco install opencode # Windows
|
||||||
brew install anomalyco/tap/opencode # macOS 和 Linux(推荐,始终保持最新)
|
brew install anomalyco/tap/opencode # macOS 和 Linux(推荐,始终保持最新)
|
||||||
brew install opencode # macOS 和 Linux(官方 brew formula,更新频率较低)
|
brew install opencode # macOS 和 Linux(官方 brew formula,更新频率较低)
|
||||||
@ -52,6 +52,8 @@ OpenCode 也提供桌面版应用。可直接从 [发布页 (releases page)](htt
|
|||||||
```bash
|
```bash
|
||||||
# macOS (Homebrew Cask)
|
# macOS (Homebrew Cask)
|
||||||
brew install --cask opencode-desktop
|
brew install --cask opencode-desktop
|
||||||
|
# Windows (Scoop)
|
||||||
|
scoop bucket add extras; scoop install extras/opencode-desktop
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 安装目录
|
#### 安装目录
|
||||||
|
|||||||
@ -26,7 +26,7 @@ curl -fsSL https://opencode.ai/install | bash
|
|||||||
|
|
||||||
# 套件管理員
|
# 套件管理員
|
||||||
npm i -g opencode-ai@latest # 也可使用 bun/pnpm/yarn
|
npm i -g opencode-ai@latest # 也可使用 bun/pnpm/yarn
|
||||||
scoop bucket add extras; scoop install extras/opencode # Windows
|
scoop install opencode # Windows
|
||||||
choco install opencode # Windows
|
choco install opencode # Windows
|
||||||
brew install anomalyco/tap/opencode # macOS 與 Linux(推薦,始終保持最新)
|
brew install anomalyco/tap/opencode # macOS 與 Linux(推薦,始終保持最新)
|
||||||
brew install opencode # macOS 與 Linux(官方 brew formula,更新頻率較低)
|
brew install opencode # macOS 與 Linux(官方 brew formula,更新頻率較低)
|
||||||
@ -52,6 +52,8 @@ OpenCode 也提供桌面版應用程式。您可以直接從 [發佈頁面 (rele
|
|||||||
```bash
|
```bash
|
||||||
# macOS (Homebrew Cask)
|
# macOS (Homebrew Cask)
|
||||||
brew install --cask opencode-desktop
|
brew install --cask opencode-desktop
|
||||||
|
# Windows (Scoop)
|
||||||
|
scoop bucket add extras; scoop install extras/opencode-desktop
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 安裝目錄
|
#### 安裝目錄
|
||||||
|
|||||||
@ -158,7 +158,7 @@ export namespace Installation {
|
|||||||
cmd = $`echo Y | choco upgrade opencode --version=${target}`
|
cmd = $`echo Y | choco upgrade opencode --version=${target}`
|
||||||
break
|
break
|
||||||
case "scoop":
|
case "scoop":
|
||||||
cmd = $`scoop install extras/opencode@${target}`
|
cmd = $`scoop install opencode@${target}`
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unknown method: ${method}`)
|
throw new Error(`Unknown method: ${method}`)
|
||||||
@ -226,7 +226,7 @@ export namespace Installation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (detectedMethod === "scoop") {
|
if (detectedMethod === "scoop") {
|
||||||
return fetch("https://raw.githubusercontent.com/ScoopInstaller/Extras/master/bucket/opencode.json", {
|
return fetch("https://raw.githubusercontent.com/ScoopInstaller/Main/master/bucket/opencode.json", {
|
||||||
headers: { Accept: "application/json" },
|
headers: { Accept: "application/json" },
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|||||||
@ -98,8 +98,7 @@ You can also install it with the following commands:
|
|||||||
- **Using Scoop**
|
- **Using Scoop**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
scoop bucket add extras
|
scoop install opencode
|
||||||
scoop install extras/opencode
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Using NPM**
|
- **Using NPM**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user