Skip to content

aymenbouferroum/codex-session-picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codex Session Picker banner

Codex Session Picker · Interactive CLI to find & resume OpenAI Codex sessions fast.

Install · Usage · Troubleshooting · License


Overview

codexr is a tiny helper that scans ~/.codex/sessions and presents an interactive list (via fzf) showing timestamp, line count, size, and the full path of each .jsonl session. Choose with the arrow keys and hit Enter—we'll invoke:

codex -c experimental_resume="/full/path/to/rollout-....jsonl"

If fzf isn't installed, codexr falls back to a non‑interactive mode where you can resume the N-th newest session (default: newest).


Demo

codexr interactive demo


Requirements

  • Bash (>= 4)
  • GNU find, awk, wc, date
  • OpenAI Codex CLI installed & configured
  • Optional (recommended): fzf

Install fzf on Debian/Ubuntu:

sudo apt update && sudo apt install -y fzf

Installation

git clone https://github.com/<your-username>/codex-session-picker.git
cd codex-session-picker
chmod +x install.sh
./install.sh
# Then reload your shell
source ~/.bashrc   # or: source ~/.zshrc

This adds the codexr function to your shell profile.


Usage

Interactive picker (fzf):

codexr

Fallback (no fzf): resume the N‑th newest session (1 = newest):

codexr 2   # resume the 2nd newest
codexr 5   # resume the 5th newest

Troubleshooting

No sessions found
Ensure files exist under ~/.codex/sessions/**/rollout-*.jsonl.

date -d not supported
The script uses GNU date. On macOS, install coreutils (brew install coreutils).

Change preview content
Edit codexr.sh and modify the --preview command (e.g. tail -n 60head -n 50).


Development

  • codexr.sh: main function & listing logic
  • install.sh: appends a small source block to your shell rc file
  • assets/banner.png: repository banner
  • docs/demo.png: replace with a screenshot of your terminal

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages