Files
llmx/codex-cli/package.json

87 lines
2.6 KiB
JSON
Raw Normal View History

{
"name": "@openai/codex",
"version": "0.1.2504172351",
"license": "Apache-2.0",
"bin": {
fix: Improper spawn of sh on Windows Powershell (#318) # Fix CLI launcher on Windows by replacing `sh`-based entrypoint with cross-platform Node script ## What's changed * This PR attempts to replace the sh-based entry point with a node script that works on all platforms including Windows Powershell and CMD ## Why * Previously, when installing Codex globally via `npm i -g @openai/codex`, Windows resulted in a broken CLI issue due to the `ps1` launcher trying to execute `sh.exe`. * If users don't have Unix-style shell, running the command will fail as seen below since `sh.exe` can't be found * Output: ``` & : The term 'sh.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\{user}\AppData\Roaming\npm\codex.ps1:24 char:7 + & "sh$exe" "$basedir/node_modules/@openai/codex/bin/codex" $args + ~~~~~~~~ + CategoryInfo : ObjectNotFound: (sh.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException ``` ## How * By using a Node based entry point that resolves the path to the compiled ESM bundle and dynamically loads it using native ESM * Removed dependency on platform-specific launchers allowing a single entrypoint to work everywhere Node.js runs. ## Result Codex CLI now supports cross-platform and launches correctly via: * macOS / Linux * Windows PowerShell * GitBash * CMD * WSL Directly addresses #316 ![image](https://github.com/user-attachments/assets/85faaca4-24bc-47c9-8160-4e30df6da4c3) ![image](https://github.com/user-attachments/assets/a13f7adc-52c1-4c0e-af02-e35a35dc45d4)
2025-04-18 14:35:51 -04:00
"codex": "bin/codex.js"
},
"type": "module",
"engines": {
"node": ">=22"
},
"scripts": {
"format": "prettier --check src tests",
"format:fix": "prettier --write src tests",
"dev": "tsc --watch",
"lint": "eslint src tests --ext ts --ext tsx --report-unused-disable-directives --max-warnings 0",
"lint:fix": "eslint src tests --ext ts --ext tsx --fix",
"test": "vitest run",
"test:watch": "vitest --watch",
"typecheck": "tsc --noEmit",
"build": "node build.mjs",
"build:dev": "NODE_ENV=development node build.mjs --dev && NODE_OPTIONS=--enable-source-maps node dist/cli-dev.js",
"release:readme": "cp ../README.md ./README.md",
"release:version": "TS=$(date +%y%m%d%H%M) && sed -E -i'' -e \"s/\\\"0\\.1\\.[0-9]{10}\\\"/\\\"0.1.${TS}\\\"/g\" package.json src/utils/session.ts",
chore: migrate to pnpm for improved monorepo management (#287) # Migrate to pnpm for improved monorepo management ## Summary This PR migrates the Codex repository from npm to pnpm, providing faster dependency installation, better disk space usage, and improved monorepo management. ## Changes - Added `pnpm-workspace.yaml` to define workspace packages - Added `.npmrc` with optimal pnpm configuration - Updated root package.json with workspace scripts - Moved resolutions and overrides to the root package.json - Updated scripts to use pnpm instead of npm - Added documentation for the migration - Updated GitHub Actions workflow for pnpm ## Benefits - **Faster installations**: pnpm is significantly faster than npm - **Disk space savings**: pnpm's content-addressable store avoids duplication - **Strict dependency management**: prevents phantom dependencies - **Simplified monorepo management**: better workspace coordination - **Preparation for Turborepo**: as discussed, this is the first step before adding Turborepo ## Testing - Verified that `pnpm install` works correctly - Verified that `pnpm run build` completes successfully - Ensured all existing functionality is preserved ## Documentation Added a detailed migration guide in `PNPM_MIGRATION.md` explaining: - Why we're migrating to pnpm - How to use pnpm with this repository - Common commands and workspace-specific commands - Monorepo structure and configuration ## Next Steps As discussed, once this change is stable, we can consider adding Turborepo as a follow-up enhancement.
2025-04-18 23:25:15 +00:00
"release:build-and-publish": "pmpm run build && pmpm publish",
"release": "pnpm run release:readme && pnpm run release:version && pnpm install && pnpm run release:build-and-publish",
"prepare": "husky",
"pre-commit": "lint-staged"
},
"files": [
"README.md",
"bin",
"dist",
"src"
],
"dependencies": {
"@inkjs/ui": "^2.0.0",
"chalk": "^5.2.0",
"diff": "^7.0.0",
"dotenv": "^16.1.4",
"fast-deep-equal": "^3.1.3",
feat: shell command explanation option (#173) # Shell Command Explanation Option ## Description This PR adds an option to explain shell commands when the user is prompted to approve them (Fixes #110). When reviewing a shell command, users can now select "Explain this command" to get a detailed explanation of what the command does before deciding whether to approve or reject it. ## Changes - Added a new "EXPLAIN" option to the `ReviewDecision` enum - Updated the command review UI to include an "Explain this command (x)" option - Implemented the logic to send the command to the LLM for explanation using the same model as the agent - Added a display for the explanation in the command review UI - Updated all relevant components to pass the explanation through the component tree ## Benefits - Improves user understanding of shell commands before approving them - Reduces the risk of approving potentially harmful commands - Enhances the educational aspect of the tool, helping users learn about shell commands - Maintains the same workflow with minimal UI changes ## Testing - Manually tested the explanation feature with various shell commands - Verified that the explanation is displayed correctly in the UI - Confirmed that the user can still approve or reject the command after viewing the explanation ## Screenshots ![improved_shell_explanation_demo](https://github.com/user-attachments/assets/05923481-29db-4eba-9cc6-5e92301d2be0) ## Additional Notes The explanation is generated using the same model as the agent, ensuring consistency in the quality and style of explanations. --------- Signed-off-by: crazywolf132 <crazywolf132@gmail.com>
2025-04-18 06:28:58 +10:00
"figures": "^6.1.0",
"file-type": "^20.1.0",
"ink": "^5.2.0",
feat: shell command explanation option (#173) # Shell Command Explanation Option ## Description This PR adds an option to explain shell commands when the user is prompted to approve them (Fixes #110). When reviewing a shell command, users can now select "Explain this command" to get a detailed explanation of what the command does before deciding whether to approve or reject it. ## Changes - Added a new "EXPLAIN" option to the `ReviewDecision` enum - Updated the command review UI to include an "Explain this command (x)" option - Implemented the logic to send the command to the LLM for explanation using the same model as the agent - Added a display for the explanation in the command review UI - Updated all relevant components to pass the explanation through the component tree ## Benefits - Improves user understanding of shell commands before approving them - Reduces the risk of approving potentially harmful commands - Enhances the educational aspect of the tool, helping users learn about shell commands - Maintains the same workflow with minimal UI changes ## Testing - Manually tested the explanation feature with various shell commands - Verified that the explanation is displayed correctly in the UI - Confirmed that the user can still approve or reject the command after viewing the explanation ## Screenshots ![improved_shell_explanation_demo](https://github.com/user-attachments/assets/05923481-29db-4eba-9cc6-5e92301d2be0) ## Additional Notes The explanation is generated using the same model as the agent, ensuring consistency in the quality and style of explanations. --------- Signed-off-by: crazywolf132 <crazywolf132@gmail.com>
2025-04-18 06:28:58 +10:00
"js-yaml": "^4.1.0",
"marked": "^15.0.7",
"marked-terminal": "^7.3.0",
"meow": "^13.2.0",
"open": "^10.1.0",
"openai": "^4.89.0",
"react": "^18.2.0",
"shell-quote": "^1.8.2",
feat: shell command explanation option (#173) # Shell Command Explanation Option ## Description This PR adds an option to explain shell commands when the user is prompted to approve them (Fixes #110). When reviewing a shell command, users can now select "Explain this command" to get a detailed explanation of what the command does before deciding whether to approve or reject it. ## Changes - Added a new "EXPLAIN" option to the `ReviewDecision` enum - Updated the command review UI to include an "Explain this command (x)" option - Implemented the logic to send the command to the LLM for explanation using the same model as the agent - Added a display for the explanation in the command review UI - Updated all relevant components to pass the explanation through the component tree ## Benefits - Improves user understanding of shell commands before approving them - Reduces the risk of approving potentially harmful commands - Enhances the educational aspect of the tool, helping users learn about shell commands - Maintains the same workflow with minimal UI changes ## Testing - Manually tested the explanation feature with various shell commands - Verified that the explanation is displayed correctly in the UI - Confirmed that the user can still approve or reject the command after viewing the explanation ## Screenshots ![improved_shell_explanation_demo](https://github.com/user-attachments/assets/05923481-29db-4eba-9cc6-5e92301d2be0) ## Additional Notes The explanation is generated using the same model as the agent, ensuring consistency in the quality and style of explanations. --------- Signed-off-by: crazywolf132 <crazywolf132@gmail.com>
2025-04-18 06:28:58 +10:00
"strip-ansi": "^7.1.0",
"to-rotated": "^1.0.0",
feat: shell command explanation option (#173) # Shell Command Explanation Option ## Description This PR adds an option to explain shell commands when the user is prompted to approve them (Fixes #110). When reviewing a shell command, users can now select "Explain this command" to get a detailed explanation of what the command does before deciding whether to approve or reject it. ## Changes - Added a new "EXPLAIN" option to the `ReviewDecision` enum - Updated the command review UI to include an "Explain this command (x)" option - Implemented the logic to send the command to the LLM for explanation using the same model as the agent - Added a display for the explanation in the command review UI - Updated all relevant components to pass the explanation through the component tree ## Benefits - Improves user understanding of shell commands before approving them - Reduces the risk of approving potentially harmful commands - Enhances the educational aspect of the tool, helping users learn about shell commands - Maintains the same workflow with minimal UI changes ## Testing - Manually tested the explanation feature with various shell commands - Verified that the explanation is displayed correctly in the UI - Confirmed that the user can still approve or reject the command after viewing the explanation ## Screenshots ![improved_shell_explanation_demo](https://github.com/user-attachments/assets/05923481-29db-4eba-9cc6-5e92301d2be0) ## Additional Notes The explanation is generated using the same model as the agent, ensuring consistency in the quality and style of explanations. --------- Signed-off-by: crazywolf132 <crazywolf132@gmail.com>
2025-04-18 06:28:58 +10:00
"use-interval": "1.4.0",
"zod": "^3.24.3"
},
"devDependencies": {
"@eslint/js": "^9.22.0",
"@types/diff": "^7.0.2",
"@types/js-yaml": "^4.0.9",
"@types/marked-terminal": "^6.1.1",
"@types/react": "^18.0.32",
"@types/shell-quote": "^1.7.5",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"esbuild": "^0.25.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.19",
"husky": "^9.1.7",
"ink-testing-library": "^3.0.0",
"lint-staged": "^15.5.1",
"prettier": "^2.8.7",
"punycode": "^2.3.1",
"ts-node": "^10.9.1",
"typescript": "^5.0.3",
"vitest": "^3.0.9",
"whatwg-url": "^14.2.0"
},
"repository": {
"type": "git",
"url": "https://github.com/openai/codex"
}
}