docs: русский README — Windows, Desktop и CLI
Убрана английская половина. Установка для Windows PowerShell, OpenCode Desktop на всех ОС, WSL vs native, ключ для GUI.
This commit is contained in:
1 parent
cb17ce8d2a
commit
26008cf881
2 files changed
+118
-269
No files matched your search
@@ -10,38 +10,16 @@
|
||||
|-------|-----|
|
||||
| [`opencode/`](opencode/) | Провайдер OpenCode **Arka-AI**: установщик, плагин, skill, каталог чат-моделей |
|
||||
|
||||
Однострочник OpenCode (macOS/Linux/WSL):
|
||||
OpenCode, macOS / Linux / WSL:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.sh | bash
|
||||
```
|
||||
|
||||
Windows (PowerShell, CLI и Desktop):
|
||||
OpenCode, Windows (PowerShell, CLI и Desktop):
|
||||
|
||||
```powershell
|
||||
irm https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.ps1 | iex
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Public Arka AI downloads, docs, and scripts. Anonymous raw URLs, no token.
|
||||
|
||||
`https://git.arka-ai.ru/arka/public/raw/branch/main/<path>`
|
||||
|
||||
One top-level folder per product. No private source.
|
||||
|
||||
| Folder | What |
|
||||
|--------|------|
|
||||
| [`opencode/`](opencode/) | OpenCode **Arka-AI** provider: installer, plugin, skill, chat catalog |
|
||||
|
||||
OpenCode one-liner (macOS/Linux/WSL):
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.sh | bash
|
||||
```
|
||||
|
||||
Windows (PowerShell, CLI and Desktop):
|
||||
|
||||
```powershell
|
||||
irm https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.ps1 | iex
|
||||
```
|
||||
Подробности: [opencode/README.md](opencode/README.md) — Windows, Desktop, установка из чата OpenCode.
|
||||
+115
-244
@@ -2,13 +2,15 @@
|
||||
|
||||
Arka AI — OpenAI-совместимый API (`https://api.arka-ai.ru/v1`). В каталоге models.dev его нет, поэтому в свежем OpenCode провайдера **Arka-AI** и списка моделей нет, пока не поставить плагин.
|
||||
|
||||
Одна команда ставит плагин, skill и (по желанию) ключ. Каталог чат-моделей подтягивается сам (~116 из ~216; без TTS/картинок/видео/эмбеддингов). Снимок каталога обновляется каждый день в **05:00 по Москве**.
|
||||
Одна команда ставит плагин, skill и (по желанию) ключ. Каталог чат-моделей подтягивается сам (~116 из ~216; без TTS, картинок, видео и эмбеддингов). Снимок каталога обновляется каждый день в **05:00 по Москве**.
|
||||
|
||||
Нужен [API-ключ Arka AI](https://arka-ai.ru/docs/account/api-keys). Секрет ключа показывается **один раз** при создании.
|
||||
|
||||
Плагин один и тот же для **терминала (CLI)** и **OpenCode Desktop** (окно + тот же sidecar). Меняется только способ запуска установщика и то, как в процесс попадает ключ.
|
||||
|
||||
---
|
||||
|
||||
## Быстрый старт
|
||||
## macOS, Linux, Git Bash, WSL
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.sh | bash
|
||||
@@ -23,42 +25,13 @@ curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-a
|
||||
| bash -s -- --key "$ARKA_API_KEY" --set-default DeepSeek-V4-Pro
|
||||
```
|
||||
|
||||
Дальше:
|
||||
WSL и Git Bash — это **linux-окружение** со своим домашним каталогом. Native Windows Desktop его **не видит**: для приложения с ярлыка Windows нужен PowerShell-установщик ниже.
|
||||
|
||||
1. Откройте **новый терминал** (чтобы подхватился `export ARKA_API_KEY`).
|
||||
2. Перезапустите OpenCode.
|
||||
3. Команда `/models` — в списке должен быть провайдер **Arka-AI** и чат-модели.
|
||||
---
|
||||
|
||||
Если OpenCode запущен из GUI / иконки / сокета, а не из login-shell, переменная из `~/.bashrc` до него может не дойти. Задайте `ARKA_API_KEY` в том окружении, откуда стартует OpenCode, или введите ключ в интерактивном приглашении установщика.
|
||||
## Windows (CLI и Desktop)
|
||||
|
||||
### Из уже открытого OpenCode
|
||||
|
||||
Отдельного магазина плагинов у OpenCode нет. Можно не выходить из CLI: попросите **текущую** модель (любую, не Arka) выполнить установщик через bash.
|
||||
|
||||
Вставьте в чат (подставьте свой ключ):
|
||||
|
||||
```
|
||||
Поставь провайдер Arka AI для OpenCode. Не спрашивай ключ интерактивно.
|
||||
Выполни одну команду и покажи вывод:
|
||||
|
||||
curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.sh | bash -s -- --key 'ARKA_API_KEY_HERE' --set-default DeepSeek-V4-Pro
|
||||
|
||||
После успеха напиши, что нужно полностью перезапустить OpenCode (конфиг не подхватывается на лету).
|
||||
```
|
||||
|
||||
Что происходит:
|
||||
|
||||
1. Агент вызывает встроенный bash/shell.
|
||||
2. OpenCode спросит разрешение на команду — нажмите Allow.
|
||||
3. Скрипт пишет плагин, skill и ключ в `~/.config/opencode` (установщик сам по себе офлайн; `curl` только качает скрипт).
|
||||
4. `--key` обязателен: приглашение «введите ключ» в неинтерактивном пайпе зависнет.
|
||||
5. **Перезапустите OpenCode целиком** — плагин грузится только на старте. Затем `/models` → **Arka-AI**.
|
||||
|
||||
Пока сессия не перезапущена, разговор идёт на старой модели. Это нормально: установщик не требует Arka.
|
||||
|
||||
### Windows (CLI и Desktop)
|
||||
|
||||
Официальный каталог конфига OpenCode на Windows — **`%USERPROFILE%\.config\opencode`** (то же, что `C:\Users\<имя>\.config\opencode`). Туда же смотрит **OpenCode Desktop**. Не кладите плагин только в `%APPDATA%\opencode` — Desktop его оттуда не читает, если этого каталога ещё нет.
|
||||
Официальный каталог конфига OpenCode на Windows — **`%USERPROFILE%\.config\opencode`**, то есть `C:\Users\<имя>\.config\opencode`. Туда же смотрит **OpenCode Desktop**. Не кладите плагин только в `%APPDATA%\opencode` — Desktop его оттуда не читает, если этого каталога ещё нет.
|
||||
|
||||
PowerShell:
|
||||
|
||||
@@ -81,47 +54,97 @@ cmd.exe:
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.ps1 | iex"
|
||||
```
|
||||
|
||||
Git Bash / WSL — linux-скрипт, как обычно. Это **другой** OpenCode (домашний каталог WSL), не native Windows Desktop.
|
||||
|
||||
Скрипт пишет:
|
||||
|
||||
- `%USERPROFILE%\.config\opencode\plugins\arka-ai.ts`
|
||||
- `%USERPROFILE%\.config\opencode\skills\arka-provider\SKILL.md`
|
||||
- `%USERPROFILE%\.config\opencode\.arka-api-key` (Desktop читает ключ отсюда, login-shell не нужен)
|
||||
- пользовательскую переменную среды `ARKA_API_KEY` (подхватится после полного перезапуска GUI)
|
||||
- если уже есть `%APPDATA%\opencode` — копия туда же, на всякий случай
|
||||
- `%USERPROFILE%\.config\opencode\.arka-api-key` — Desktop читает ключ отсюда, login-shell не нужен
|
||||
- пользовательскую переменную среды `ARKA_API_KEY` (GUI подхватит после **полного** перезапуска)
|
||||
- копию в `%APPDATA%\opencode`, только если этот каталог уже есть
|
||||
|
||||
Затем **полностью закройте** OpenCode Desktop (иконка в трее тоже) и CLI, откройте снова, `/models`.
|
||||
Если PowerShell ругается на политику выполнения — используйте `-ExecutionPolicy Bypass`, как в команде с `-File`.
|
||||
|
||||
### OpenCode Desktop (все ОС)
|
||||
---
|
||||
|
||||
Desktop — это окно + тот же sidecar CLI. Плагины те же файлы, что и у терминала.
|
||||
## OpenCode Desktop (Windows, macOS, Linux)
|
||||
|
||||
| ОС | Плагин / skill / ключ |
|
||||
|----|------------------------|
|
||||
Desktop — это окно + тот же CLI. Отдельного «магазина» и отдельного плагина для GUI нет.
|
||||
|
||||
| ОС | Куда ставится плагин, skill и ключ |
|
||||
|----|-------------------------------------|
|
||||
| Windows | `%USERPROFILE%\.config\opencode\` |
|
||||
| macOS / Linux | `~/.config/opencode/` |
|
||||
| macOS | `~/.config/opencode/` |
|
||||
| Linux | `~/.config/opencode/` |
|
||||
|
||||
1. Поставьте провайдер скриптом выше (bash или `.ps1`).
|
||||
2. **Quit** приложения, не только закрытие окна. На Windows проверьте трей.
|
||||
3. Запустите Desktop снова. `/models` → **Arka-AI**.
|
||||
1. Запустите установщик своей ОС (bash или `.ps1`).
|
||||
2. **Полностью закройте** приложение, не только окно. На Windows проверьте значок в трее. На macOS — Quit из меню, не красный крестик, если процесс остаётся в доке.
|
||||
3. Откройте Desktop снова. `/models` — должен быть провайдер **Arka-AI**.
|
||||
|
||||
`~/.bashrc` Desktop **не читает**. Поэтому установщик кладёт ключ в `.arka-api-key` и (на Windows) в User environment. Если модели есть в списке, но запросы 401 — ключ не попал в процесс: проверьте файл ключа и перезапуск.
|
||||
Desktop **не читает** `~/.bashrc` / `~/.zshrc`. Поэтому установщик кладёт ключ в файл `.arka-api-key` и (на Windows) в пользовательские переменные среды. Если модели видны в `/models`, а запросы отвечают 401 — ключ не попал в процесс: проверьте файл ключа и что приложение действительно перезапущено.
|
||||
|
||||
### Что ставится
|
||||
macOS Desktop ставится тем же bash-скриптом, что и CLI. После установки: полностью Quit и снова открыть приложение.
|
||||
|
||||
---
|
||||
|
||||
## Из уже открытого OpenCode (CLI или Desktop)
|
||||
|
||||
Магазина плагинов нет. Можно не выходить из чата: попросите **текущую** модель (любую, не Arka) выполнить установщик.
|
||||
|
||||
**macOS / Linux** — вставьте в чат (подставьте свой ключ):
|
||||
|
||||
```
|
||||
Поставь провайдер Arka AI для OpenCode. Не спрашивай ключ интерактивно.
|
||||
Выполни одну команду и покажи вывод:
|
||||
|
||||
curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.sh | bash -s -- --key 'ARKA_API_KEY_HERE' --set-default DeepSeek-V4-Pro
|
||||
|
||||
После успеха напиши, что нужно полностью перезапустить OpenCode (конфиг не подхватывается на лету).
|
||||
```
|
||||
|
||||
**Windows** — вставьте в чат:
|
||||
|
||||
```
|
||||
Поставь провайдер Arka AI для OpenCode. Не спрашивай ключ интерактивно.
|
||||
Выполни в PowerShell одну команду и покажи вывод:
|
||||
|
||||
powershell -ExecutionPolicy Bypass -Command "iwr -useb https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.ps1 -OutFile $env:TEMP\install-arka.ps1; powershell -ExecutionPolicy Bypass -File $env:TEMP\install-arka.ps1 -Key 'ARKA_API_KEY_HERE' -SetDefault DeepSeek-V4-Pro"
|
||||
|
||||
После успеха напиши, что нужно полностью закрыть OpenCode Desktop и CLI (включая трей) и открыть снова.
|
||||
```
|
||||
|
||||
Что происходит:
|
||||
|
||||
1. Агент вызывает встроенный bash или PowerShell.
|
||||
2. OpenCode спросит разрешение — нажмите Allow.
|
||||
3. Скрипт пишет плагин, skill и ключ. `--key` / `-Key` обязателен: интерактивный ввод ключа в пайпе зависнет.
|
||||
4. **Полностью перезапустите** CLI или Desktop — плагин грузится только на старте. Затем `/models` → **Arka-AI**.
|
||||
|
||||
Пока сессия не перезапущена, разговор идёт на старой модели. Это нормально: установщик не требует Arka.
|
||||
|
||||
---
|
||||
|
||||
## Что ставится
|
||||
|
||||
| Куда | Что |
|
||||
|------|-----|
|
||||
| `~/.config/opencode/plugins/arka-ai.ts` | Плагин провайдера **Arka-AI** |
|
||||
| `~/.config/opencode/skills/arka-provider/SKILL.md` | Skill: как обновить каталог и сменить модель |
|
||||
| `~/.bashrc` (или первый из `.zshrc` / `.profile`) | `export ARKA_API_KEY=…`, если ключ передали |
|
||||
| `~/.config/opencode/opencode.json` | Только при `--set-default`: `"model": "Arka-AI/<id>"`. Существующий конфиг **не затирается**. |
|
||||
| `~/.config/opencode/plugins/arka-ai.ts` (Windows: `%USERPROFILE%\.config\opencode\plugins\arka-ai.ts`) | Плагин провайдера **Arka-AI** |
|
||||
| `…/skills/arka-provider/SKILL.md` | Skill: как обновить каталог и сменить модель |
|
||||
| `…/.arka-api-key` | Ключ для CLI и Desktop (GUI без login-shell) |
|
||||
| `~/.bashrc` / `.zshrc` / `.profile` | `export ARKA_API_KEY=…` (только POSIX-установщик) |
|
||||
| переменная среды пользователя Windows | `ARKA_API_KEY` (только `.ps1`) |
|
||||
| `…/opencode.json` | Только при `--set-default` / `-SetDefault`: `"model": "Arka-AI/<id>"`. Существующий конфиг **не затирается** |
|
||||
|
||||
Установщик **офлайн** и идемпотентный: сеть не трогает, повторный запуск перезаписывает плагин и skill каноническими копиями.
|
||||
Установщик идемпотентный: повторный запуск перезаписывает плагин и skill каноническими копиями. POSIX-скрипт после скачивания офлайн. `python3` нужен только с `--set-default`. Отдельный `bun` не нужен — у OpenCode свой runtime.
|
||||
|
||||
`python3` нужен только с `--set-default`. Отдельный `bun` на машине не нужен — у OpenCode свой runtime.
|
||||
Дальше:
|
||||
|
||||
### Модель по умолчанию
|
||||
1. Новый терминал (POSIX) **или** полный выход из Desktop.
|
||||
2. Снова открыть OpenCode.
|
||||
3. `/models` — провайдер **Arka-AI** и чат-модели.
|
||||
|
||||
---
|
||||
|
||||
## Модель по умолчанию
|
||||
|
||||
Идентификаторы — как в каталоге, с префиксом провайдера:
|
||||
|
||||
@@ -135,15 +158,25 @@ Desktop — это окно + тот же sidecar CLI. Плагины те же
|
||||
|
||||
Их всегда оставляем в списке, даже если фильтр чат-моделей их бы отсёк.
|
||||
|
||||
### Обновить каталог
|
||||
---
|
||||
|
||||
## Обновить каталог
|
||||
|
||||
macOS / Linux:
|
||||
|
||||
```bash
|
||||
rm -f ~/.cache/opencode/arka-ai-models.json
|
||||
```
|
||||
|
||||
Перезапустите OpenCode. Плагин сначала берёт публичный снимок
|
||||
Windows (Win+R):
|
||||
|
||||
```
|
||||
%USERPROFILE%\.cache\opencode\arka-ai-models.json
|
||||
```
|
||||
|
||||
Удалите файл и полностью перезапустите OpenCode. Плагин сначала берёт публичный снимок
|
||||
`https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/catalog.json`
|
||||
(без ключа), при ошибке — живой `https://api.arka-ai.ru/v1/models`. Локальный кэш живёт 24 часа. Конфиг OpenCode на лету не перечитывается.
|
||||
(без ключа), при ошибке — живой `https://api.arka-ai.ru/v1/models`. Локальный кэш живёт 24 часа. Конфиг на лету не перечитывается.
|
||||
|
||||
Список моделей (ключ не нужен):
|
||||
|
||||
@@ -151,195 +184,33 @@ rm -f ~/.cache/opencode/arka-ai-models.json
|
||||
curl -sS https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/catalog.json | python3 -m json.tool
|
||||
```
|
||||
|
||||
Вызовы моделей идут на `https://api.arka-ai.ru/v1` с `ARKA_API_KEY`.
|
||||
Вызовы моделей идут на `https://api.arka-ai.ru/v1` с ключом из `ARKA_API_KEY` или из `.arka-api-key`.
|
||||
|
||||
### Если что-то не так
|
||||
---
|
||||
|
||||
## Если что-то не так
|
||||
|
||||
| Симптом | Что проверить |
|
||||
|---------|----------------|
|
||||
| После `/models` нет Arka-AI | Есть ли `~/.config/opencode/plugins/arka-ai.ts`; экспортирован ли `ARKA_API_KEY` **в процессе OpenCode**; открыт ли новый шелл |
|
||||
| Каталог не меняется | `rm -f ~/.cache/opencode/arka-ai-models.json` и рестарт |
|
||||
| Ошибка импорта плагина | Снова запустить установщик — он вернёт канонический файл |
|
||||
| `curl` отдаёт HTML, не скрипт | Нужен путь `/raw/branch/main/…`, не страница репозитория |
|
||||
| После `/models` нет Arka-AI | Есть ли `plugins/arka-ai.ts` в каталоге конфига выше; полностью ли перезапущен CLI/Desktop |
|
||||
| Модели есть, запросы 401 | Файл `.arka-api-key`; на Windows — User env и трей; Desktop не читает bashrc |
|
||||
| Каталог не меняется | Удалить кэш `arka-ai-models.json` и рестарт |
|
||||
| Ошибка импорта плагина | Снова запустить установщик |
|
||||
| `curl` / `irm` отдаёт HTML | Нужен путь `/raw/branch/main/…`, не страница репозитория |
|
||||
| Поставили в WSL, Desktop пустой | Native Windows Desktop смотрит в `%USERPROFILE%\.config\opencode`, не в home WSL — ставьте `.ps1` |
|
||||
| Плагин в `%APPDATA%\opencode`, эффекта нет | Нужен `%USERPROFILE%\.config\opencode` |
|
||||
|
||||
---
|
||||
|
||||
# OpenCode and Arka AI models
|
||||
## Файлы в этой папке
|
||||
|
||||
Arka AI is an OpenAI-compatible API at `https://api.arka-ai.ru/v1`. It is not in models.dev, so a fresh OpenCode install has no **Arka-AI** provider until you add the plugin.
|
||||
| Файл | Назначение |
|
||||
|------|------------|
|
||||
| `install-arka-provider.sh` | Установщик для macOS, Linux, WSL, Git Bash |
|
||||
| `install-arka-provider.ps1` | Установщик для Windows (CLI и Desktop) |
|
||||
| `plugins/arka-ai.ts` | Исходник плагина (встроен в оба установщика) |
|
||||
| `skills/arka-provider/SKILL.md` | Исходник skill (встроен в оба установщика) |
|
||||
| `catalog.json` | Каталог чат-моделей, обновляется ежедневно в 05:00 по Москве |
|
||||
| `README.md` | Эта страница — можно копировать в раздел «агентные помощники» на arka-ai.ru |
|
||||
|
||||
One command installs the plugin, a companion skill, and (optionally) your API key. The chat catalog loads on OpenCode start (~116 of ~216 models; TTS, image, video, and embeddings are filtered out). The published catalog snapshot refreshes daily at **05:00 Europe/Moscow**.
|
||||
|
||||
You need an [Arka AI API key](https://arka-ai.ru/docs/account/api-keys). The secret is shown **once** at creation.
|
||||
|
||||
## Quick start
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.sh | bash
|
||||
```
|
||||
|
||||
The script prompts for `ARKA_API_KEY` (blank is allowed; set it later).
|
||||
|
||||
Key and default model in one go:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.sh \
|
||||
| bash -s -- --key "$ARKA_API_KEY" --set-default DeepSeek-V4-Pro
|
||||
```
|
||||
|
||||
Then:
|
||||
|
||||
1. Open a **new shell** so `export ARKA_API_KEY` is picked up.
|
||||
2. Restart OpenCode.
|
||||
3. Run `/models` — you should see provider **Arka-AI** and the chat models.
|
||||
|
||||
If OpenCode is started from a GUI, dock icon, or socket rather than a login shell, `~/.bashrc` may not reach it. Set `ARKA_API_KEY` in that process environment, or type it at the installer prompt.
|
||||
|
||||
### From inside OpenCode
|
||||
|
||||
OpenCode has no plugin store. You do not have to leave the CLI: ask the **current** model (any provider, not Arka) to run the installer via bash.
|
||||
|
||||
Paste this (put your real key in):
|
||||
|
||||
```
|
||||
Install the Arka AI OpenCode provider. Do not prompt for the key.
|
||||
Run this exact command and show the output:
|
||||
|
||||
curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.sh | bash -s -- --key 'ARKA_API_KEY_HERE' --set-default DeepSeek-V4-Pro
|
||||
|
||||
When it succeeds, tell me I must fully restart OpenCode (config is not hot-reloaded).
|
||||
```
|
||||
|
||||
What happens:
|
||||
|
||||
1. The agent uses the built-in bash/shell tool.
|
||||
2. OpenCode asks permission — Allow the command.
|
||||
3. The script writes the plugin, skill, and key under `~/.config/opencode` (the installer itself is offline; `curl` only fetches the script).
|
||||
4. `--key` is required: the interactive key prompt hangs in a non-interactive pipe.
|
||||
5. **Fully restart OpenCode** — plugins load only at startup. Then `/models` → **Arka-AI**.
|
||||
|
||||
Until you restart, this session keeps the old model. That is expected: the installer does not need Arka.
|
||||
|
||||
### Windows (CLI and Desktop)
|
||||
|
||||
OpenCode’s real config dir on Windows is **`%USERPROFILE%\.config\opencode`**
|
||||
(`C:\Users\<name>\.config\opencode`). **OpenCode Desktop uses that same folder.**
|
||||
Putting the plugin only in `%APPDATA%\opencode` is a common miss — Desktop will not
|
||||
load it unless that directory already exists and happens to be in use.
|
||||
|
||||
PowerShell:
|
||||
|
||||
```powershell
|
||||
irm https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.ps1 | iex
|
||||
```
|
||||
|
||||
With a key and default model:
|
||||
|
||||
```powershell
|
||||
iwr -useb https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.ps1 `
|
||||
-OutFile $env:TEMP\install-arka.ps1
|
||||
powershell -ExecutionPolicy Bypass -File $env:TEMP\install-arka.ps1 `
|
||||
-Key $env:ARKA_API_KEY -SetDefault DeepSeek-V4-Pro
|
||||
```
|
||||
|
||||
cmd.exe:
|
||||
|
||||
```bat
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/install-arka-provider.ps1 | iex"
|
||||
```
|
||||
|
||||
Git Bash / WSL use the Linux installer. That OpenCode is **not** the native Windows Desktop app (different home directory).
|
||||
|
||||
The script writes:
|
||||
|
||||
- `%USERPROFILE%\.config\opencode\plugins\arka-ai.ts`
|
||||
- `%USERPROFILE%\.config\opencode\skills\arka-provider\SKILL.md`
|
||||
- `%USERPROFILE%\.config\opencode\.arka-api-key` (Desktop reads the key here; no login shell needed)
|
||||
- User environment variable `ARKA_API_KEY` (GUI apps pick this up after a full restart)
|
||||
- a copy under `%APPDATA%\opencode` only if that directory already exists
|
||||
|
||||
Then **fully quit** OpenCode Desktop (tray icon too) and the CLI, start again, `/models`.
|
||||
|
||||
### OpenCode Desktop (all platforms)
|
||||
|
||||
Desktop is a window plus the same sidecar CLI. Plugins are the same files as the terminal.
|
||||
|
||||
| OS | Plugin / skill / key |
|
||||
|----|----------------------|
|
||||
| Windows | `%USERPROFILE%\.config\opencode\` |
|
||||
| macOS / Linux | `~/.config/opencode/` |
|
||||
|
||||
1. Run the installer above (bash or `.ps1`).
|
||||
2. **Quit** the app, not just the window. On Windows, check the tray.
|
||||
3. Start Desktop again. `/models` → **Arka-AI**.
|
||||
|
||||
Desktop does **not** read `~/.bashrc`. That is why the installer writes `.arka-api-key` and (on Windows) a User env var. If models show up but requests return 401, the key never reached the process: check the key file and restart.
|
||||
|
||||
### What the installer writes
|
||||
|
||||
| Path | Role |
|
||||
|------|------|
|
||||
| `~/.config/opencode/plugins/arka-ai.ts` | **Arka-AI** provider plugin |
|
||||
| `~/.config/opencode/skills/arka-provider/SKILL.md` | How to refresh the catalog and change the default model |
|
||||
| `~/.bashrc` (else first existing `.zshrc` / `.profile`) | `export ARKA_API_KEY=…` when a key is given |
|
||||
| `~/.config/opencode/opencode.json` | Only with `--set-default`: `"model": "Arka-AI/<id>"`. An existing config is **not** replaced. |
|
||||
|
||||
The installer is **offline** and idempotent: no network calls; re-running overwrites plugin and skill with the canonical copies.
|
||||
|
||||
`python3` is required **only** with `--set-default`. You do not need `bun` on the host — OpenCode ships its own runtime.
|
||||
|
||||
### Default model
|
||||
|
||||
Use catalog ids with the provider prefix:
|
||||
|
||||
```json
|
||||
{
|
||||
"model": "Arka-AI/DeepSeek-V4-Pro"
|
||||
}
|
||||
```
|
||||
|
||||
Examples: `Arka-AI/DeepSeek-V4-Pro`, `Arka-AI/qwen3.8-max`, `Arka-AI/kimi-k3`, `Arka-AI/MiniMax-M3`, `Arka-AI/GLM-5.3`, `Arka-AI/deepseek-v4-flash-0731`.
|
||||
|
||||
Those ids stay visible even if the chat filter would drop them.
|
||||
|
||||
### Refresh the catalog
|
||||
|
||||
```bash
|
||||
rm -f ~/.cache/opencode/arka-ai-models.json
|
||||
```
|
||||
|
||||
Restart OpenCode. The plugin fetches the public snapshot
|
||||
`https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/catalog.json`
|
||||
(no key), then falls back to live `https://api.arka-ai.ru/v1/models`. Local cache TTL is 24 hours. OpenCode does not hot-reload config.
|
||||
|
||||
Inspect the published list (no key):
|
||||
|
||||
```bash
|
||||
curl -sS https://git.arka-ai.ru/arka/public/raw/branch/main/opencode/catalog.json | python3 -m json.tool
|
||||
```
|
||||
|
||||
Inference still uses `ARKA_API_KEY` against `https://api.arka-ai.ru/v1`.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
| Symptom | Check |
|
||||
|---------|--------|
|
||||
| No Arka-AI after `/models` | `~/.config/opencode/plugins/arka-ai.ts` exists; `ARKA_API_KEY` is set **in the OpenCode process**; you opened a new shell |
|
||||
| Models look stale | `rm -f ~/.cache/opencode/arka-ai-models.json` and restart |
|
||||
| Plugin import error | Re-run the installer to restore the canonical file |
|
||||
| `curl` returns HTML | Use `/raw/branch/main/…`, not the repo page |
|
||||
|
||||
---
|
||||
|
||||
## Files in this folder
|
||||
|
||||
| File | Role |
|
||||
|------|------|
|
||||
| `install-arka-provider.sh` | POSIX installer (macOS/Linux/WSL/Git Bash) |
|
||||
| `install-arka-provider.ps1` | Windows installer (CLI + Desktop) |
|
||||
| `plugins/arka-ai.ts` | Plugin source (embedded in the installer) |
|
||||
| `skills/arka-provider/SKILL.md` | Skill source (embedded in the installer) |
|
||||
| `catalog.json` | Filtered chat catalog, refreshed daily at 05:00 Europe/Moscow |
|
||||
| `README.md` | This page — copy into arka-ai.ru «агентные помощники» / agentic helpers |
|
||||
|
||||
This directory is `opencode/` inside the public dump [arka/public](https://git.arka-ai.ru/arka/public).
|
||||
Каталог `opencode/` лежит в публичном репозитории [arka/public](https://git.arka-ai.ru/arka/public).
|
||||
Reference in new issue
Block a user