Preface

DeepSeek Harness (DSH) emphasizes “everything is a plugin”. If you wish to use ChatGPT Plus/Pro Codex models directly in DSH instead of connecting to a general OpenAI Platform API key, eons2long/dsh-codex-oauth provides a relatively direct solution: log in via OpenAI’s Codex OAuth flow and use openai-codex in the DSH model selector.

Below introduces its positioning, core capabilities, installation methods, and typical commands.

What is it

dsh-codex-oauth is an independent DSH plugin maintained by eons2long, used to utilize ChatGPT Codex subscriptions in DSH via a standalone OAuth flow. It targets the ChatGPT Codex backend, not a generic OpenAI Platform API-key adapter.

This plugin provides independent credential files and a login flow, supporting automatic token refresh, Codex model catalog, and Web UI and CLI login entry points within DSH. The license is MIT.

Core Capabilities

Verified capabilities include:

  • Using ChatGPT Plus/Pro Codex models via OpenAI’s Codex OAuth flow
  • Supports streaming
  • Supports tool calls
  • Supports reasoning
  • Supports images
  • Supports replay
  • Supports compaction
  • Supports automatic token refresh
  • Supports Codex model catalog
  • Uses a standalone credential file and login flow
  • Login via Settings → OpenAI Codex in the Web UI
  • Provides CLI login, status, and logout commands
  • Supports device-code login for headless machines
  • Credentials are stored at $DSH_HOME/.openai-codex-auth.json; the default path is ~/.dsh/.openai-codex-auth.json
  • Credential files use atomic writes and maintain owner-only permissions
  • refresh, login, and logout operations use cross-process file locks

Installation & Enablement

First install the plugin, then launch the web version.

dsh plugin --profile web add dsh-codex-oauth
dsh web

If using npx:

npx @deepseek-ai/dsh plugin --profile web add dsh-codex-oauth
npx @deepseek-ai/dsh web

Typical Usage

Web UI Login

After installing and launching, open the following in the DSH Web UI:

Settings → OpenAI Codex

Click Sign in with ChatGPT. After completing the OAuth authorization, return to DSH and select openai-codex in the model picker.

CLI Login

Execute the following in the command line:

dsh plugin --profile web exec dsh-openai-codex login

On machines without a browser or on headless machines, you can switch to device-code:

dsh plugin --profile web exec dsh-openai-codex login --device-code

To check status and logout:

dsh plugin --profile web exec dsh-openai-codex status
dsh plugin --profile web exec dsh-openai-codex logout

Credential File

The credential file path is:

$DSH_HOME/.openai-codex-auth.json

Default path:

~/.dsh/.openai-codex-auth.json

The file uses atomic writes and maintains owner-only permissions. The refresh, login, and logout operations use cross-process file locks.

The plugin will not read or modify the following files:

~/.pi/agent/auth.json
~/.codex/auth.json

Applicable Scenarios & Notes

Suitable for developers who wish to use ChatGPT Codex subscription capabilities in DSH and want to complete OAuth login through the plugin itself. When using it, please note:

  • This is the ChatGPT Codex backend, not a generic OpenAI Platform API-key adapter
  • Codex endpoints are not public OpenAI Platform API endpoints
  • ChatGPT plan eligibility, model access, quotas, and backend behavior are controlled by OpenAI and may change
  • Filesystem, shell, MCP, permissions, attachments, and other DSH capabilities come from the currently active profile
  • The plugin runs with the permissions of the current dsh process; check the source code and license before installing
  • If running local tests, npm test requires DSH and pi-ai peer dependencies provided by a DSH profile

The DSH Community directory is an independent site with no official affiliation to DeepSeek/Firmianai; do not interpret it as an official app store.

Conclusion

The value of dsh-codex-oauth lies in integrating the ChatGPT Codex subscription into DSH’s plugin ecosystem: independent login, independent credential files, support for streaming, tool calls, reasoning, images, replay, compaction, and the provision of both Web and CLI entry points.

Directory page:

https://www.skillhub.cn/plugins/eons2long/dsh-codex-oauth

GitHub:

https://github.com/eons2long/dsh-codex-oauth