@just-every/code 0.2.154 → 0.2.156
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 +10 -7
- package/package.json +6 -6
- package/postinstall.js +47 -6
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CODE
|
|
2
2
|
|
|
3
3
|
 
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
- 🧠 **Reasoning Control** - /reasoning for dynamic effort adjustment
|
|
21
21
|
- 🔌 **MCP support** – Extend with filesystem, DBs, APIs, or your own tools.
|
|
22
22
|
- 🔒 **Safety modes** – Read-only, approvals, and workspace sandboxing.
|
|
23
|
-
- 🔁 **Backwards compatible** –
|
|
23
|
+
- 🔁 **Backwards compatible** – Reads both `~/.code/*` (primary) and legacy `~/.codex/*`; writes only to `~/.code/*`
|
|
24
24
|
|
|
25
25
|
 
|
|
26
26
|
| <img src="docs/screenshots/simple.png" alt="Simple interface" width="100%"><br>Simple interface | <img src="docs/screenshots/diff.png" alt="Unified diff viewer" width="100%"><br>Unified diffs |
|
|
@@ -51,7 +51,7 @@ Note: If another tool already provides a `code` command (e.g. VS Code), our CLI
|
|
|
51
51
|
**Authenticate** (one of the following):
|
|
52
52
|
- **Sign in with ChatGPT** (Plus/Pro/Team; uses models available to your plan)
|
|
53
53
|
- Run `code` and pick "Sign in with ChatGPT"
|
|
54
|
-
- Stores creds locally at `~/.
|
|
54
|
+
- Stores creds locally at `~/.code/auth.json` (still reads legacy `~/.codex/auth.json` if present)
|
|
55
55
|
- **API key** (usage-based)
|
|
56
56
|
- Set `export OPENAI_API_KEY=xyz` and run `code`
|
|
57
57
|
|
|
@@ -173,7 +173,7 @@ Code supports MCP for extended capabilities:
|
|
|
173
173
|
- **API integrations**: Connect to external services
|
|
174
174
|
- **Custom tools**: Build your own extensions
|
|
175
175
|
|
|
176
|
-
Configure MCP in `~/.codex/config.toml
|
|
176
|
+
Configure MCP in `~/.code/config.toml` (legacy `~/.codex/config.toml` is still read if present). Define each server under a named table like `[mcp_servers.<name>]` (this maps to the JSON `mcpServers` object used by other clients):
|
|
177
177
|
|
|
178
178
|
```toml
|
|
179
179
|
[mcp_servers.filesystem]
|
|
@@ -184,7 +184,10 @@ args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
|
|
|
184
184
|
 
|
|
185
185
|
## Configuration
|
|
186
186
|
|
|
187
|
-
Main config file: `~/.
|
|
187
|
+
Main config file: `~/.code/config.toml`
|
|
188
|
+
|
|
189
|
+
> [!NOTE]
|
|
190
|
+
> Code reads from both `~/.code/` and `~/.codex/` for backwards compatibility, but it only writes updates to `~/.code/`. If you switch back to Codex and it fails to start, remove `~/.codex/config.toml`. If Code appears to miss settings after upgrading, copy your legacy `~/.codex/config.toml` into `~/.code/`.
|
|
188
191
|
|
|
189
192
|
```toml
|
|
190
193
|
# Model settings
|
|
@@ -222,7 +225,7 @@ model_reasoning_summary = "detailed"
|
|
|
222
225
|
> This fork adds browser integration, multi-agent commands (`/plan`, `/solve`, `/code`), theme system, and enhanced reasoning controls while maintaining full compatibility.
|
|
223
226
|
|
|
224
227
|
**Can I use my existing Codex configuration?**
|
|
225
|
-
> Yes
|
|
228
|
+
> Yes. Code reads from both `~/.code/` (primary) and legacy `~/.codex/` directories. We only write to `~/.code/`, so Codex will keep running if you switch back; copy or remove legacy files if you notice conflicts.
|
|
226
229
|
|
|
227
230
|
**Does this work with ChatGPT Plus?**
|
|
228
231
|
> Absolutely. Use the same "Sign in with ChatGPT" flow as the original.
|
|
@@ -275,7 +278,7 @@ Using OpenAI, Anthropic or Google services through Code means you agree to **the
|
|
|
275
278
|
- If you configure other model providers, you're responsible for their terms.
|
|
276
279
|
|
|
277
280
|
### Privacy
|
|
278
|
-
- Your auth file lives at `~/.codex/auth.json
|
|
281
|
+
- Your auth file lives at `~/.code/auth.json` (legacy `~/.codex/auth.json` is still read).
|
|
279
282
|
- Inputs/outputs you send to AI providers are handled under their Terms and Privacy Policy; consult those documents (and any org-level data-sharing settings).
|
|
280
283
|
|
|
281
284
|
### Subject to change
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@just-every/code",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.156",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lightweight coding agent that runs in your terminal - fork of OpenAI Codex",
|
|
6
6
|
"bin": {
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"prettier": "^3.3.3"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@just-every/code-darwin-arm64": "0.2.
|
|
39
|
-
"@just-every/code-darwin-x64": "0.2.
|
|
40
|
-
"@just-every/code-linux-x64-musl": "0.2.
|
|
41
|
-
"@just-every/code-linux-arm64-musl": "0.2.
|
|
42
|
-
"@just-every/code-win32-x64": "0.2.
|
|
38
|
+
"@just-every/code-darwin-arm64": "0.2.156",
|
|
39
|
+
"@just-every/code-darwin-x64": "0.2.156",
|
|
40
|
+
"@just-every/code-linux-x64-musl": "0.2.156",
|
|
41
|
+
"@just-every/code-linux-arm64-musl": "0.2.156",
|
|
42
|
+
"@just-every/code-win32-x64": "0.2.156"
|
|
43
43
|
}
|
|
44
44
|
}
|
package/postinstall.js
CHANGED
|
@@ -104,6 +104,51 @@ async function writeCacheAtomic(srcPath, cachePath) {
|
|
|
104
104
|
renameSync(tmp, cachePath);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
function resolveGlobalBinDir() {
|
|
108
|
+
const plt = platform();
|
|
109
|
+
const userAgent = process.env.npm_config_user_agent || '';
|
|
110
|
+
|
|
111
|
+
const fromPrefix = (prefixPath) => {
|
|
112
|
+
if (!prefixPath) return '';
|
|
113
|
+
return plt === 'win32' ? prefixPath : join(prefixPath, 'bin');
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const prefixEnv = process.env.npm_config_prefix || process.env.PREFIX || '';
|
|
117
|
+
const direct = fromPrefix(prefixEnv);
|
|
118
|
+
if (direct) return direct;
|
|
119
|
+
|
|
120
|
+
const tryExec = (command) => {
|
|
121
|
+
try {
|
|
122
|
+
return execSync(command, {
|
|
123
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
124
|
+
shell: true,
|
|
125
|
+
}).toString().trim();
|
|
126
|
+
} catch {
|
|
127
|
+
return '';
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const prefixFromNpm = fromPrefix(tryExec('npm prefix -g'));
|
|
132
|
+
if (prefixFromNpm) return prefixFromNpm;
|
|
133
|
+
|
|
134
|
+
const binFromNpm = tryExec('npm bin -g');
|
|
135
|
+
if (binFromNpm) return binFromNpm;
|
|
136
|
+
|
|
137
|
+
if (userAgent.includes('pnpm')) {
|
|
138
|
+
const pnpmBin = tryExec('pnpm bin --global');
|
|
139
|
+
if (pnpmBin) return pnpmBin;
|
|
140
|
+
const pnpmPrefix = fromPrefix(tryExec('pnpm env get prefix'));
|
|
141
|
+
if (pnpmPrefix) return pnpmPrefix;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (userAgent.includes('yarn')) {
|
|
145
|
+
const yarnBin = tryExec('yarn global bin');
|
|
146
|
+
if (yarnBin) return yarnBin;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return '';
|
|
150
|
+
}
|
|
151
|
+
|
|
107
152
|
async function downloadBinary(url, dest, maxRedirects = 5, maxRetries = 3) {
|
|
108
153
|
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
|
|
109
154
|
|
|
@@ -598,12 +643,8 @@ async function main() {
|
|
|
598
643
|
}
|
|
599
644
|
} else {
|
|
600
645
|
// npm/pnpm/yarn path
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
globalBin = execSync('npm bin -g', { stdio: ['ignore', 'pipe', 'ignore'] }).toString().trim();
|
|
604
|
-
} catch {}
|
|
605
|
-
|
|
606
|
-
const ourShim = join(globalBin || '', isWindows ? 'code.cmd' : 'code');
|
|
646
|
+
const globalBin = resolveGlobalBinDir();
|
|
647
|
+
const ourShim = globalBin ? join(globalBin, isWindows ? 'code.cmd' : 'code') : '';
|
|
607
648
|
const candidates = resolveAllOnPath();
|
|
608
649
|
const others = candidates.filter(p => p && (!ourShim || p !== ourShim));
|
|
609
650
|
const collision = others.length > 0;
|