docs: cross-platform install/update/uninstall instructions for codex/gemini/qwen
- Add Linux / macOS / Windows PowerShell / Windows CMD sections to all CLI READMEs - Update product table versions (claude v2.1.112, codex v0.116.0, qwen v0.14.5) - Make qwen install/update/uninstall scripts macOS-aware (sedi wrapper, launchctl, /Users scan, ~/.zshrc) - Make gemini uninstall script macOS-aware (matching install/update) - Fix CRLF line endings in qwen/gemini uninstall scripts Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
163
codex/README.md
163
codex/README.md
@@ -1,7 +1,7 @@
|
||||
# Codex CLI — Patched
|
||||
|
||||
Patched OpenAI Codex CLI for use with custom API endpoints.
|
||||
Latest: **v0.111.0** (6 config patches).
|
||||
Latest: **v0.116.0** (6 config patches).
|
||||
|
||||
> Codex CLI — это compiled Rust binary. В отличие от Claude Code и Gemini CLI (JavaScript),
|
||||
> патчинг выполняется через `config.toml` + переменные окружения.
|
||||
@@ -10,33 +10,73 @@ Latest: **v0.111.0** (6 config patches).
|
||||
|
||||
### Требования
|
||||
|
||||
- **Python 3.11+** (для `tomllib`)
|
||||
- **curl** (для скачивания бинарника)
|
||||
- **Linux x86_64 или aarch64** (macOS/Windows — вручную)
|
||||
- **Python 3.11+** (для `tomllib`) — на Windows опционально (есть PowerShell-fallback)
|
||||
- **curl** (Linux/macOS) или **PowerShell 5+** (Windows 10+ — встроенный)
|
||||
- Поддерживаемые платформы: **Linux x86_64/aarch64**, **macOS x86_64/arm64**, **Windows x86_64**
|
||||
|
||||
### Быстрая установка (Linux)
|
||||
### Установка одной командой
|
||||
|
||||
**Linux (Debian/Ubuntu/RHEL/Fedora):**
|
||||
```bash
|
||||
curl -fsSL -H "Authorization: token cadffcb0a6a3be728ac1ff619bb40c86588f6837" \
|
||||
https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/codex/ucodex_install.sh \
|
||||
-o /tmp/ucodex_install.sh && sudo bash /tmp/ucodex_install.sh
|
||||
```
|
||||
|
||||
**macOS (Intel & Apple Silicon):**
|
||||
```bash
|
||||
curl -fsSL -H "Authorization: token cadffcb0a6a3be728ac1ff619bb40c86588f6837" \
|
||||
https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/codex/ucodex_install.sh \
|
||||
-o /tmp/ucodex_install.sh && sudo bash /tmp/ucodex_install.sh
|
||||
```
|
||||
|
||||
> Бинарь устанавливается в `/usr/local/bin/.codex-bin`, wrapper — в `/usr/local/bin/codex`.
|
||||
> Env vars (`OPENAI_API_KEY`, `OPENAI_BASE_URL`) пробрасываются через `launchctl setenv`
|
||||
> и `~/.zshrc` / `~/.bashrc` (на Linux — `/etc/environment` + `/etc/profile.d/codex-env.sh`).
|
||||
|
||||
**Windows (PowerShell as Administrator):**
|
||||
```powershell
|
||||
$h=@{Authorization="token cadffcb0a6a3be728ac1ff619bb40c86588f6837"}
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
iwr "https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/codex/ucodex_install.ps1" -OutFile "$env:TEMP\ucodex_install.ps1" -Headers $h
|
||||
. "$env:TEMP\ucodex_install.ps1"
|
||||
```
|
||||
|
||||
**Windows (CMD as Administrator):**
|
||||
```cmd
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command "$h=@{Authorization='token cadffcb0a6a3be728ac1ff619bb40c86588f6837'}; iwr 'https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/codex/ucodex_install.ps1' -OutFile \"$env:TEMP\ucodex_install.ps1\" -Headers $h; & \"$env:TEMP\ucodex_install.ps1\""
|
||||
```
|
||||
|
||||
> Windows: бинарь ставится в `%LOCALAPPDATA%\Programs\codex\codex.exe` и автоматически
|
||||
> добавляется в PATH пользователя. Env vars (`OPENAI_API_KEY`, `OPENAI_BASE_URL`) ставятся
|
||||
> через `setx` + `[Environment]::SetEnvironmentVariable("...", "...", "User")`.
|
||||
> **После установки перезапустите CMD/PowerShell** для подхвата env vars и PATH.
|
||||
|
||||
### Установка из репозитория (любая платформа)
|
||||
|
||||
```bash
|
||||
# 1. Клонировать репо (или скачать файлы)
|
||||
git clone https://git.sensey24.ru/aibot777/unlimitedcoding.git
|
||||
cd unlimitedcoding/codex
|
||||
|
||||
# 2. Настроить конфиг — указать свой API endpoint и ключ
|
||||
# 1) Настроить конфиг
|
||||
cp codex_config.example.json codex_config.json
|
||||
nano codex_config.json # Изменить base_url и api_key
|
||||
# Редактировать base_url и api_key в codex_config.json
|
||||
|
||||
# 3. Установить бинарник + применить патчи
|
||||
# 2a) Linux/macOS:
|
||||
sudo bash ucodex_install.sh
|
||||
|
||||
# 2b) Windows PowerShell (Administrator):
|
||||
powershell -ExecutionPolicy Bypass -File ucodex_install.ps1
|
||||
```
|
||||
|
||||
### Ручная установка (шаг за шагом)
|
||||
### Ручная установка (шаг за шагом, Linux/macOS)
|
||||
|
||||
**Шаг 1 — Установить бинарник Codex CLI:**
|
||||
|
||||
```bash
|
||||
# Скачать последнюю версию с GitHub
|
||||
sudo bash update-codex.sh
|
||||
codex --version # Должно показать: codex-cli 0.111.0
|
||||
codex --version # Должно показать: codex-cli 0.116.0
|
||||
```
|
||||
|
||||
**Шаг 2 — Настроить конфиг:**
|
||||
@@ -89,7 +129,29 @@ codex exec "What is 2+2? Reply with just the number"
|
||||
|
||||
## Обновление
|
||||
|
||||
### Обновить бинарник Codex CLI
|
||||
### Одной командой
|
||||
|
||||
**Linux / macOS:**
|
||||
```bash
|
||||
curl -fsSL -H "Authorization: token cadffcb0a6a3be728ac1ff619bb40c86588f6837" \
|
||||
https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/codex/ucodex_update.sh \
|
||||
-o /tmp/ucodex_update.sh && sudo bash /tmp/ucodex_update.sh
|
||||
```
|
||||
|
||||
**Windows (PowerShell as Administrator):**
|
||||
```powershell
|
||||
$h=@{Authorization="token cadffcb0a6a3be728ac1ff619bb40c86588f6837"}
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
iwr "https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/codex/ucodex_update.ps1" -OutFile "$env:TEMP\ucodex_update.ps1" -Headers $h
|
||||
. "$env:TEMP\ucodex_update.ps1"
|
||||
```
|
||||
|
||||
**Windows (CMD as Administrator):**
|
||||
```cmd
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command "$h=@{Authorization='token cadffcb0a6a3be728ac1ff619bb40c86588f6837'}; iwr 'https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/codex/ucodex_update.ps1' -OutFile \"$env:TEMP\ucodex_update.ps1\" -Headers $h; & \"$env:TEMP\ucodex_update.ps1\""
|
||||
```
|
||||
|
||||
### Обновить бинарник Codex CLI вручную (Linux/macOS)
|
||||
|
||||
```bash
|
||||
cd unlimitedcoding/codex
|
||||
@@ -158,6 +220,25 @@ env_key = "OPENAI_API_KEY"
|
||||
wire_api = "responses"
|
||||
```
|
||||
|
||||
## Удаление (Uninstall)
|
||||
|
||||
**Linux / macOS:**
|
||||
```bash
|
||||
curl -fsSL -H "Authorization: token cadffcb0a6a3be728ac1ff619bb40c86588f6837" \
|
||||
https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/codex/ucodex_uninstall.sh \
|
||||
-o /tmp/ucodex_uninstall.sh && sudo bash /tmp/ucodex_uninstall.sh
|
||||
```
|
||||
|
||||
**Windows (PowerShell as Administrator):**
|
||||
```powershell
|
||||
$h=@{Authorization="token cadffcb0a6a3be728ac1ff619bb40c86588f6837"}
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
iwr "https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/codex/ucodex_uninstall.ps1" -OutFile "$env:TEMP\ucodex_uninstall.ps1" -Headers $h
|
||||
. "$env:TEMP\ucodex_uninstall.ps1"
|
||||
```
|
||||
|
||||
Удаляются: бинарь, `~/.codex/`, env vars, wrapper, PATH-запись.
|
||||
|
||||
## Rollback
|
||||
|
||||
Восстановить оригинальный конфиг:
|
||||
@@ -171,29 +252,58 @@ python3 codex_patcher.py --rollback
|
||||
### "Error loading configuration: missing field `name`"
|
||||
Обновите патчер (`git pull`) и перезапустите: `python3 codex_patcher.py --apply`
|
||||
|
||||
### codex не запускается (segfault / GLIBC)
|
||||
### codex не запускается (segfault / GLIBC) — Linux
|
||||
Скрипт `update-codex.sh` скачивает musl-версию для совместимости. Если проблема остаётся:
|
||||
```bash
|
||||
# Проверить бинарник
|
||||
file /usr/local/bin/codex
|
||||
ldd /usr/local/bin/codex # Должно быть "not a dynamic executable" (static)
|
||||
file /usr/local/bin/.codex-bin
|
||||
ldd /usr/local/bin/.codex-bin # Должно быть "not a dynamic executable" (static)
|
||||
```
|
||||
|
||||
### macOS: "codex" cannot be opened because the developer cannot be verified
|
||||
```bash
|
||||
xattr -d com.apple.quarantine /usr/local/bin/.codex-bin
|
||||
```
|
||||
|
||||
### Windows: "codex is not recognized"
|
||||
Перезапустите CMD/PowerShell. Либо вручную обновите PATH в текущей сессии:
|
||||
```powershell
|
||||
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
|
||||
```
|
||||
|
||||
### "OPENAI_API_KEY not set"
|
||||
```bash
|
||||
# Вариант 1: Перезайти в shell (env vars из /etc/environment)
|
||||
source /etc/environment
|
||||
|
||||
# Вариант 2: Установить вручную
|
||||
**Linux:**
|
||||
```bash
|
||||
source /etc/environment
|
||||
# или
|
||||
export OPENAI_BASE_URL="https://your-endpoint/v1"
|
||||
export OPENAI_API_KEY="your-key"
|
||||
```
|
||||
|
||||
**macOS:**
|
||||
```bash
|
||||
source /etc/codex-env.sh
|
||||
# или перезайти в shell (zsh подхватит из ~/.zshrc)
|
||||
```
|
||||
|
||||
**Windows (PowerShell):**
|
||||
```powershell
|
||||
[System.Environment]::SetEnvironmentVariable("OPENAI_API_KEY", "your-key", "User")
|
||||
[System.Environment]::SetEnvironmentVariable("OPENAI_BASE_URL", "https://your-endpoint/v1", "User")
|
||||
# Перезапустите PowerShell
|
||||
```
|
||||
|
||||
**Windows (CMD):**
|
||||
```cmd
|
||||
setx OPENAI_API_KEY "your-key"
|
||||
setx OPENAI_BASE_URL "https://your-endpoint/v1"
|
||||
```
|
||||
|
||||
### Permissions промпты всё ещё появляются
|
||||
Убедитесь что config.toml содержит `approval_policy = "never"`:
|
||||
```bash
|
||||
cat ~/.codex/config.toml | grep approval
|
||||
```
|
||||
|
||||
Linux/macOS: `cat ~/.codex/config.toml | grep approval`
|
||||
Windows: `type %USERPROFILE%\.codex\config.toml | findstr approval`
|
||||
|
||||
## Структура файлов
|
||||
|
||||
@@ -204,7 +314,12 @@ codex/
|
||||
├── codex_config.example.json # Пример конфига
|
||||
├── update_codex_patcher.py # Pipeline CLI
|
||||
├── update-codex.sh # Бинарный updater с GitHub
|
||||
├── ucodex_install.sh # One-liner installer
|
||||
├── ucodex_install.sh # One-liner installer (Linux/macOS)
|
||||
├── ucodex_install.ps1 # One-liner installer (Windows)
|
||||
├── ucodex_update.sh # Update script (Linux/macOS)
|
||||
├── ucodex_update.ps1 # Update script (Windows)
|
||||
├── ucodex_uninstall.sh # Uninstaller (Linux/macOS)
|
||||
├── ucodex_uninstall.ps1 # Uninstaller (Windows)
|
||||
└── updater/
|
||||
├── __init__.py
|
||||
└── config_validator.py # Валидация 6 targets
|
||||
|
||||
Reference in New Issue
Block a user