Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zsh-codex-mode

Deutsch | English | Español | français | 日本語 | 한국어 | Português | Русский | 中文

Codex, right in your Zsh.

Switch seamlessly between Zsh and Codex

Press Ctrl+X to enter Codex mode. Replies stream into the terminal, and messages keep their context when you switch back to the shell.

Requirements

Install

Oh My Zsh

git clone --depth 1 https://github.com/gaoyifan/zsh-codex-mode \
  "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-codex-mode"

Add zsh-codex-mode to the plugins in .zshrc:

plugins=(... zsh-codex-mode)

Manually

git clone --depth 1 https://github.com/gaoyifan/zsh-codex-mode ~/.zsh/zsh-codex-mode

Then source the plugin from .zshrc:

source ~/.zsh/zsh-codex-mode/zsh-codex-mode.plugin.zsh

Configure

Set these variables before loading the plugin:

Variable Default Description
ZSH_CODEX_MODE_PROMPT Prompt, including spacing
ZSH_CODEX_MODE_INPUT_STYLE fg=green ZLE input style; empty disables it
ZSH_CODEX_MODE_KEY ^X Toggle key; empty disables the binding
ZSH_CODEX_MODE_ACTIVITY_MAX_LENGTH 100 Positive maximum command and path preview length
ZSH_CODEX_MODE_SHOW_ACTIVITY 1 1 to show tool activity, 0 to hide it
ZSH_CODEX_MODE_MODEL Codex setting Model
ZSH_CODEX_MODE_REASONING_EFFORT Codex setting none, minimal, low, medium, high, xhigh, max, or ultra; model-dependent
ZSH_CODEX_MODE_SANDBOX Codex setting read-only, workspace-write, or danger-full-access
ZSH_CODEX_MODE_APPROVAL_POLICY Codex setting untrusted, on-request, or never
ZSH_CODEX_MODE_MCP Codex setting inherit or disabled

Use

Key Action
Ctrl+X Switch between shell and Codex mode, preserving context
Ctrl+D Leave Codex mode and discard its context
Enter Send a message

Tool calls appear as concise hints; command output and reasoning stay hidden. Codex plugins are disabled.

zsh-autosuggestions and zsh-syntax-highlighting pause in Codex mode. zsh-vi-mode remains supported.

License

MIT

About

Codex, right in your Zsh.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages