Codex On Ishのロゴ

Codex On Ish

組織
OpenMinis
codex-on-ish

Install and run OpenAI Codex CLI inside the Minis/iSH Alpine sandbox on iOS, where rustls TLS and async sockets are broken. Covers the local MITM proxy with P-256 certs, version-spoofing to unlock newer models (gpt-5.6 family), forcing SSE instead of websockets, ChatGPT device-auth login driven by curl, and the refcounted proxy wrapper. Use when the user wants Codex or other Rust-based AI CLIs on the iPhone/iPad Minis shell, or hits "error sending request", "must support ECDSA_NISTP521_SHA512" panics, model "requires a newer version of Codex", or npm errno 65 inside iSH.

Add to TypingMind

概要

公開者OpenMinis
リポジトリMinisSkills
スキル名codex-on-ish
スター
543
フォーク
86
同梱ファイル
8
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 8個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    OpenMinisがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Codex On Ish」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/OpenMinis/MinisSkills/tree/main/codex-on-ish
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/OpenMinis/MinisSkills.git /tmp/MinisSkills
mkdir -p .claude/skills
cp -r /tmp/MinisSkills/codex-on-ish .claude/skills/codex-on-ish
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでCodex On Ishを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にCodex On Ishを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Codex On Ishは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Codex on iSH (Minis iOS sandbox)

Run the OpenAI Codex CLI natively in the Alpine/iSH environment. Works around the platform's broken Rust networking stack with a local MITM proxy.

Why this is needed (the two bugs)

  1. rustls misbehaves on iSH's translated CPU. Official musl binaries ≥ v0.143 panic at the first TLS handshake (installed rustls crypto provider must support ECDSA_NISTP521_SHA512) because aws-lc-rs CPU detection fails in the emulator. v0.130 (ring provider) handshakes, but ONLY with ECDSA P-256 certificates — RSA and P-521 get refused.
  2. Async sockets to remote hosts fail (connect errno 65 / reqwest error sending request). Blocking-socket clients (curl, Python) work fine; loopback connections work fine. Routing Rust traffic through a local proxy converts the hostile leg into a reliable one.

Both bugs are iSH-specific. Termux forks do NOT fix them (verified: their rustls code is identical to upstream).

Install

sh scripts/setup.sh

This downloads codex v0.130.0 musl aarch64, generates the P-256 CA/server certs, installs pyproxy6.py (proxy) and the codex wrapper into /usr/local/bin, and writes ~/.codex/config.toml defaults (model, yolo approval policy).

Login (ChatGPT account)

Codex's own login flows die within minutes (iOS kills the app at 48 CPU-s/min in background), so drive the OAuth device flow with curl instead:

sh scripts/token_poller3.sh &     # prints a live user_code, auto-renews
# user visits https://auth.openai.com/codex/device, enters the code
# poller exchanges the artifact and writes /tmp/token_result.json
sh scripts/write_auth_json.sh     # installs ~/.codex/auth.json
codex login status                # -> "Logged in using ChatGPT"

Key protocol facts (see references/auth-protocol.md):

  • POST /api/accounts/deviceauth/usercode JSON {client_id} → device_auth_id + user_code
  • poll /deviceauth/token with {device_auth_id, client_id, user_code} until it returns authorization_code + code_verifier
  • exchange at /oauth/token form-encoded (JSON is rejected) with redirect_uri=https://auth.openai.com/deviceauth/callback → id/access/refresh tokens
  • Python urllib is blocked by Cloudflare on these endpoints — always use curl.

What the wrapper does

codex (wrapper) registers a refcount file, starts the proxy as a singleton (pidfile + pgrep guard), waits for the port, execs codex.bin with SSL_CERT_FILE/HTTPS_PROXY env, and cleans up on exit. The proxy tears itself down ~8 s after the last client leaves. Output is silent; logs live in /tmp/codex-proxy/.

Model gating and the version spoof

The backend gates models by reported client version (e.g. gpt-5.6-* requires ≥ 0.144.0 — the exact versions that panic on iSH). The proxy rewrites 0.130.0 → 0.151.0 in-flight (same byte length, so HTTP framing survives) in the request line, version: header, and bodies.

It also down-translates the models catalog: drops max/ultra reasoning efforts v0.130 can't parse, forces prefer_websockets=false, and rewrites Content-Length. Websocket upgrades on /backend-api/codex/responses get a local 501 so codex falls back to SSE (WS frames would stall the HTTP-framed relay); other WS upgrades pass through raw.

Troubleshooting

See references/troubleshooting.md for: cert re-generation, DNS EAI_AGAIN retries, "models list failed to refresh", login poller death, upstream 502s, and the iOS background CPU-budget kills.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Codex On Ish」では何ができますか?

Install and run OpenAI Codex CLI inside the Minis/iSH Alpine sandbox on iOS, where rustls TLS and async sockets are broken. Covers the local MITM proxy with P-256 certs, version-spoofing to unlock newer models (gpt-5.6 family), forcing SSE instead of websockets, ChatGPT device-auth login driven by curl, and the refcounted proxy wrapper. Use when the user wants Codex or other Rust-based AI CLIs on the iPhone/iPad Minis shell, or hits "error sending request", "must support ECDSA_NISTP521_SHA512" panics, model "requires a newer version of Codex", or npm errno 65 inside iSH.

TypingMindでCodex On Ishを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Codex On Ishはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにCodex On Ishをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/OpenMinis/MinisSkills/tree/main/codex-on-ishを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Codex On Ishを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Codex On Ishで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもCodex On Ishを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Codex On Ish」は無料ですか?

はい。OpenMinisがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