npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

codex-anywhere-proxy

v1.4.3

Published

Use Codex CLI with any OpenAI-compatible API provider. No OpenAI account needed. No fork needed.

Readme

codex-proxy

Codex CLI'ı herhangi bir OpenAI-uyumlu API sağlayıcısıyla kullanın.

OpenAI hesabı gerekmez. Fork gerekmez. Codex güncellemelerini almaya devam edin.

Lisans: MIT npm sürümü


Nasıl çalışır?

Codex CLI  ──Responses API──▸  codex-proxy  ──chat/completions──▸  Sağlayıcınız

Codex CLI, OpenAI Responses API formatını kullanır — bunu yerel olarak yalnızca OpenAI sunar. Bu hafif proxy, Responses API ↔ chat/completions arasında gerçek zamanlı çeviri yapar ve Codex'ü OpenAI API formatını konuşan herhangi bir sağlayıcıyla kullanmanıza olanak tanır.

Özellikler

  • Herhangi bir sağlayıcı — OpenAI chat/completions API uyumlu her sağlayıcıyla çalışır
  • İnteraktif kurulumcodex-proxy install sağlayıcı, API anahtarı ve model seçiminde size rehberlik eder
  • Sağlayıcıya göre model kataloğu — Sağlayıcınızı otomatik algılar ve sadece onun modellerini gösterir
  • CLI yönetimistart, stop, restart, status, config, models, logs komutları
  • Streaming — Gerçek zamanlı token çıktısıyla tam SSE streaming desteği
  • Tool çağrıları — Function, custom (apply_patch) ve namespace (MCP) tool desteği
  • Sub-agent desteği — Codex sub-agent'ları proxy üzerinden çalışır
  • Bağlam takibi — Kullanım verileri Codex'e iletilir, yerleşik bağlam takibi ve auto-compaction için
  • Çapraz platform — Linux, macOS, Windows

Gereksinimler

  • Node.js 18+ (CLI için, çoğu sistemde yüklüdür)
  • Bun runtime (yoksa CLI tarafından otomatik kurulur)
  • Codex CLI v0.134+

Hızlı başlangıç

npm i -g codex-anywhere-proxy
codex-proxy install

Bu kadar. CLI şunları yapar:

  1. Bun'u kontrol eder/yükler
  2. Hangi sağlayıcıyı kullandığınızı sorar (Z.AI, DeepSeek, OpenAI, OpenRouter, Ollama vb.)
  3. API anahtarınızı sorar
  4. Hangi modeli kullanmak istediğinizi sorar
  5. Codex CLI'ı otomatik yapılandırır
  6. Proxy'yi başlatır (systemd/launchd ile otomatik başlatma)

Sonra çalıştırın:

codex

CLI komutları

codex-proxy install    # İlk kurulum (interaktif)
codex-proxy config     # Sağlayıcı, API anahtarı veya model değiştir
codex-proxy start      # Proxy'yi başlat
codex-proxy stop       # Proxy'yi durdur
codex-proxy restart    # Proxy'yi yeniden başlat
codex-proxy status     # Proxy durumu ve istatistikler
codex-proxy models     # Kullanılabilir modelleri listele
codex-proxy logs       # Proxy loglarını izle
codex-proxy version    # Sürümü göster

Global kurulum olmadan

Global kurmak istemezseniz komutların başına npx ekleyin:

npx codex-anywhere-proxy install
npx codex-anywhere-proxy status

Desteklenen sağlayıcılar

OpenAI Chat Completions API (/v1/chat/completions) uygulayan herhangi bir sağlayıcı çalışır. Kurulum sihirbazı şu sağlayıcılar için hazır ayarlar içerir:

