rtk icon indicating copy to clipboard operation
rtk copied to clipboard

Add support/installation for Codex

Open art-shen opened this issue 9 months ago • 26 comments

Codex is the second major agentic CLI out there after Claude Code. Would be awesome to natively support it as well.

art-shen avatar Feb 17 '26 11:02 art-shen

Please!!!

samuelfaj avatar Mar 05 '26 04:03 samuelfaj

+1 NEED THIS!

VincentBurke avatar Mar 05 '26 06:03 VincentBurke

+1 !

dmpvost avatar Mar 05 '26 08:03 dmpvost

You can build a wrapper and add the the rules of codex to route to rtk.. its not perfect, but it can already work.

paulo-advent avatar Mar 05 '26 09:03 paulo-advent

Would this be acceptable ? https://github.com/rtk-ai/rtk/pull/377

Zacaria avatar Mar 06 '26 12:03 Zacaria

+1

yinjun1991 avatar Mar 08 '26 12:03 yinjun1991

+1

jerrywu001 avatar Mar 09 '26 02:03 jerrywu001

+1 need this

tokezooo avatar Mar 09 '26 09:03 tokezooo

+1

WildCake avatar Mar 09 '26 09:03 WildCake

+1

fly8848 avatar Mar 09 '26 14:03 fly8848

+1

awuzi avatar Mar 10 '26 18:03 awuzi

Please add Codex!

INTELGUARD-IO avatar Mar 16 '26 15:03 INTELGUARD-IO

Add please

ArtoriusN avatar Mar 16 '26 19:03 ArtoriusN

Proposed a solution: #642

The idea is:

  1. RTK patches Codex’s documented config surface (~/.codex/config.toml)
  2. RTK prepends an RTK-managed shim directory to the PATH used by Codex subprocesses
  3. selected commands resolve to RTK first
  4. RTK decides whether to rewrite or pass through
  5. Codex still sees the original command for rules / approval semantics

It also supports uninstall and limits PATH changes to Codex sessions only as mentioned in https://github.com/rtk-ai/rtk/pull/424#issuecomment-4042559166

JuncongHe avatar Mar 16 '26 20:03 JuncongHe

I just discovered this and given the token burn lately I need it for codex. Plz!

RickKukiela avatar Mar 17 '26 04:03 RickKukiela

please

mowandmow avatar Mar 17 '26 13:03 mowandmow

For me it's OK, codex is cheap enough, so please make sure Claude Code is fully supported first😄

yf-hk avatar Mar 17 '26 14:03 yf-hk

@yf-hk maybe used to be, but the token burn rate has sky rocketed recently :(

RickKukiela avatar Mar 17 '26 16:03 RickKukiela

I cloned @HeMuling feature branch for his pull request and built the rtk binary manually on my WSL2 Ubuntu installation and replaced the installed binary with the one I built. The codex feature installs and appears to work. So anyone waiting for this feature, at your own risk you can clone the PR source repo, checkout the feature branch, build it and replace your installed rtk binary.

RickKukiela avatar Mar 17 '26 17:03 RickKukiela

Thanks for testing on Linux! @RickKukiela

Fixed a macOS-specific issue.

Now the patched version works great on Mac codex (as shown below):

image

To those who may want to use this version:

git clone --branch 'feat(init)-codex-adapter' https://github.com/HeMuling/rtk.git
cd rtk
cargo build --release --locked
cargo install --path . --locked --force
rtk init --show --codex

make sure:

  • git is installed
  • Rust/Cargo is installed
  • no local checkout already exists

JuncongHe avatar Mar 17 '26 19:03 JuncongHe