@golba98/codexa 1.0.2 → 1.0.3
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.
- package/README.md +391 -94
- package/package.json +12 -7
- package/src/app.tsx +149 -117
- package/src/commands/handler.ts +4 -4
- package/src/config/buildInfo.ts +2 -2
- package/src/config/persistence.ts +10 -0
- package/src/config/settings.ts +7 -15
- package/src/config/updateCheckCache.ts +19 -1
- package/src/core/channel.ts +23 -0
- package/src/core/executables/codexExecutable.ts +1 -0
- package/src/core/executables/executableResolver.ts +61 -43
- package/src/core/launchContext.ts +33 -33
- package/src/core/process/processValidation.ts +9 -5
- package/src/core/providerLauncher/launcher.ts +59 -42
- package/src/core/updateCheck.ts +111 -95
- package/src/session/types.ts +2 -1
- package/src/ui/ActionRequiredBlock.tsx +5 -5
- package/src/ui/ActivityBars.tsx +3 -3
- package/src/ui/ActivityIndicator.tsx +6 -6
- package/src/ui/AgentBlock.tsx +6 -6
- package/src/ui/AnimatedStatusText.tsx +1 -1
- package/src/ui/AppShell.tsx +9 -24
- package/src/ui/AttachmentImportPanel.tsx +8 -8
- package/src/ui/AuthPanel.tsx +20 -20
- package/src/ui/BottomComposer.tsx +117 -78
- package/src/ui/DashCard.tsx +3 -3
- package/src/ui/Markdown.tsx +17 -17
- package/src/ui/ModelPickerScreen.tsx +10 -10
- package/src/ui/ModelReasoningPicker.tsx +14 -14
- package/src/ui/Panel.tsx +3 -3
- package/src/ui/PlanActionPicker.tsx +6 -6
- package/src/ui/PlanReviewPanel.tsx +8 -8
- package/src/ui/ProviderPicker.tsx +18 -18
- package/src/ui/RunFooter.tsx +3 -3
- package/src/ui/SelectionPanel.tsx +4 -4
- package/src/ui/SettingsPanel.tsx +8 -8
- package/src/ui/Spinner.tsx +1 -1
- package/src/ui/TextEntryPanel.tsx +10 -10
- package/src/ui/ThinkingBlock.tsx +8 -8
- package/src/ui/Timeline.tsx +21 -17
- package/src/ui/TopHeader.tsx +421 -293
- package/src/ui/TurnGroup.tsx +31 -31
- package/src/ui/UpdateAvailableCard.tsx +41 -0
- package/src/ui/UpdatePromptPanel.tsx +203 -0
- package/src/ui/focus.ts +3 -0
- package/src/ui/layout.ts +1 -1
- package/src/ui/logoVariants.ts +107 -0
- package/src/ui/modeDisplay.ts +12 -12
- package/src/ui/runtimeDisplay.ts +100 -0
- package/src/ui/theme.tsx +274 -395
- package/src/ui/timelineMeasure.ts +29 -19
- package/scripts/audit-codexa-capabilities.mjs +0 -466
- package/scripts/gen-build-info.mjs +0 -33
- package/scripts/smoke-terminal-bench.mjs +0 -35
- package/src/appRenderStability.test.ts +0 -131
- package/src/commands/handler.test.ts +0 -655
- package/src/config/launchArgs.test.ts +0 -189
- package/src/config/layeredConfig.test.ts +0 -143
- package/src/config/persistence.test.ts +0 -114
- package/src/config/runtimeConfig.test.ts +0 -218
- package/src/config/settings.test.ts +0 -155
- package/src/config/trustStore.test.ts +0 -29
- package/src/core/attachments.test.ts +0 -155
- package/src/core/auth/codexAuth.test.ts +0 -68
- package/src/core/cleanupFastFail.test.ts +0 -76
- package/src/core/codexExecArgs.test.ts +0 -195
- package/src/core/codexLaunch.test.ts +0 -205
- package/src/core/codexPrompt.test.ts +0 -252
- package/src/core/executables/codexExecutable.test.ts +0 -212
- package/src/core/executables/executableResolver.test.ts +0 -129
- package/src/core/executables/geminiExecutable.test.ts +0 -116
- package/src/core/executables/pathSanityScan.test.ts +0 -47
- package/src/core/githubDiagnostics.test.ts +0 -92
- package/src/core/hollowResponseFormat.test.ts +0 -58
- package/src/core/launchContext.test.ts +0 -157
- package/src/core/models/codexCapabilities.test.ts +0 -45
- package/src/core/models/codexModelCapabilities.test.ts +0 -246
- package/src/core/models/modelSpecs.test.ts +0 -283
- package/src/core/perf/renderDebug.test.ts +0 -230
- package/src/core/planStorage.test.ts +0 -143
- package/src/core/process/CommandRunner.test.ts +0 -105
- package/src/core/projectInstructions.test.ts +0 -50
- package/src/core/providerLauncher/launcher.test.ts +0 -238
- package/src/core/providerLauncher/registry.test.ts +0 -324
- package/src/core/providerLauncher/workspaceConfig.test.ts +0 -638
- package/src/core/providerRuntime/anthropic.test.ts +0 -1120
- package/src/core/providerRuntime/capabilityProfile.test.ts +0 -311
- package/src/core/providerRuntime/contextMetadata.test.ts +0 -468
- package/src/core/providerRuntime/gemini.test.ts +0 -437
- package/src/core/providerRuntime/lmstudio.test.ts +0 -168
- package/src/core/providerRuntime/local.test.ts +0 -787
- package/src/core/providerRuntime/registry.test.ts +0 -233
- package/src/core/providers/codexJsonStream.test.ts +0 -148
- package/src/core/providers/codexSubprocess.test.ts +0 -68
- package/src/core/providers/codexTranscript.test.ts +0 -284
- package/src/core/terminal/startupClear.test.ts +0 -55
- package/src/core/terminal/terminalCapabilities.test.ts +0 -93
- package/src/core/terminal/terminalControl.test.ts +0 -75
- package/src/core/terminal/terminalSanitize.test.ts +0 -22
- package/src/core/terminal/terminalSelection.test.ts +0 -42
- package/src/core/terminal/terminalTitle.test.ts +0 -328
- package/src/core/updateCheck.test.ts +0 -194
- package/src/core/workspaceActivity.test.ts +0 -163
- package/src/core/workspaceGuard.test.ts +0 -151
- package/src/core/workspaceRoot.test.ts +0 -23
- package/src/exec.test.ts +0 -13
- package/src/headless/execArgs.test.ts +0 -147
- package/src/headless/execRunner.test.ts +0 -436
- package/src/index.test.tsx +0 -620
- package/src/session/appSession.test.ts +0 -897
- package/src/session/chatLifecycle.test.ts +0 -64
- package/src/session/liveRenderScheduler.test.ts +0 -201
- package/src/session/planFlow.test.ts +0 -103
- package/src/session/planTranscript.test.ts +0 -65
- package/src/session/promptRunSchedule.test.ts +0 -36
- package/src/ui/ActivityIndicator.test.tsx +0 -58
- package/src/ui/AgentBlock.test.ts +0 -6
- package/src/ui/AnimatedStatusText.test.ts +0 -16
- package/src/ui/AppShell.test.tsx +0 -1776
- package/src/ui/AttachmentImportPanel.test.tsx +0 -204
- package/src/ui/BottomComposer.test.ts +0 -674
- package/src/ui/CodexLogo.tsx +0 -55
- package/src/ui/Markdown.test.ts +0 -157
- package/src/ui/ModelPickerProviderScope.test.tsx +0 -411
- package/src/ui/ModelPickerScreen.test.tsx +0 -99
- package/src/ui/ModelPickerState.test.tsx +0 -151
- package/src/ui/ModelReasoningPicker.test.tsx +0 -447
- package/src/ui/PlanReviewPanel.test.tsx +0 -267
- package/src/ui/PromptCardBorder.test.tsx +0 -161
- package/src/ui/ProviderPicker.test.tsx +0 -289
- package/src/ui/ProviderShortcut.test.tsx +0 -143
- package/src/ui/SettingsPanel.test.tsx +0 -233
- package/src/ui/Timeline.test.ts +0 -2067
- package/src/ui/TimelineNavigation.test.tsx +0 -201
- package/src/ui/TopHeader.test.tsx +0 -254
- package/src/ui/TurnGroup.test.tsx +0 -365
- package/src/ui/busyStatusAnimation.test.ts +0 -30
- package/src/ui/commandNormalize.test.ts +0 -142
- package/src/ui/diffRenderer.test.ts +0 -102
- package/src/ui/focusFlow.test.tsx +0 -1098
- package/src/ui/inputBuffer.test.ts +0 -151
- package/src/ui/layout.test.ts +0 -146
- package/src/ui/modeDisplay.test.ts +0 -42
- package/src/ui/runActivityView.test.ts +0 -89
- package/src/ui/runLifecycleView.test.tsx +0 -237
- package/src/ui/statusRenderIsolation.test.tsx +0 -654
- package/src/ui/terminalAnswerFormat.test.ts +0 -19
- package/src/ui/textLayout.test.ts +0 -18
- package/src/ui/themeFlow.test.ts +0 -53
- package/src/ui/timelineMeasureCache.test.ts +0 -986
package/README.md
CHANGED
|
@@ -1,31 +1,214 @@
|
|
|
1
1
|
# Codexa
|
|
2
2
|
|
|
3
|
-
A terminal UI (TUI) wrapper
|
|
3
|
+
A terminal UI (TUI) wrapper for coding agents. Built with TypeScript, Bun, and Ink (React for terminal rendering). Codexa routes to OpenAI Codex, Anthropic Claude Code, Google Gemini, and local models — giving each a richer interactive shell with scrollable history, workspace locking, layered TOML config, themes, and in-app slash commands.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Quick Start
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **codex CLI** — the underlying agent that Codexa wraps. Must be available on `PATH` or pointed to via `CODEX_EXECUTABLE`
|
|
7
|
+
Fastest path for normal users (OpenAI Codex route):
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
1. **Install Codex CLI** — see [Installing OpenAI Codex CLI](#installing-openai-codex-cli)
|
|
10
|
+
2. **Authenticate Codex** — run `codex` once and sign in with ChatGPT when prompted
|
|
11
|
+
3. **Install Codexa** — `npm install -g @golba98/codexa@latest`
|
|
12
|
+
4. **Run Codexa** — `cd <your-workspace> && codexa`
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
Verify both are ready:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
codex --version
|
|
18
|
+
codexa --version
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Requirements
|
|
22
|
+
|
|
23
|
+
| For... | Requires |
|
|
24
|
+
|--------|----------|
|
|
25
|
+
| Global install (`codexa` command) | Node.js + npm |
|
|
26
|
+
| Local dev / running from source | [Bun](https://bun.sh) |
|
|
27
|
+
| Codex/OpenAI route | Codex CLI installed and authenticated |
|
|
28
|
+
| Claude/Anthropic route | Claude Code CLI installed and authenticated |
|
|
29
|
+
| Gemini/Google route | Gemini CLI installed and authenticated |
|
|
30
|
+
| Local route | LM Studio (or any OpenAI-compatible server) |
|
|
31
|
+
|
|
32
|
+
## Installing Codexa
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
npm install -g @golba98/codexa@latest
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Verify:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
codexa --version
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Updating Codexa
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
npm install -g @golba98/codexa@latest
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
After updating, confirm the version:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
codexa --version
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If it still shows the old version, check which binary is active:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Linux/macOS
|
|
60
|
+
which -a codexa
|
|
61
|
+
|
|
62
|
+
# Windows PowerShell
|
|
63
|
+
Get-Command codexa
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
If the wrong binary is active, see [Troubleshooting](#troubleshooting).
|
|
67
|
+
|
|
68
|
+
## Tool Overview
|
|
69
|
+
|
|
70
|
+
Codexa and provider CLIs are independent tools with separate version numbers. Updating one does not update the others.
|
|
71
|
+
|
|
72
|
+
| Tool | Purpose | Version check | Update |
|
|
73
|
+
|------|---------|---------------|--------|
|
|
74
|
+
| Codex CLI | OpenAI coding agent | `codex --version` | `codex update` or reinstall |
|
|
75
|
+
| Claude Code CLI | Anthropic coding agent | `claude --version` | `npm install -g @anthropic-ai/claude-code@latest` |
|
|
76
|
+
| Codexa | TUI wrapper / workspace experience | `codexa --version` | `npm install -g @golba98/codexa@latest` |
|
|
77
|
+
|
|
78
|
+
## Provider CLI Setup
|
|
79
|
+
|
|
80
|
+
Codexa can route to multiple providers. Each provider CLI must be installed and authenticated separately — Codexa does not manage provider authentication.
|
|
81
|
+
|
|
82
|
+
### Installing OpenAI Codex CLI
|
|
83
|
+
|
|
84
|
+
**Standalone (macOS/Linux):**
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
curl -fsSL https://chatgpt.com/codex/install.sh | sh
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Standalone (Windows):**
|
|
13
91
|
|
|
14
92
|
```powershell
|
|
15
|
-
|
|
16
|
-
|
|
93
|
+
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**npm (all platforms):**
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
npm install -g @openai/codex
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Homebrew (macOS):**
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
brew install --cask codex
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
After installing, run `codex` once and sign in with ChatGPT when prompted, or configure an API key for API key auth.
|
|
109
|
+
|
|
110
|
+
> Codexa does not manage Codex authentication. The Codex route requires an already-authenticated Codex CLI.
|
|
111
|
+
|
|
112
|
+
**Updating Codex CLI:**
|
|
113
|
+
|
|
114
|
+
| Install method | Update command |
|
|
115
|
+
|----------------|----------------|
|
|
116
|
+
| Standalone macOS/Linux | Rerun the `curl` installer |
|
|
117
|
+
| Standalone Windows | Rerun the PowerShell installer |
|
|
118
|
+
| npm | `npm install -g @openai/codex@latest` |
|
|
119
|
+
| Homebrew | `brew upgrade --cask codex` |
|
|
120
|
+
|
|
121
|
+
Preferred self-update (when supported): `codex update`
|
|
122
|
+
|
|
123
|
+
### Installing Claude Code CLI
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
npm install -g @anthropic-ai/claude-code
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Verify:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
claude --version
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Authenticate — run `claude` once and sign in when prompted:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
claude
|
|
17
139
|
```
|
|
18
140
|
|
|
19
|
-
|
|
141
|
+
> Codexa does not manage Claude authentication. The Claude route requires an already-authenticated Claude Code CLI. Codexa routes to the `claude` executable — make sure it is on your PATH and working before switching to the Anthropic provider in Codexa.
|
|
20
142
|
|
|
21
|
-
|
|
143
|
+
**Updating Claude Code CLI:**
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
npm install -g @anthropic-ai/claude-code@latest
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Installing Gemini CLI
|
|
150
|
+
|
|
151
|
+
Codexa routes to the `gemini` executable. Install the Gemini CLI separately and authenticate per Google's instructions. Once installed and authenticated, Codexa can use it without additional configuration.
|
|
152
|
+
|
|
153
|
+
If the Gemini executable is not on PATH or has a non-standard name, specify it explicitly:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# Environment variable
|
|
157
|
+
export GEMINI_EXECUTABLE="/path/to/gemini"
|
|
158
|
+
|
|
159
|
+
# or in .codex/config.toml
|
|
160
|
+
gemini_command_path = "/path/to/gemini"
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Using Local Models (LM Studio)
|
|
164
|
+
|
|
165
|
+
Codexa can route the Local provider through any OpenAI-compatible server.
|
|
166
|
+
|
|
167
|
+
1. Start LM Studio and load a model.
|
|
168
|
+
2. Enable the LM Studio local server.
|
|
169
|
+
3. Confirm the endpoint is `http://localhost:1234/v1`.
|
|
170
|
+
4. Open Codexa's provider picker with `/providers`.
|
|
171
|
+
5. Select `Local`, refresh models if needed, then choose `Use in Codexa`.
|
|
172
|
+
|
|
173
|
+
Environment variable configuration:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
export CODEXA_LOCAL_BASE_URL="http://localhost:1234/v1"
|
|
177
|
+
export CODEXA_LOCAL_API_KEY="lm-studio"
|
|
178
|
+
export CODEXA_LOCAL_MODEL="google/gemma-4-26b-a4b"
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Workspace provider config in `.codexa/providers.json`:
|
|
182
|
+
|
|
183
|
+
```json
|
|
184
|
+
{
|
|
185
|
+
"providers": {
|
|
186
|
+
"local": {
|
|
187
|
+
"enabled": true,
|
|
188
|
+
"type": "openai-compatible",
|
|
189
|
+
"base_url": "http://localhost:1234/v1",
|
|
190
|
+
"api_key": "lm-studio",
|
|
191
|
+
"default_model": "google/gemma-4-26b-a4b",
|
|
192
|
+
"models": {
|
|
193
|
+
"google/gemma-4-26b-a4b": {
|
|
194
|
+
"contextLength": 8192
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
`OPENAI_BASE_URL`, `OPENAI_API_BASE`, and `OPENAI_API_KEY` are also accepted for the Local provider only. They do not redirect other routes.
|
|
203
|
+
|
|
204
|
+
## Running Codexa
|
|
22
205
|
|
|
23
206
|
### Interactive mode
|
|
24
207
|
|
|
25
|
-
Launch from the directory you want
|
|
208
|
+
Launch from the directory you want as the workspace:
|
|
26
209
|
|
|
27
|
-
```
|
|
28
|
-
cd
|
|
210
|
+
```bash
|
|
211
|
+
cd <your-workspace>
|
|
29
212
|
codexa
|
|
30
213
|
```
|
|
31
214
|
|
|
@@ -43,7 +226,7 @@ The session is locked to the directory Codexa was launched from.
|
|
|
43
226
|
|
|
44
227
|
Non-flag arguments are sent as an initial prompt on startup:
|
|
45
228
|
|
|
46
|
-
```
|
|
229
|
+
```bash
|
|
47
230
|
codexa "explain this codebase"
|
|
48
231
|
codexa --profile review --model gpt-5.4 "review src/app.tsx"
|
|
49
232
|
```
|
|
@@ -52,7 +235,7 @@ codexa --profile review --model gpt-5.4 "review src/app.tsx"
|
|
|
52
235
|
|
|
53
236
|
Run a single prompt non-interactively and exit:
|
|
54
237
|
|
|
55
|
-
```
|
|
238
|
+
```bash
|
|
56
239
|
codexa exec "refactor src/utils.ts to use async/await"
|
|
57
240
|
codexa exec --model gpt-5.4-mini --reasoning low "summarize changes in HEAD"
|
|
58
241
|
codexa exec --timing "run the test suite and fix failures"
|
|
@@ -117,6 +300,7 @@ Type `/` in the composer to access in-app commands. Key commands:
|
|
|
117
300
|
| `/workspace` | Show locked workspace path |
|
|
118
301
|
| `/workspace relaunch <path>` | Restart TUI in another directory |
|
|
119
302
|
| `/auth` · `/auth status` | Auth panel or status probe |
|
|
303
|
+
| `/update check` | Check npm registry for a newer Codexa version |
|
|
120
304
|
| `/mouse` | Toggle mouse mode (wheel scroll vs. native selection) |
|
|
121
305
|
| `/verbose` | Toggle verbose output |
|
|
122
306
|
| `/copy` | Copy last response to clipboard |
|
|
@@ -153,7 +337,7 @@ writable_roots = ["/path/to/dir"]
|
|
|
153
337
|
|
|
154
338
|
# Codexa-specific
|
|
155
339
|
[codexa]
|
|
156
|
-
backend = "codex-subprocess" # codex-subprocess (
|
|
340
|
+
backend = "codex-subprocess" # codex-subprocess (default)
|
|
157
341
|
mode = "full-auto" # suggest | auto-edit | full-auto
|
|
158
342
|
|
|
159
343
|
# Gemini CLI path (if using Gemini)
|
|
@@ -175,77 +359,15 @@ sandbox_mode = "read-only"
|
|
|
175
359
|
|
|
176
360
|
**Example with CLI overrides:**
|
|
177
361
|
|
|
178
|
-
```
|
|
362
|
+
```bash
|
|
179
363
|
codexa --profile review --config model="gpt-5.4" --config codexa.mode="suggest"
|
|
180
364
|
```
|
|
181
365
|
|
|
182
|
-
### Gemini CLI Executable
|
|
183
|
-
|
|
184
|
-
Codexa resolves the Gemini executable directly by path rather than through shell aliases or wrappers. To specify the Gemini CLI location:
|
|
185
|
-
|
|
186
|
-
```powershell
|
|
187
|
-
$env:GEMINI_EXECUTABLE = "C:\Users\you\AppData\Roaming\npm\gemini.cmd"
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
or in `config.toml`:
|
|
191
|
-
|
|
192
|
-
```toml
|
|
193
|
-
gemini_command_path = "C:\\Users\\you\\AppData\\Roaming\\npm\\gemini.cmd"
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
### Using local models with LM Studio
|
|
197
|
-
|
|
198
|
-
Codexa can route the Local provider through OpenAI-compatible local servers such as LM Studio.
|
|
199
|
-
|
|
200
|
-
1. Start LM Studio.
|
|
201
|
-
2. Load a model.
|
|
202
|
-
3. Enable the LM Studio local server.
|
|
203
|
-
4. Confirm the endpoint is `http://localhost:1234/v1`.
|
|
204
|
-
5. Open Codexa's provider picker with `/providers`.
|
|
205
|
-
6. Select `Local`, refresh models if needed, then choose `Use in Codexa`.
|
|
206
|
-
|
|
207
|
-
Codexa checks `GET http://localhost:1234/v1/models` and uses the returned model IDs in the Local model picker. If LM Studio returns `google/gemma-4-26b-a4b`, that model appears as a selectable Local model.
|
|
208
|
-
|
|
209
|
-
Context length is detected separately from model discovery. Codexa first looks for context metadata returned by the provider, then CLI metadata, then an explicit workspace config override, then exact known registry entries. If no trusted source provides a limit, Codexa shows `Context: Unknown` and does not calculate a context percentage.
|
|
210
|
-
|
|
211
|
-
Environment variable configuration:
|
|
212
|
-
|
|
213
|
-
```powershell
|
|
214
|
-
$env:CODEXA_LOCAL_BASE_URL = "http://localhost:1234/v1"
|
|
215
|
-
$env:CODEXA_LOCAL_API_KEY = "lm-studio"
|
|
216
|
-
$env:CODEXA_LOCAL_MODEL = "google/gemma-4-26b-a4b"
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
Workspace provider configuration in `.codexa/providers.json`:
|
|
220
|
-
|
|
221
|
-
```json
|
|
222
|
-
{
|
|
223
|
-
"providers": {
|
|
224
|
-
"local": {
|
|
225
|
-
"enabled": true,
|
|
226
|
-
"type": "openai-compatible",
|
|
227
|
-
"base_url": "http://localhost:1234/v1",
|
|
228
|
-
"api_key": "lm-studio",
|
|
229
|
-
"default_model": "google/gemma-4-26b-a4b",
|
|
230
|
-
"models": {
|
|
231
|
-
"google/gemma-4-26b-a4b": {
|
|
232
|
-
"contextLength": 8192
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
`OPENAI_BASE_URL`, `OPENAI_API_BASE`, and `OPENAI_API_KEY` are also accepted for the Local provider only. They do not redirect OpenAI/Codex, Gemini, or Claude routes.
|
|
241
|
-
|
|
242
|
-
Use the `models.<modelId>.contextLength` override only when you know the loaded model/server limit. Values must be positive integers; zero, negative, and non-numeric values are ignored.
|
|
243
|
-
|
|
244
366
|
### Project Trust
|
|
245
367
|
|
|
246
|
-
Project config (`.codex/config.toml`) is only applied when the detected project root is explicitly trusted
|
|
368
|
+
Project config (`.codex/config.toml`) is only applied when the detected project root is explicitly trusted:
|
|
247
369
|
|
|
248
|
-
```
|
|
370
|
+
```
|
|
249
371
|
/config trust status
|
|
250
372
|
/config trust on
|
|
251
373
|
/config trust off
|
|
@@ -255,22 +377,20 @@ Untrusted project config is detected but blocked, and shown visibly in `/config`
|
|
|
255
377
|
|
|
256
378
|
## Workspace Management
|
|
257
379
|
|
|
258
|
-
Codexa locks the session to the directory it was launched from
|
|
380
|
+
Codexa locks the session to the directory it was launched from:
|
|
259
381
|
|
|
260
|
-
```
|
|
261
|
-
cd
|
|
382
|
+
```bash
|
|
383
|
+
cd <your-workspace>
|
|
262
384
|
codexa
|
|
263
385
|
```
|
|
264
386
|
|
|
265
387
|
To recover from the wrong workspace without restarting manually:
|
|
266
388
|
|
|
267
|
-
```
|
|
389
|
+
```
|
|
268
390
|
/workspace relaunch .
|
|
269
391
|
/workspace relaunch <workspace-path>
|
|
270
392
|
```
|
|
271
393
|
|
|
272
|
-
`/workspace relaunch` restarts the TUI process in the target directory. It does not hot-swap the workspace in the running process.
|
|
273
|
-
|
|
274
394
|
## Themes
|
|
275
395
|
|
|
276
396
|
16 built-in themes. Switch with `/theme <name>` or open the picker with `/themes`:
|
|
@@ -290,26 +410,203 @@ UI-only preferences are stored in `~/.codexa-settings.json` (separate from runti
|
|
|
290
410
|
| Busy loader | `/setting busy-loader <bool>` | `true` · `false` |
|
|
291
411
|
| Mouse mode | `/mouse` | wheel scroll · native selection |
|
|
292
412
|
|
|
293
|
-
##
|
|
413
|
+
## Published vs Local Codexa
|
|
294
414
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
415
|
+
**Published Codexa** (`npm install -g @golba98/codexa@latest`):
|
|
416
|
+
- Installed globally; available as `codexa` anywhere
|
|
417
|
+
- Stable release; updates on demand via npm
|
|
418
|
+
- Use this for daily work
|
|
419
|
+
|
|
420
|
+
**Local Codexa** (`bun run dev` from the repo):
|
|
421
|
+
- Runs directly from the working tree
|
|
422
|
+
- Reflects uncommitted changes immediately (with `--watch`)
|
|
423
|
+
- Header shows `Codexa vX.Y.Z-dev local` so you can tell it apart from the published build
|
|
424
|
+
- Use this for testing new features or contributing
|
|
425
|
+
|
|
426
|
+
> **Gotcha:** When testing local changes, confirm you are running the local build and not the global one. Use `Get-Command codexa` (Windows) or `which -a codexa` (Linux/macOS) to check.
|
|
427
|
+
|
|
428
|
+
## Local Development
|
|
429
|
+
|
|
430
|
+
**Requirement:** [Bun](https://bun.sh) installed.
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
# Linux/macOS
|
|
434
|
+
cd /path/to/13-Custom-CLI-Normal
|
|
435
|
+
bun install
|
|
436
|
+
|
|
437
|
+
bun run typecheck # Type-check without emit
|
|
438
|
+
bun test # Run all tests
|
|
439
|
+
bun run dev # Start with file watching (development)
|
|
298
440
|
bun run start # Single run without watching
|
|
299
|
-
bun run
|
|
441
|
+
bun run build # Generate build info + typecheck
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
```powershell
|
|
445
|
+
# Windows PowerShell
|
|
446
|
+
cd C:\Development\1-JavaScript\13-Custom-CLI-Normal
|
|
447
|
+
bun install
|
|
448
|
+
|
|
449
|
+
bun run typecheck
|
|
450
|
+
bun test
|
|
451
|
+
bun run dev
|
|
452
|
+
bun run start
|
|
453
|
+
bun run build
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
Dev launches lock the workspace to the directory Bun was invoked from.
|
|
457
|
+
|
|
458
|
+
**Option A — Install a separate `codexa-dev` command (recommended for contributors):**
|
|
459
|
+
|
|
460
|
+
```
|
|
461
|
+
bun run install:dev-bin
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
This installs two shims into your npm global bin directory — `codexa-dev` and the short alias `cxd` — both pointing at the local repo. The published `codexa` command is not modified — they coexist.
|
|
465
|
+
|
|
466
|
+
```bash
|
|
467
|
+
cd <your-workspace>
|
|
468
|
+
codexa-dev # or: cxd
|
|
300
469
|
```
|
|
301
470
|
|
|
302
|
-
|
|
471
|
+
To confirm exactly which file is executing: `CODEXA_DEBUG_LAUNCH=1 codexa-dev`
|
|
472
|
+
|
|
473
|
+
Uninstall by removing the `codexa-dev` and `cxd` shims from your npm global bin directory (`npm prefix -g`).
|
|
474
|
+
|
|
475
|
+
**Option B — Redirect the global `codexa` command to the repo:**
|
|
476
|
+
|
|
477
|
+
```
|
|
478
|
+
npm link
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
This replaces the global `codexa` with a symlink to the repo. Undo with `npm unlink -g @golba98/codexa`.
|
|
482
|
+
|
|
483
|
+
**Refresh the global `codexa` from this checkout** (without publishing to npm):
|
|
484
|
+
|
|
485
|
+
```
|
|
486
|
+
npm install -g .
|
|
487
|
+
```
|
|
303
488
|
|
|
304
489
|
## Testing
|
|
305
490
|
|
|
306
|
-
```
|
|
491
|
+
```bash
|
|
307
492
|
bun test # Run all tests
|
|
308
493
|
bun test src/ui/layout.test.ts # Run a specific file or pattern
|
|
309
494
|
```
|
|
310
495
|
|
|
311
496
|
Tests are colocated with source files (`*.test.ts` / `*.test.tsx`).
|
|
312
497
|
|
|
498
|
+
## Troubleshooting
|
|
499
|
+
|
|
500
|
+
### `npm install -g @golba98/codexa@latest` installs an older version
|
|
501
|
+
|
|
502
|
+
Run these diagnostics to understand the npm registry state:
|
|
503
|
+
|
|
504
|
+
```bash
|
|
505
|
+
npm view @golba98/codexa version
|
|
506
|
+
npm view @golba98/codexa versions --json
|
|
507
|
+
npm view @golba98/codexa dist-tags --json
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
If `dist-tags.latest` points to an older version, v1.0.3 may not have been published yet, or the `latest` tag may need to be updated. Until v1.0.3 is published to npm, `@latest` will resolve to the highest published version.
|
|
511
|
+
|
|
512
|
+
### `codexa --version` still shows an old version after updating
|
|
513
|
+
|
|
514
|
+
Check which binary is active and what version is installed globally:
|
|
515
|
+
|
|
516
|
+
```bash
|
|
517
|
+
# Linux/macOS
|
|
518
|
+
which -a codexa
|
|
519
|
+
|
|
520
|
+
# Windows PowerShell
|
|
521
|
+
Get-Command codexa
|
|
522
|
+
|
|
523
|
+
# Check globally installed version
|
|
524
|
+
npm list -g --depth=0 @golba98/codexa
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
Multiple `codexa` entries from `which -a` means more than one binary exists on PATH. The first one wins. If a local dev build (`codexa-dev` or `npm link`) is ahead of the published binary on PATH, it will shadow the global install.
|
|
528
|
+
|
|
529
|
+
### Multiple `codexa` binaries on PATH
|
|
530
|
+
|
|
531
|
+
Run `which -a codexa` to see all of them. The first one in the list is what runs. Reorder PATH, or uninstall/unlink the unwanted binary:
|
|
532
|
+
|
|
533
|
+
```bash
|
|
534
|
+
npm unlink -g @golba98/codexa # remove npm link
|
|
535
|
+
npm uninstall -g @golba98/codexa # remove global install
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
Then reinstall: `npm install -g @golba98/codexa@latest`
|
|
539
|
+
|
|
540
|
+
### Installed from a local tarball
|
|
541
|
+
|
|
542
|
+
If you installed from a `.tgz` file rather than from the npm registry, `npm list -g` shows the version from that tarball. To switch to the registry version:
|
|
543
|
+
|
|
544
|
+
```bash
|
|
545
|
+
npm uninstall -g @golba98/codexa
|
|
546
|
+
npm install -g @golba98/codexa@latest
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
### npm global prefix not on PATH
|
|
550
|
+
|
|
551
|
+
Find where npm installs global binaries:
|
|
552
|
+
|
|
553
|
+
```bash
|
|
554
|
+
npm prefix -g # e.g. /home/you/.local/share/npm
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
The `bin/` subdirectory of that path must be on your PATH. Add it to `~/.bashrc` or `~/.zshrc`:
|
|
558
|
+
|
|
559
|
+
```bash
|
|
560
|
+
export PATH="$(npm prefix -g)/bin:$PATH"
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
Then restart your terminal.
|
|
564
|
+
|
|
565
|
+
### Local linked build running instead of published package
|
|
566
|
+
|
|
567
|
+
If you ran `npm link` from the repo, `codexa` points at the local source. The header shows `Codexa vX.Y.Z-dev local` in that case. To go back to the published version:
|
|
568
|
+
|
|
569
|
+
```bash
|
|
570
|
+
npm unlink -g @golba98/codexa
|
|
571
|
+
npm install -g @golba98/codexa@latest
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
### Update notice does not appear
|
|
575
|
+
|
|
576
|
+
Codexa checks for updates on startup and caches the result for 6 hours (stored in `~/.codexa-update-check.json`). The update notice only appears when the npm registry `latest` version is newer than the running version.
|
|
577
|
+
|
|
578
|
+
If you expect a notice but don't see one:
|
|
579
|
+
|
|
580
|
+
1. Check the current registry state: `npm view @golba98/codexa dist-tags --json`
|
|
581
|
+
2. Clear the cache to force a fresh check: delete `~/.codexa-update-check.json`, then restart Codexa
|
|
582
|
+
3. Force an explicit check in-app: `/update check`
|
|
583
|
+
4. Update checks are disabled for local dev builds (`codexa-dev` / `cxd`)
|
|
584
|
+
|
|
585
|
+
| Symptom | Fix |
|
|
586
|
+
|---------|-----|
|
|
587
|
+
| `codex: command not found` | Install Codex CLI and restart the terminal |
|
|
588
|
+
| `claude: command not found` | Install Claude Code CLI: `npm install -g @anthropic-ai/claude-code` |
|
|
589
|
+
| `codexa: command not found` | Run `npm install -g @golba98/codexa@latest`, or use `bun run dev` from the repo |
|
|
590
|
+
| Codexa still shows old version after update | Check `which -a codexa` — a different binary may be earlier on PATH |
|
|
591
|
+
| Codex updated but Codexa did not | Independent tools — update Codexa: `npm install -g @golba98/codexa@latest` |
|
|
592
|
+
| Codexa updated but Codex did not | Independent tools — update Codex: `codex update` |
|
|
593
|
+
| Local changes not reflected when running `codexa` | You may be running the global binary — use `bun run dev` or `codexa-dev` from the repo |
|
|
594
|
+
|
|
595
|
+
## Versions
|
|
596
|
+
|
|
597
|
+
See [CHANGELOG.md](CHANGELOG.md) for the full release history.
|
|
598
|
+
|
|
599
|
+
**Current release: v1.0.3**
|
|
600
|
+
|
|
601
|
+
v1.0.3 is a package correctness and release-process fix:
|
|
602
|
+
- The installed `npm` package now shows the full Codexa UI (logo, header, workspace, provider)
|
|
603
|
+
- `APP_VERSION` in the package is guaranteed to match `package.json` at publish time
|
|
604
|
+
- Test files are excluded from the published tarball
|
|
605
|
+
- Semantic color-token system (`logoPrimary`, `text`, `textMuted`, etc.)
|
|
606
|
+
- Responsive ASCII logo with three fallback sizes
|
|
607
|
+
|
|
608
|
+
> Once v1.0.3 is published to npm, users on v1.0.2 will see the in-app update notice within 6 hours (cache TTL). To trigger it immediately: delete `~/.codexa-update-check.json` and restart Codexa.
|
|
609
|
+
|
|
313
610
|
## Repo Hygiene
|
|
314
611
|
|
|
315
612
|
Local-only files kept out of version control:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golba98/codexa",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Terminal UI for Codexa — TypeScript + Bun + Ink",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,24 +9,29 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"start": "bun run --silent src/index.tsx",
|
|
11
11
|
"dev": "bun --watch --silent src/index.tsx",
|
|
12
|
+
"dev:run": "node scripts/run-local-dev.mjs",
|
|
13
|
+
"install:dev-bin": "node scripts/install-local-dev-bin.mjs",
|
|
12
14
|
"typecheck": "tsc --noEmit",
|
|
13
15
|
"test": "bun test",
|
|
14
16
|
"audit:codexa-gap": "node scripts/audit-codexa-capabilities.mjs",
|
|
15
17
|
"smoke:terminal-bench": "node scripts/smoke-terminal-bench.mjs",
|
|
16
18
|
"gen-build-info": "node scripts/gen-build-info.mjs",
|
|
17
19
|
"build": "bun run gen-build-info && bun run typecheck",
|
|
18
|
-
"prepublishOnly": "npm run typecheck && npm test"
|
|
20
|
+
"prepublishOnly": "npm run gen-build-info && npm run typecheck && npm test"
|
|
19
21
|
},
|
|
20
22
|
"dependencies": {
|
|
21
23
|
"ink": "^7.0.0",
|
|
22
24
|
"ink-select-input": "^6.2.0",
|
|
23
25
|
"react": "^19.2.5",
|
|
24
|
-
"react-dom": "^19.2.
|
|
26
|
+
"react-dom": "^19.2.6"
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
|
-
"@types/node": "^25.
|
|
29
|
+
"@types/node": "^25.9.1",
|
|
28
30
|
"@types/react": "^19.2.14",
|
|
29
|
-
"typescript": "^6.0.
|
|
31
|
+
"typescript": "^6.0.3"
|
|
32
|
+
},
|
|
33
|
+
"overrides": {
|
|
34
|
+
"ws": "^8.21.0"
|
|
30
35
|
},
|
|
31
36
|
"repository": {
|
|
32
37
|
"type": "git",
|
|
@@ -40,7 +45,7 @@
|
|
|
40
45
|
"files": [
|
|
41
46
|
"bin/",
|
|
42
47
|
"src/",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
48
|
+
"!src/**/*.test.ts",
|
|
49
|
+
"!src/**/*.test.tsx"
|
|
45
50
|
]
|
|
46
51
|
}
|