| Sağlayıcı | URL | Varsayılan model | |---|---|---| | Z.AI / GLM | api.z.ai/api/coding/paas/v4 | glm-5.1 | | Zhipu AI | open.bigmodel.cn/api/coding/paas/v4 | glm-5.1 | | DeepSeek | api.deepseek.com/v1 | deepseek-chat | | OpenAI | api.openai.com/v1 | gpt-4.1 | | OpenRouter | openrouter.ai/api/v1 | deepseek/deepseek-chat-v3-0324 | | Ollama (yerel) | localhost:11434/v1 | qwen3:8b | | Özel | herhangi bir URL | herhangi bir model |

Sadece özel API sunan modeller (örn. Anthropic native, Google Gemini native) çalışmaz.

Yapılandırma

Ortam değişkenleri

Yapılandırma ~/.codex-proxy/.env dosyasında saklanır. Doğrudan düzenleyebilir veya codex-proxy config kullanabilirsiniz.

| Değişken | Varsayılan | Açıklama | |---|---|---| | UPSTREAM_BASE_URL | (kurulumda ayarlanır) | Sağlayıcınızın API base URL'si | | API_KEY | (kurulumda ayarlanır) | API anahtarı (OPENAI_API_KEY'i de okur) | | PORT | 8765 | Yerel proxy portu | | FILTER_NON_FUNCTION_TOOLS | true | computer_use, web_search gibi türleri filtreler | | MODELS_FILTER | (otomatik) | Virgülle ayrılmış model adı pattern'leri | | MODELS_EXCLUDE | (yok) | Katalogdan hariç tutulacak pattern'ler | | MODELS_JSON | (yok) | Özel model tanımları JSON dosyasının yolu |

Model kataloğu filtreleme

Proxy, models.dev üzerinden model metadatasını çeker (2478+ model, 135+ sağlayıcı) ve kataloğu filtreler, böylece Codex sadece sizin sağlayıcınızda bulunan modelleri görür.

Otomatik algılama (varsayılan): Ek yapılandırma gerekmez.

Manuel override:

# Sadece GLM modellerini göster
MODELS_FILTER=glm

# Belirli modelleri hariç tut
MODELS_EXCLUDE=glm-4.5-air

Bağlam takibi ve Otomatik sıkıştırma

Proxy, sağlayıcınızdan gelen kullanım verilerini Codex'e iletir. Otomatik sıkıştırmayı etkinleştirmek için ~/.codex/config.toml dosyasına ekleyin:

model_auto_compact_token_limit = 180000

Test

git clone https://github.com/xenitV1/codex-anywhere-proxy.git
cd codex-anywhere-proxy

# Entegrasyon testleri (.env'de geçerli API anahtarı gerekir)
bun run test.ts

Sorun giderme

"Missing environment variable: OPENAI_API_KEY"

codex-proxy config çalıştırarak API anahtarınızı ayarlayın.

Sub-agent'ler "Unknown model" hatası veriyor

codex-proxy config ile sağlayıcınızın doğru ayarlandığını kontrol edin.

"401 Unauthorized"

API anahtarınızı kontrol edin: codex-proxy config.

Proxy çöküyor veya donuyor

codex-proxy logs     # Logları görüntüle
codex-proxy restart  # Yeniden başlat

Neden Codex'i fork'lamıyoruz?

| Fork | codex-anywhere-proxy | |---|---| | Her güncellemede merge çakışmaları | Modüler yapı, herhangi bir Codex sürümüyle çalışır | | Patch'ler bakım gerektirir | Proxy runtime'dan bağımsızdır | | codex update özel kodu bozar | codex update normal şekilde çalışır | | Karmaşık kurulum | İki komut: npm i -g codex-anywhere-proxy + codex-proxy install |

Güncelleme

npm i -g codex-anywhere-proxy@latest
codex-proxy install    # CLI ve proxy'yi güncelle
codex update           # Codex CLI'ı güncelle

Platform desteği

| Platform | Otomatik başlatma | Runtime | |---|---|---| | Linux | systemd | Bun | | macOS | launchd | Bun | | Windows (WSL) | systemd | Bun | | Windows (native) | Manuel | Bun |

Lisans

MIT