overcodex 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- overcodex-0.1.0/.gitignore +7 -0
- overcodex-0.1.0/LICENSE +21 -0
- overcodex-0.1.0/PKG-INFO +186 -0
- overcodex-0.1.0/README.md +166 -0
- overcodex-0.1.0/bin/codex-swap +320 -0
- overcodex-0.1.0/codex/AGENTS-ULTRACODE.md +54 -0
- overcodex-0.1.0/config/hooks-block.toml.tpl +42 -0
- overcodex-0.1.0/hooks/overcodex-ctx-lib.sh +66 -0
- overcodex-0.1.0/hooks/overcodex-ctx-watch.sh +94 -0
- overcodex-0.1.0/hooks/overcodex-handoff-inject.sh +94 -0
- overcodex-0.1.0/hooks/overcodex-notify.sh +64 -0
- overcodex-0.1.0/hooks/overcodex-precompact-offer.sh +40 -0
- overcodex-0.1.0/install.sh +448 -0
- overcodex-0.1.0/prompts/handoff-cancel.md +23 -0
- overcodex-0.1.0/prompts/handoff-status.md +26 -0
- overcodex-0.1.0/prompts/handoff.md +57 -0
- overcodex-0.1.0/pyproject.toml +69 -0
- overcodex-0.1.0/shell/zshrc-snippet.sh +24 -0
- overcodex-0.1.0/src/overcodex/__init__.py +4 -0
- overcodex-0.1.0/src/overcodex/cli.py +53 -0
- overcodex-0.1.0/uninstall.sh +196 -0
overcodex-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 arthur-bump-pm
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
overcodex-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: overcodex
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Codex CLI, overclocked — cold multi-account switching, context-threshold handoff, instrumented statusline, and AGENTS.md routing policy for multi-agent workflows
|
|
5
|
+
Project-URL: Homepage, https://github.com/arthur-bump-pm/overcodex
|
|
6
|
+
Project-URL: Repository, https://github.com/arthur-bump-pm/overcodex
|
|
7
|
+
Project-URL: Issues, https://github.com/arthur-bump-pm/overcodex/issues
|
|
8
|
+
Author: arthur-bump-pm
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: cli,codex,codex-cli,dotfiles
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: MacOS
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Requires-Python: >=3.9
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# overcodex
|
|
22
|
+
|
|
23
|
+
[](https://pypi.org/project/overcodex/)
|
|
24
|
+
[](LICENSE)
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
**Codex CLI, overclocked.** Cold-switch between Codex accounts, hand off to a fresh session with `/prompts:handoff` before context fills up, watch usage on the statusline, and route multi-agent work with an AGENTS.md policy:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
codex-swap work # register/list accounts, then switch — restart required
|
|
31
|
+
/prompts:handoff # package this session's state, resume fresh next launch
|
|
32
|
+
|
|
33
|
+
ctx [████░░░░░░] 42% remaining | 5h limit 71% | weekly limit 18%
|
|
34
|
+
└ get_context_remaining └ native Codex statusline items
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pipx install overcodex && overcodex install
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
> **Fresh machine?** If you get `command not found: overcodex`, pipx's bin folder isn't on your PATH yet — run `pipx ensurepath && source ~/.zshrc`, then `overcodex install`. (Use `source`, not `exec zsh`: replacing the shell swallows any commands you pasted after it.)
|
|
44
|
+
|
|
45
|
+
Then register your accounts (once, per account):
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
codex-swap add work # creates an isolated account home + links shared config
|
|
49
|
+
codex-swap add personal # then log in to each: CODEX_HOME=~/.codex-accounts/work codex login
|
|
50
|
+
codex-swap work # cold switch: writes auth.json, then restart codex
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Start a **new** Codex CLI session (hooks and AGENTS.md load at session start) and confirm the statusline shows the context/limit meters. Run `/prompts:handoff` inside Codex to hand off before you hit auto-compact.
|
|
54
|
+
|
|
55
|
+
<details>
|
|
56
|
+
<summary>Other install methods, requirements, upgrading</summary>
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# uv
|
|
60
|
+
uv tool install overcodex && overcodex install
|
|
61
|
+
|
|
62
|
+
# from source
|
|
63
|
+
git clone https://github.com/arthur-bump-pm/overcodex && cd overcodex && ./install.sh
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Or paste this into any Codex CLI session and let it install itself:
|
|
67
|
+
|
|
68
|
+
> Install overcodex (https://github.com/arthur-bump-pm/overcodex) on this machine, fix anything its preflight complains about, and tell me what post-install steps I need to do myself.
|
|
69
|
+
|
|
70
|
+
**Requirements:** macOS, zsh, `pipx` or `uv`, a Codex CLI install (`codex --version`). No keychain daemon and no background credential engine — cold switching is just isolated `$CODEX_HOME` directories, one per account.
|
|
71
|
+
|
|
72
|
+
**Upgrade:** `pipx upgrade overcodex && overcodex install`
|
|
73
|
+
|
|
74
|
+
**Uninstall:** `overcodex uninstall` — removes exactly what install added (backed up); each account's isolated `$CODEX_HOME` copy survives untouched.
|
|
75
|
+
|
|
76
|
+
The installer is idempotent and conservative: timestamped backups of everything it touches, additive edits to `config.toml` (never overwrites an existing `hooks` or `status_line` key), re-running is a no-op.
|
|
77
|
+
|
|
78
|
+
</details>
|
|
79
|
+
|
|
80
|
+
## What you get
|
|
81
|
+
|
|
82
|
+
### `codex-swap` — cold account switching
|
|
83
|
+
Each account gets its own isolated `CODEX_HOME` (a separate `auth.json`, never a copied/overwritten one — refresh tokens can be single-use across copies, so isolation is the only safe design). `codex-swap <account>` points the shell at that directory and tells you to restart. **This is a cold switch**: any Codex session already running keeps its old credentials until you quit and relaunch it. There is no hot mid-session swap here — if you need that, it's overclaude's `/swap` for Claude Code, not this.
|
|
84
|
+
|
|
85
|
+
### `/prompts:handoff` — escape context bloat, keep the thread
|
|
86
|
+
|
|
87
|
+
```mermaid
|
|
88
|
+
flowchart LR
|
|
89
|
+
A[Context fills up] --> B[get_context_remaining / statusline flags it]
|
|
90
|
+
B --> C[You run /prompts:handoff]
|
|
91
|
+
C --> D[Codex packages goals, state, next steps]
|
|
92
|
+
D --> E[Session ends]
|
|
93
|
+
E --> F[SessionStart hook injects the package on next launch]
|
|
94
|
+
F --> G[Fresh session, ctx near zero]
|
|
95
|
+
G --> A
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
You lose the token bloat, not the thread. Combine with a `codex-swap` restart when you're also switching accounts.
|
|
99
|
+
|
|
100
|
+
### Statusline
|
|
101
|
+
Codex's native statusline already covers the meters — run `/statusline` inside Codex and enable the context, five-hour, and weekly items (or set `tui.status_line` in config.toml yourself). The kit deliberately ships no statusline config: the native picker is authoritative, and the exact config-key vocabulary is undocumented — nothing to clobber, nothing to break.
|
|
102
|
+
|
|
103
|
+
### AGENTS.md routing policy
|
|
104
|
+
A policy block appended to `$CODEX_HOME/AGENTS.md` (loaded globally, then project `AGENTS.md` files concatenate root-down): bulk work rides cheap models/effort, verification rides a stronger reasoning tier, only final judgment spends the top tier. Routing table, hard floors, escalation rules included.
|
|
105
|
+
|
|
106
|
+
### Hooks + prompts
|
|
107
|
+
`PreToolUse`/`PostToolUse`/`SessionStart`/`Stop` hooks wired via an inline `[hooks]` table in `config.toml`, plus `/prompts:*` markdown prompts under `$CODEX_HOME/prompts/` (YAML frontmatter, `$1`-`$9` placeholders) for the handoff flow and other repeatable operations.
|
|
108
|
+
|
|
109
|
+
## Cheat sheet
|
|
110
|
+
|
|
111
|
+
| Command | Effect |
|
|
112
|
+
|---|---|
|
|
113
|
+
| `codex-swap add <name>` | Create an isolated home under `~/.codex-accounts/<name>` and link shared config; log in to it with the printed `CODEX_HOME=... codex login` |
|
|
114
|
+
| `codex-swap <name>` | Point `$CODEX_HOME` at that account's isolated store — **restart codex after** |
|
|
115
|
+
| `codex-swap list` | Show registered accounts and which is active |
|
|
116
|
+
| `/prompts:handoff` | Package this session's state; auto-injected on next launch |
|
|
117
|
+
| `overcodex install` | (Re)install/refresh the kit — idempotent |
|
|
118
|
+
| `overcodex uninstall` | Remove exactly what install added |
|
|
119
|
+
| `overcodex path` | Print the bundled payload directory |
|
|
120
|
+
|
|
121
|
+
Or skip memorizing and **paste a prompt**:
|
|
122
|
+
|
|
123
|
+
| Paste into Codex CLI | Runs |
|
|
124
|
+
|---|---|
|
|
125
|
+
| "Hand off — context is filling up" | `/prompts:handoff` |
|
|
126
|
+
| "Switch me to my work account" | walks you through `codex-swap work` + the restart |
|
|
127
|
+
| "Install overcodex on this machine" | the whole install flow (works before the kit exists) |
|
|
128
|
+
| "Upgrade overcodex and refresh the hooks" | `pipx upgrade overcodex && overcodex install` |
|
|
129
|
+
|
|
130
|
+
## How it fits together
|
|
131
|
+
|
|
132
|
+
```mermaid
|
|
133
|
+
flowchart TD
|
|
134
|
+
AH[AGENTS.md routing policy] --> HK[config.toml hooks table: SessionStart/UserPromptSubmit/Stop]
|
|
135
|
+
HK --> PR[/prompts:handoff and friends]
|
|
136
|
+
PR --> CS[codex-swap: isolated CODEX_HOME per account]
|
|
137
|
+
CS --> RS[Cold restart adopts the new account]
|
|
138
|
+
SL[Statusline: get_context_remaining + native limit items] --> HK
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
<details>
|
|
142
|
+
<summary>Caveats worth knowing</summary>
|
|
143
|
+
|
|
144
|
+
- **Cold switch only.** `codex-swap` changes which `$CODEX_HOME` the shell points at; a session already running keeps reading its original `auth.json` until you quit and relaunch. There is no live/hot swap in this kit.
|
|
145
|
+
- **Refresh-token isolation is the whole point.** Codex's refresh tokens can be single-use across copies of the same credential (open upstream bug reports) — so accounts are never file-swapped or symlinked into a shared `auth.json`. Each account's `CODEX_HOME` refreshes its own token in place, permanently separate from the others.
|
|
146
|
+
- **Hooks run arbitrary shell on your events.** Review `hooks/*.sh` before installing on a machine you don't fully trust, same as any hook-based tool.
|
|
147
|
+
- **Sessions are sqlite, not JSONL.** `experimental_thread_store` keeps history in `sqlite_home` (e.g. `logs_2.sqlite`) — `codex resume --last` / `codex resume <id>` read from there, not from plain log files.
|
|
148
|
+
- Enterprise configs can set `allow_managed_hooks_only`, which blocks this kit's hooks from installing — check that first if hooks don't seem to load.
|
|
149
|
+
|
|
150
|
+
</details>
|
|
151
|
+
|
|
152
|
+
<details>
|
|
153
|
+
<summary>Components (file → destination)</summary>
|
|
154
|
+
|
|
155
|
+
| File | Installs to | Role |
|
|
156
|
+
|---|---|---|
|
|
157
|
+
| `bin/codex-swap` | `~/.local/bin/` | Cold account switcher: register, list, point `$CODEX_HOME` at an account |
|
|
158
|
+
| `hooks/*.sh` | `$CODEX_HOME/hooks/` | SessionStart / UserPromptSubmit / Stop handlers |
|
|
159
|
+
| `config/hooks-block.toml.tpl` | inline `[hooks]` table appended to `config.toml` (markers) | Hook wiring — only if no `hooks` key exists |
|
|
160
|
+
| `codex/AGENTS-ULTRACODE.md` | appended to `$CODEX_HOME/AGENTS.md` (markers) | Model/effort routing policy |
|
|
161
|
+
| `prompts/*.md` | `$CODEX_HOME/prompts/` | `/prompts:*` custom prompts (handoff, etc.) |
|
|
162
|
+
|
|
163
|
+
| `shell/zshrc-snippet.sh` | `~/.zshrc` (markers) | `codex-swap` PATH/alias wiring |
|
|
164
|
+
|
|
165
|
+
</details>
|
|
166
|
+
|
|
167
|
+
<details>
|
|
168
|
+
<summary>Maintainer workflow</summary>
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
./sync.sh # live setup -> repo: scrub-gated diff, commit, push
|
|
172
|
+
./sync.sh --release # + version bump + GitHub release -> PyPI (trusted publishing)
|
|
173
|
+
./sync.sh --dry-run # preview either
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
A plain `git push` updates git installs only — **PyPI users get changes only via releases**. The scrub gate aborts any commit whose diff contains usernames, emails, or `/Users/…` paths. See `CLAUDE.md` for the full protocol.
|
|
177
|
+
|
|
178
|
+
</details>
|
|
179
|
+
|
|
180
|
+
## Credits
|
|
181
|
+
|
|
182
|
+
overcodex is the Codex CLI sibling of **[overclaude](https://github.com/arthur-bump-pm/overclaude)** (same author, same packaging shape) — overclaude does hot account swapping for Claude Code; Codex CLI's credential model only allows a cold switch, so this kit is built around that constraint instead of hiding it.
|
|
183
|
+
|
|
184
|
+
## License
|
|
185
|
+
|
|
186
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# overcodex
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/overcodex/)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
**Codex CLI, overclocked.** Cold-switch between Codex accounts, hand off to a fresh session with `/prompts:handoff` before context fills up, watch usage on the statusline, and route multi-agent work with an AGENTS.md policy:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
codex-swap work # register/list accounts, then switch — restart required
|
|
11
|
+
/prompts:handoff # package this session's state, resume fresh next launch
|
|
12
|
+
|
|
13
|
+
ctx [████░░░░░░] 42% remaining | 5h limit 71% | weekly limit 18%
|
|
14
|
+
└ get_context_remaining └ native Codex statusline items
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pipx install overcodex && overcodex install
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
> **Fresh machine?** If you get `command not found: overcodex`, pipx's bin folder isn't on your PATH yet — run `pipx ensurepath && source ~/.zshrc`, then `overcodex install`. (Use `source`, not `exec zsh`: replacing the shell swallows any commands you pasted after it.)
|
|
24
|
+
|
|
25
|
+
Then register your accounts (once, per account):
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
codex-swap add work # creates an isolated account home + links shared config
|
|
29
|
+
codex-swap add personal # then log in to each: CODEX_HOME=~/.codex-accounts/work codex login
|
|
30
|
+
codex-swap work # cold switch: writes auth.json, then restart codex
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Start a **new** Codex CLI session (hooks and AGENTS.md load at session start) and confirm the statusline shows the context/limit meters. Run `/prompts:handoff` inside Codex to hand off before you hit auto-compact.
|
|
34
|
+
|
|
35
|
+
<details>
|
|
36
|
+
<summary>Other install methods, requirements, upgrading</summary>
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# uv
|
|
40
|
+
uv tool install overcodex && overcodex install
|
|
41
|
+
|
|
42
|
+
# from source
|
|
43
|
+
git clone https://github.com/arthur-bump-pm/overcodex && cd overcodex && ./install.sh
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Or paste this into any Codex CLI session and let it install itself:
|
|
47
|
+
|
|
48
|
+
> Install overcodex (https://github.com/arthur-bump-pm/overcodex) on this machine, fix anything its preflight complains about, and tell me what post-install steps I need to do myself.
|
|
49
|
+
|
|
50
|
+
**Requirements:** macOS, zsh, `pipx` or `uv`, a Codex CLI install (`codex --version`). No keychain daemon and no background credential engine — cold switching is just isolated `$CODEX_HOME` directories, one per account.
|
|
51
|
+
|
|
52
|
+
**Upgrade:** `pipx upgrade overcodex && overcodex install`
|
|
53
|
+
|
|
54
|
+
**Uninstall:** `overcodex uninstall` — removes exactly what install added (backed up); each account's isolated `$CODEX_HOME` copy survives untouched.
|
|
55
|
+
|
|
56
|
+
The installer is idempotent and conservative: timestamped backups of everything it touches, additive edits to `config.toml` (never overwrites an existing `hooks` or `status_line` key), re-running is a no-op.
|
|
57
|
+
|
|
58
|
+
</details>
|
|
59
|
+
|
|
60
|
+
## What you get
|
|
61
|
+
|
|
62
|
+
### `codex-swap` — cold account switching
|
|
63
|
+
Each account gets its own isolated `CODEX_HOME` (a separate `auth.json`, never a copied/overwritten one — refresh tokens can be single-use across copies, so isolation is the only safe design). `codex-swap <account>` points the shell at that directory and tells you to restart. **This is a cold switch**: any Codex session already running keeps its old credentials until you quit and relaunch it. There is no hot mid-session swap here — if you need that, it's overclaude's `/swap` for Claude Code, not this.
|
|
64
|
+
|
|
65
|
+
### `/prompts:handoff` — escape context bloat, keep the thread
|
|
66
|
+
|
|
67
|
+
```mermaid
|
|
68
|
+
flowchart LR
|
|
69
|
+
A[Context fills up] --> B[get_context_remaining / statusline flags it]
|
|
70
|
+
B --> C[You run /prompts:handoff]
|
|
71
|
+
C --> D[Codex packages goals, state, next steps]
|
|
72
|
+
D --> E[Session ends]
|
|
73
|
+
E --> F[SessionStart hook injects the package on next launch]
|
|
74
|
+
F --> G[Fresh session, ctx near zero]
|
|
75
|
+
G --> A
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
You lose the token bloat, not the thread. Combine with a `codex-swap` restart when you're also switching accounts.
|
|
79
|
+
|
|
80
|
+
### Statusline
|
|
81
|
+
Codex's native statusline already covers the meters — run `/statusline` inside Codex and enable the context, five-hour, and weekly items (or set `tui.status_line` in config.toml yourself). The kit deliberately ships no statusline config: the native picker is authoritative, and the exact config-key vocabulary is undocumented — nothing to clobber, nothing to break.
|
|
82
|
+
|
|
83
|
+
### AGENTS.md routing policy
|
|
84
|
+
A policy block appended to `$CODEX_HOME/AGENTS.md` (loaded globally, then project `AGENTS.md` files concatenate root-down): bulk work rides cheap models/effort, verification rides a stronger reasoning tier, only final judgment spends the top tier. Routing table, hard floors, escalation rules included.
|
|
85
|
+
|
|
86
|
+
### Hooks + prompts
|
|
87
|
+
`PreToolUse`/`PostToolUse`/`SessionStart`/`Stop` hooks wired via an inline `[hooks]` table in `config.toml`, plus `/prompts:*` markdown prompts under `$CODEX_HOME/prompts/` (YAML frontmatter, `$1`-`$9` placeholders) for the handoff flow and other repeatable operations.
|
|
88
|
+
|
|
89
|
+
## Cheat sheet
|
|
90
|
+
|
|
91
|
+
| Command | Effect |
|
|
92
|
+
|---|---|
|
|
93
|
+
| `codex-swap add <name>` | Create an isolated home under `~/.codex-accounts/<name>` and link shared config; log in to it with the printed `CODEX_HOME=... codex login` |
|
|
94
|
+
| `codex-swap <name>` | Point `$CODEX_HOME` at that account's isolated store — **restart codex after** |
|
|
95
|
+
| `codex-swap list` | Show registered accounts and which is active |
|
|
96
|
+
| `/prompts:handoff` | Package this session's state; auto-injected on next launch |
|
|
97
|
+
| `overcodex install` | (Re)install/refresh the kit — idempotent |
|
|
98
|
+
| `overcodex uninstall` | Remove exactly what install added |
|
|
99
|
+
| `overcodex path` | Print the bundled payload directory |
|
|
100
|
+
|
|
101
|
+
Or skip memorizing and **paste a prompt**:
|
|
102
|
+
|
|
103
|
+
| Paste into Codex CLI | Runs |
|
|
104
|
+
|---|---|
|
|
105
|
+
| "Hand off — context is filling up" | `/prompts:handoff` |
|
|
106
|
+
| "Switch me to my work account" | walks you through `codex-swap work` + the restart |
|
|
107
|
+
| "Install overcodex on this machine" | the whole install flow (works before the kit exists) |
|
|
108
|
+
| "Upgrade overcodex and refresh the hooks" | `pipx upgrade overcodex && overcodex install` |
|
|
109
|
+
|
|
110
|
+
## How it fits together
|
|
111
|
+
|
|
112
|
+
```mermaid
|
|
113
|
+
flowchart TD
|
|
114
|
+
AH[AGENTS.md routing policy] --> HK[config.toml hooks table: SessionStart/UserPromptSubmit/Stop]
|
|
115
|
+
HK --> PR[/prompts:handoff and friends]
|
|
116
|
+
PR --> CS[codex-swap: isolated CODEX_HOME per account]
|
|
117
|
+
CS --> RS[Cold restart adopts the new account]
|
|
118
|
+
SL[Statusline: get_context_remaining + native limit items] --> HK
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
<details>
|
|
122
|
+
<summary>Caveats worth knowing</summary>
|
|
123
|
+
|
|
124
|
+
- **Cold switch only.** `codex-swap` changes which `$CODEX_HOME` the shell points at; a session already running keeps reading its original `auth.json` until you quit and relaunch. There is no live/hot swap in this kit.
|
|
125
|
+
- **Refresh-token isolation is the whole point.** Codex's refresh tokens can be single-use across copies of the same credential (open upstream bug reports) — so accounts are never file-swapped or symlinked into a shared `auth.json`. Each account's `CODEX_HOME` refreshes its own token in place, permanently separate from the others.
|
|
126
|
+
- **Hooks run arbitrary shell on your events.** Review `hooks/*.sh` before installing on a machine you don't fully trust, same as any hook-based tool.
|
|
127
|
+
- **Sessions are sqlite, not JSONL.** `experimental_thread_store` keeps history in `sqlite_home` (e.g. `logs_2.sqlite`) — `codex resume --last` / `codex resume <id>` read from there, not from plain log files.
|
|
128
|
+
- Enterprise configs can set `allow_managed_hooks_only`, which blocks this kit's hooks from installing — check that first if hooks don't seem to load.
|
|
129
|
+
|
|
130
|
+
</details>
|
|
131
|
+
|
|
132
|
+
<details>
|
|
133
|
+
<summary>Components (file → destination)</summary>
|
|
134
|
+
|
|
135
|
+
| File | Installs to | Role |
|
|
136
|
+
|---|---|---|
|
|
137
|
+
| `bin/codex-swap` | `~/.local/bin/` | Cold account switcher: register, list, point `$CODEX_HOME` at an account |
|
|
138
|
+
| `hooks/*.sh` | `$CODEX_HOME/hooks/` | SessionStart / UserPromptSubmit / Stop handlers |
|
|
139
|
+
| `config/hooks-block.toml.tpl` | inline `[hooks]` table appended to `config.toml` (markers) | Hook wiring — only if no `hooks` key exists |
|
|
140
|
+
| `codex/AGENTS-ULTRACODE.md` | appended to `$CODEX_HOME/AGENTS.md` (markers) | Model/effort routing policy |
|
|
141
|
+
| `prompts/*.md` | `$CODEX_HOME/prompts/` | `/prompts:*` custom prompts (handoff, etc.) |
|
|
142
|
+
|
|
143
|
+
| `shell/zshrc-snippet.sh` | `~/.zshrc` (markers) | `codex-swap` PATH/alias wiring |
|
|
144
|
+
|
|
145
|
+
</details>
|
|
146
|
+
|
|
147
|
+
<details>
|
|
148
|
+
<summary>Maintainer workflow</summary>
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
./sync.sh # live setup -> repo: scrub-gated diff, commit, push
|
|
152
|
+
./sync.sh --release # + version bump + GitHub release -> PyPI (trusted publishing)
|
|
153
|
+
./sync.sh --dry-run # preview either
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
A plain `git push` updates git installs only — **PyPI users get changes only via releases**. The scrub gate aborts any commit whose diff contains usernames, emails, or `/Users/…` paths. See `CLAUDE.md` for the full protocol.
|
|
157
|
+
|
|
158
|
+
</details>
|
|
159
|
+
|
|
160
|
+
## Credits
|
|
161
|
+
|
|
162
|
+
overcodex is the Codex CLI sibling of **[overclaude](https://github.com/arthur-bump-pm/overclaude)** (same author, same packaging shape) — overclaude does hot account swapping for Claude Code; Codex CLI's credential model only allows a cold switch, so this kit is built around that constraint instead of hiding it.
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
MIT — see [LICENSE](LICENSE).
|