{"id":30531,"date":"2025-04-17T16:16:55","date_gmt":"2025-04-17T08:16:55","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=30531"},"modified":"2025-08-25T01:59:30","modified_gmt":"2025-08-24T17:59:30","slug":"openai-codex-cli","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/pt\/openai-codex-cli\/","title":{"rendered":"OpenAI Codex CLI\uff1aOpenAI\u53d1\u5e03\u7684\u7ec8\u7aef\u547d\u4ee4\u884cAI\u7f16\u7801\u52a9\u624b"},"content":{"rendered":"<p>OpenAI Codex CLI \u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u7ec8\u7aef\u7f16\u7801\u5de5\u5177\uff0c\u7531 OpenAI \u5f00\u53d1\uff0c\u4e13\u4e3a\u4e60\u60ef\u7ec8\u7aef\u7684\u5f00\u53d1\u8005\u8bbe\u8ba1\u3002\u5b83\u901a\u8fc7\u81ea\u7136\u8bed\u8a00\u6307\u4ee4\u751f\u6210\u4ee3\u7801\u3001\u7f16\u8f91\u6587\u4ef6\u3001\u6267\u884c\u547d\u4ee4\uff0c\u5e76\u96c6\u6210 Git \u7248\u672c\u63a7\u5236\u3002Codex CLI \u4f7f\u7528 OpenAI \u7684\u6700\u65b0\u6a21\u578b\uff08\u5982 o3 \u548c o4-mini\uff09\uff0c\u652f\u6301\u591a\u8bed\u8a00\u7f16\u7a0b\uff0c\u63d0\u4f9b\u5b89\u5168\u6c99\u7bb1\u73af\u5883\uff0c\u9650\u5236\u7f51\u7edc\u8bbf\u95ee\u548c\u76ee\u5f55\u64cd\u4f5c\uff0c\u786e\u4fdd\u5b89\u5168\u3002\u9879\u76ee\u5b8c\u5168\u5f00\u6e90\uff0c\u9f13\u52b1\u793e\u533a\u8d21\u732e\uff0c\u9002\u5408\u5feb\u901f\u5f00\u53d1\u3001\u81ea\u52a8\u5316\u4efb\u52a1\u548c\u5b66\u4e60\u7f16\u7a0b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-30532\" title=\"OpenAI Codex CLI\uff1aOpenAI\u53d1\u5e03\u7684\u7ec8\u7aef\u547d\u4ee4\u884cAI\u7f16\u7801\u52a9\u624b-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/3cd3bfea96991b3.png\" alt=\"OpenAI Codex CLI\uff1aOpenAI\u53d1\u5e03\u7684\u7ec8\u7aef\u547d\u4ee4\u884cAI\u7f16\u7801\u52a9\u624b-1\" width=\"1035\" height=\"593\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/3cd3bfea96991b3.png 1035w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/3cd3bfea96991b3-768x440.png 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/3cd3bfea96991b3-18x10.png 18w\" sizes=\"auto, (max-width: 1035px) 100vw, 1035px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li>\u4ee3\u7801\u751f\u6210\uff1a\u6839\u636e\u81ea\u7136\u8bed\u8a00\u751f\u6210 Python\u3001JavaScript \u7b49\u591a\u8bed\u8a00\u4ee3\u7801\u3002<\/li>\n<li>\u6587\u4ef6\u64cd\u4f5c\uff1a\u521b\u5efa\u3001\u7f16\u8f91\u6587\u4ef6\uff0c\u652f\u6301 Git \u63d0\u4ea4\u548c\u7248\u672c\u7ba1\u7406\u3002<\/li>\n<li>\u547d\u4ee4\u6267\u884c\uff1a\u5728\u6c99\u7bb1\u4e2d\u8fd0\u884c\u4ee3\u7801\u6216\u547d\u4ee4\uff0c\u5b9e\u65f6\u663e\u793a\u7ed3\u679c\u3002<\/li>\n<li>\u591a\u6a21\u6001\u8f93\u5165\uff1a\u652f\u6301\u622a\u56fe\u3001\u56fe\u8868\u8f93\u5165\uff0c\u751f\u6210\u5bf9\u5e94\u4ee3\u7801\u3002<\/li>\n<li>\u5b89\u5168\u6c99\u7bb1\uff1a\u9ed8\u8ba4\u7981\u7528\u7f51\u7edc\uff0c\u4ec5\u64cd\u4f5c\u5f53\u524d\u76ee\u5f55\uff0c\u4fdd\u969c\u5b89\u5168\u3002<\/li>\n<li>\u81ea\u52a8\u5316\u5ba1\u6279\uff1a\u63d0\u4f9b\u624b\u52a8\u3001\u81ea\u52a8\u7f16\u8f91\u3001\u5168\u81ea\u52a8\u4e09\u79cd\u6a21\u5f0f\u3002<\/li>\n<li>\u5f00\u6e90\u5f00\u53d1\uff1a\u5141\u8bb8\u7528\u6237\u67e5\u770b\u4ee3\u7801\u3001\u63d0\u4ea4 PR \u8d21\u732e\u529f\u80fd\u3002<\/li>\n<li>\u9879\u76ee\u6587\u6863\uff1a\u652f\u6301\u5168\u5c40\u548c\u9879\u76ee\u7ea7 Markdown \u6307\u4ee4\uff0c\u5b9a\u5236\u884c\u4e3a\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<h3>\u5b89\u88c5\u6d41\u7a0b<\/h3>\n<p>\u8981\u4f7f\u7528 Codex CLI\uff0c\u9700\u5b8c\u6210\u4ee5\u4e0b\u5b89\u88c5\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li><strong>\u7cfb\u7edf\u8981\u6c42<\/strong>\uff1a\n<ul>\n<li>\u64cd\u4f5c\u7cfb\u7edf\uff1amacOS 12+\u3001Ubuntu 20.04+\/Debian 10+\uff0c\u6216 Windows 11\uff08\u901a\u8fc7 WSL2\uff09\u3002<\/li>\n<li>Node.js\uff1a\u7248\u672c &gt;= 22\uff08\u63a8\u8350 LTS \u7248\u672c\uff09\u3002<\/li>\n<li>Git\uff1a\u7248\u672c &gt;= 2.23\uff08\u63a8\u8350\uff0c\u7528\u4e8e\u7248\u672c\u63a7\u5236\uff09\u3002<\/li>\n<li>\u5185\u5b58\uff1a\u81f3\u5c11 4GB\uff0c\u63a8\u8350 8GB\u3002<\/li>\n<li>OpenAI API \u5bc6\u94a5\uff1a\u4ece\u00a0OpenAI \u5b98\u7f51\u00a0\u83b7\u53d6\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u5b89\u88c5\u6b65\u9aa4<\/strong>\uff1a\n<ul>\n<li>\u901a\u8fc7 npm \u5168\u5c40\u5b89\u88c5\uff08\u63a8\u8350\uff09\uff1a\n<pre><code>npm install -g @openai\/codex\r\n<\/code><\/pre>\n<\/li>\n<li>\u6216\u4ece\u6e90\u4ee3\u7801\u6784\u5efa\uff1a\n<pre><code>git clone https:\/\/github.com\/openai\/codex.git\r\ncd codex\/codex-cli\r\nnpm install\r\nnpm run build\r\n<\/code><\/pre>\n<\/li>\n<li>\u8bbe\u7f6e API \u5bc6\u94a5\uff1a\n<pre><code>export OPENAI_API_KEY=\"your-api-key-here\"\r\n<\/code><\/pre>\n<p>\u4e3a\u6c38\u4e45\u8bbe\u7f6e\uff0c\u6dfb\u52a0\u81f3 shell \u914d\u7f6e\u6587\u4ef6\uff08\u5982\u00a0<code>~\/.zshrc<\/code>\u00a0\u6216\u00a0<code>~\/.bashrc<\/code>\uff09\uff1a<\/p>\n<pre><code>echo 'export OPENAI_API_KEY=\"your-api-key-here\"' &gt;&gt; ~\/.zshrc\r\nsource ~\/.zshrc\r\n<\/code><\/pre>\n<\/li>\n<li>\u9a8c\u8bc1\u5b89\u88c5\uff1a\n<pre><code>codex --help\r\n<\/code><\/pre>\n<p>\u82e5\u663e\u793a\u5e2e\u52a9\u4fe1\u606f\uff0c\u5b89\u88c5\u6210\u529f\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>Linux Docker \u914d\u7f6e<\/strong>\uff1a\n<ul>\n<li>\u63a8\u8350\u4f7f\u7528 Docker \u589e\u5f3a\u5b89\u5168\u6027\uff1a\n<pre><code>.\/run_in_container.sh\r\n<\/code><\/pre>\n<\/li>\n<li>\u786e\u4fdd Docker \u5df2\u5b89\u88c5\uff0c\u811a\u672c\u4f1a\u81ea\u52a8\u6302\u8f7d\u5f53\u524d\u76ee\u5f55\u5e76\u914d\u7f6e\u9632\u706b\u5899\uff0c\u4ec5\u5141\u8bb8 OpenAI API \u8bbf\u95ee\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u6ce8\u610f\u4e8b\u9879<\/strong>\uff1a\n<ul>\n<li>\u4e0d\u8981\u4f7f\u7528\u00a0<code>sudo npm install -g<\/code>\uff0c\u5e94\u4fee\u590d npm \u6743\u9650\uff1a\n<pre><code>sudo chown -R $(whoami) ~\/.npm\r\n<\/code><\/pre>\n<\/li>\n<li>\u786e\u4fdd API \u5bc6\u94a5\u6709\u6548\uff0c\u907f\u514d\u00a0<code>401<\/code>\u00a0\u6216\u00a0<code>429<\/code>\u00a0\u9519\u8bef\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>\u4f7f\u7528\u65b9\u6cd5<\/h3>\n<p>Codex CLI \u901a\u8fc7\u7ec8\u7aef\u547d\u4ee4\u64cd\u4f5c\uff0c\u7ed3\u5408\u81ea\u7136\u8bed\u8a00\u548c\u6c99\u7bb1\u73af\u5883\uff0c\u63d0\u4f9b\u9ad8\u6548\u7f16\u7801\u4f53\u9a8c\u3002\u4ee5\u4e0b\u662f\u4e3b\u8981\u529f\u80fd\u7684\u4f7f\u7528\u6d41\u7a0b\uff1a<\/p>\n<h4>1. \u751f\u6210\u4ee3\u7801<\/h4>\n<ul>\n<li><strong>\u64cd\u4f5c\u6d41\u7a0b<\/strong>\uff1a\n<ul>\n<li>\u4ea4\u4e92\u6a21\u5f0f\uff1a\n<pre><code>codex\r\n<\/code><\/pre>\n<p>\u8f93\u5165\u63d0\u793a\uff0c\u5982\u201c\u521b\u5efa\u4e00\u4e2a Python \u51fd\u6570\u8ba1\u7b97\u6590\u6ce2\u90a3\u5951\u6570\u5217\u201d\u3002<\/li>\n<li>\u5355\u547d\u4ee4\u6a21\u5f0f\uff1a\n<pre><code>codex \"\u751f\u6210 JavaScript \u8fc7\u6ee4\u6570\u7ec4\u51fd\u6570\"\r\n<\/code><\/pre>\n<\/li>\n<li>Codex CLI \u751f\u6210\u4ee3\u7801\uff0c\u663e\u793a\u9884\u89c8\u3002<\/li>\n<li>\u8f93\u5165\u00a0<code>y<\/code>\u00a0\u63a5\u53d7\u5e76\u4fdd\u5b58\uff0c\u8f93\u5165\u00a0<code>n<\/code>\u00a0\u62d2\u7edd\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u9ad8\u7ea7\u9009\u9879<\/strong>\uff1a\n<ul>\n<li>\u6307\u5b9a\u6a21\u578b\uff1a\n<pre><code>codex --model o4-mini \"\u751f\u6210 Go HTTP \u670d\u52a1\u5668\"\r\n<\/code><\/pre>\n<\/li>\n<li>\u975e\u4ea4\u4e92\u6a21\u5f0f\uff1a\n<pre><code>codex -q \"\u751f\u6210 SQL \u67e5\u8be2\" &gt; output.sql\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u7279\u8272\u529f\u80fd<\/strong>\uff1a\n<ul>\n<li>\u652f\u6301 Python\u3001JavaScript\u3001TypeScript\u3001Go\u3001SQL \u7b49\u8bed\u8a00\u3002<\/li>\n<li>\u53ef\u5904\u7406\u590d\u6742\u4efb\u52a1\uff0c\u5982\u201c\u751f\u6210\u5e26\u7528\u6237\u8ba4\u8bc1\u7684 Flask \u5e94\u7528\u201d\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>2. \u6587\u4ef6\u64cd\u4f5c\u4e0e Git \u96c6\u6210<\/h4>\n<ul>\n<li><strong>\u64cd\u4f5c\u6d41\u7a0b<\/strong>\uff1a\n<ul>\n<li>\u7f16\u8f91\u6587\u4ef6\uff1a\n<pre><code>codex \"\u5728 src\/app.js \u4e2d\u6dfb\u52a0\u767b\u5f55\u529f\u80fd\"\r\n<\/code><\/pre>\n<\/li>\n<li>Codex CLI \u663e\u793a\u4ee3\u7801\u5dee\u5f02\uff0c\u786e\u8ba4\u540e\u4fdd\u5b58\u3002<\/li>\n<li>\u63d0\u4ea4\u5230 Git\uff1a\n<pre><code>codex \"\u63d0\u4ea4\u66f4\u6539\uff0c\u6d88\u606f\u4e3a '\u6dfb\u52a0\u767b\u5f55\u529f\u80fd'\"\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u7279\u8272\u529f\u80fd<\/strong>\uff1a\n<ul>\n<li>\u81ea\u52a8\u5904\u7406 Git \u547d\u4ee4\uff08<code>add<\/code>\u3001<code>commit<\/code>\uff09\u3002<\/li>\n<li>\u652f\u6301\u6279\u91cf\u64cd\u4f5c\uff0c\u5982\uff1a\n<pre><code>codex \"\u91cd\u547d\u540d\u6240\u6709 *.jpeg \u4e3a *.jpg \u5e76\u66f4\u65b0\u5f15\u7528\"\r\n<\/code><\/pre>\n<\/li>\n<li>\u63d0\u4f9b\u4e09\u79cd\u5ba1\u6279\u6a21\u5f0f\uff1a\n<ul>\n<li><code>suggest<\/code>\uff1a\u9ed8\u8ba4\uff0c\u9700\u624b\u52a8\u786e\u8ba4\u6240\u6709\u66f4\u6539\u3002<\/li>\n<li><code>auto-edit<\/code>\uff1a\u81ea\u52a8\u5e94\u7528\u6587\u4ef6\u66f4\u6539\uff0c\u547d\u4ee4\u9700\u786e\u8ba4\u3002<\/li>\n<li><code>full-auto<\/code>\uff1a\u5168\u81ea\u52a8\uff0c\u9700\u8c28\u614e\u4f7f\u7528\uff1a\n<pre><code>codex --approval-mode full-auto \"\u66f4\u65b0 README\"\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>3. \u8fd0\u884c\u4ee3\u7801<\/h4>\n<ul>\n<li><strong>\u64cd\u4f5c\u6d41\u7a0b<\/strong>\uff1a\n<ul>\n<li>\u6267\u884c\u4ee3\u7801\uff1a\n<pre><code>codex \"\u8fd0\u884c src\/main.py\"\r\n<\/code><\/pre>\n<\/li>\n<li>Codex CLI \u5728\u6c99\u7bb1\u4e2d\u8fd0\u884c\uff0c\u663e\u793a\u7ed3\u679c\u3002<\/li>\n<li>\u82e5\u7f3a\u5c11\u4f9d\u8d56\uff0c\u63d0\u793a\u5b89\u88c5\uff1a\n<pre><code>codex \"\u5b89\u88c5 numpy \u5e76\u8fd0\u884c script.py\"\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u7279\u8272\u529f\u80fd<\/strong>\uff1a\n<ul>\n<li>macOS \u4f7f\u7528 Apple Seatbelt \u6c99\u7bb1\uff0cLinux \u4f7f\u7528 Docker\u3002<\/li>\n<li>\u9ed8\u8ba4\u7981\u7528\u7f51\u7edc\uff0c\u9632\u6b62\u610f\u5916\u8bbf\u95ee\u3002<\/li>\n<li>\u652f\u6301\u8c03\u8bd5\u8f93\u51fa\uff0c\u663e\u793a\u9519\u8bef\u8be6\u60c5\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>4. \u591a\u6a21\u6001\u8f93\u5165<\/h4>\n<ul>\n<li><strong>\u64cd\u4f5c\u6d41\u7a0b<\/strong>\uff1a\n<ul>\n<li>\u8f93\u5165\u56fe\u50cf\u8def\u5f84\uff1a\n<pre><code>codex \"\u6839\u636e ui.png \u5b9e\u73b0\u754c\u9762\u4ee3\u7801\"\r\n<\/code><\/pre>\n<\/li>\n<li>Codex CLI \u5206\u6790\u56fe\u50cf\uff0c\u751f\u6210 HTML\/CSS \u6216\u524d\u7aef\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u7279\u8272\u529f\u80fd<\/strong>\uff1a\n<ul>\n<li>\u652f\u6301 UI \u8bbe\u8ba1\u5230\u4ee3\u7801\u7684\u8f6c\u6362\u3002<\/li>\n<li>\u53ef\u5904\u7406\u56fe\u8868\u6216\u6d41\u7a0b\u56fe\uff0c\u751f\u6210\u903b\u8f91\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>5. \u914d\u7f6e\u4e0e\u81ea\u5b9a\u4e49<\/h4>\n<ul>\n<li><strong>\u914d\u7f6e\u6587\u4ef6<\/strong>\uff1a\n<ul>\n<li>\u5168\u5c40\u914d\u7f6e\uff1a<code>~\/.codex\/config.yaml<\/code>\uff1a\n<pre><code>model: o4-mini\r\nfullAutoErrorMode: ask-user\r\n<\/code><\/pre>\n<\/li>\n<li>\u6307\u4ee4\u6587\u4ef6\uff1a<code>~\/.codex\/instructions.md<\/code>\uff1a\n<pre><code>- \u4f7f\u7528 Python 3.9\r\n- \u7981\u6b62\u81ea\u52a8\u63d0\u4ea4 Git\r\n<\/code><\/pre>\n<\/li>\n<li>\u9879\u76ee\u7ea7\u914d\u7f6e\uff1a\u9879\u76ee\u6839\u76ee\u5f55\u7684\u00a0<code>codex.md<\/code>\uff1a\n<pre><code>- \u4f18\u5148\u4f7f\u7528 TypeScript\r\n- \u8fd0\u884c\u6d4b\u8bd5\u524d\u6267\u884c npm run lint\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u7981\u7528\u9879\u76ee\u6587\u6863<\/strong>\uff1a\n<pre><code>codex --no-project-doc<\/code><\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li><strong>\u5ba1\u6279\u6a21\u5f0f\u5207\u6362<\/strong>\uff1a\n<pre><code>codex --approval-mode auto-edit\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<h4>6. CI\/CD \u96c6\u6210<\/h4>\n<ul>\n<li><strong>\u64cd\u4f5c\u6d41\u7a0b<\/strong>\uff1a\n<ul>\n<li>\u5728 GitHub Actions \u4e2d\u8fd0\u884c\uff1a\n<pre><code>- name: \u66f4\u65b0\u6587\u6863\r\nrun: |\r\nnpm install -g @openai\/codex\r\nexport OPENAI_API_KEY=\"${{ secrets.OPENAI_KEY }}\"\r\ncodex -a auto-edit -q \"\u66f4\u65b0 CHANGELOG\"\r\n<\/code><\/pre>\n<\/li>\n<li>\u8bbe\u7f6e\u9759\u9ed8\u6a21\u5f0f\uff1a\n<pre><code>export CODEX_QUIET_MODE=1\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u7279\u8272\u529f\u80fd<\/strong>\uff1a\n<ul>\n<li>\u652f\u6301\u975e\u4ea4\u4e92\u6a21\u5f0f\uff0c\u9002\u5408\u81ea\u52a8\u5316\u6d41\u7a0b\u3002<\/li>\n<li>\u8f93\u51fa JSON \u683c\u5f0f\uff0c\u4fbf\u4e8e\u811a\u672c\u5904\u7406\uff1a\n<pre><code>codex -q --json \"\u751f\u6210\u914d\u7f6e\"\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u6ce8\u610f\u4e8b\u9879<\/h3>\n<ul>\n<li>\u786e\u4fdd\u76ee\u5f55\u53d7 Git \u8ddf\u8e2a\uff0c<code>full-auto<\/code>\u00a0\u6a21\u5f0f\u4f1a\u5728\u975e Git \u76ee\u5f55\u4e2d\u53d1\u51fa\u8b66\u544a\u3002<\/li>\n<li>\u68c0\u67e5 API \u5bc6\u94a5\u914d\u989d\uff0c\u9891\u7e41\u8c03\u7528\u53ef\u80fd\u89e6\u53d1\u9650\u5236\u3002<\/li>\n<li>\u9879\u76ee\u4e3a\u5b9e\u9a8c\u6027\uff0c\u53ef\u80fd\u6709\u4e0d\u7a33\u5b9a\u529f\u80fd\uff0c\u5efa\u8bae\u5173\u6ce8 GitHub \u52a8\u6001\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u5e94\u7528\u573a\u666f<\/h2>\n<ol>\n<li><strong>\u5feb\u901f\u539f\u578b\u5f00\u53d1<\/strong><br \/>\n\u5f00\u53d1\u8005\u53ef\u901a\u8fc7\u81ea\u7136\u8bed\u8a00\u5feb\u901f\u751f\u6210\u4ee3\u7801\u6846\u67b6\u3002\u4f8b\u5982\uff0c\u8f93\u5165\u201c\u521b\u5efa\u5e26\u6570\u636e\u5e93\u7684 Express \u5e94\u7528\u201d\uff0cCodex CLI \u751f\u6210\u8def\u7531\u3001\u6a21\u578b\u548c\u914d\u7f6e\u6587\u4ef6\uff0c\u9002\u5408\u9a8c\u8bc1\u60f3\u6cd5\u3002<\/li>\n<li><strong>\u81ea\u52a8\u5316\u4efb\u52a1<\/strong><br \/>\nCodex CLI \u7b80\u5316\u91cd\u590d\u4efb\u52a1\uff0c\u5982\u201c\u66f4\u65b0\u6240\u6709\u6587\u4ef6\u4e2d\u7684\u7248\u6743\u58f0\u660e\u5e76\u63d0\u4ea4\u201d\u3002\u5b83\u81ea\u52a8\u7f16\u8f91\u6587\u4ef6\u3001\u8fd0\u884c\u811a\u672c\u5e76\u63a8\u9001\u5230 Git\uff0c\u9002\u5408\u6279\u91cf\u64cd\u4f5c\u3002<\/li>\n<li><strong>\u7f16\u7a0b\u5b66\u4e60<\/strong><br \/>\n\u521d\u5b66\u8005\u53ef\u8f93\u5165\u201c\u7528 Python \u5b9e\u73b0\u5feb\u901f\u6392\u5e8f\u201d\uff0cCodex CLI \u751f\u6210\u4ee3\u7801\u5e76\u89e3\u91ca\u903b\u8f91\uff0c\u9002\u5408\u81ea\u5b66\u6216\u8bfe\u5802\u6559\u5b66\u3002<\/li>\n<li><strong>\u5f00\u6e90\u534f\u4f5c<\/strong><br \/>\n\u5f00\u53d1\u8005\u53ef\u901a\u8fc7 GitHub \u53c2\u4e0e Codex CLI \u5f00\u53d1\uff0c\u63d0\u4ea4 bug \u4fee\u590d\u6216\u65b0\u529f\u80fd\uff0c\u900f\u660e\u7684\u4ee3\u7801\u5e93\u4fbf\u4e8e\u534f\u4f5c\u3002<\/li>\n<li><strong>CI\/CD \u7ba1\u9053<\/strong><br \/>\n\u5728 CI \u73af\u5883\u4e2d\uff0cCodex CLI \u53ef\u81ea\u52a8\u66f4\u65b0\u6587\u6863\u3001\u751f\u6210\u6d4b\u8bd5\u7528\u4f8b\u6216\u4fee\u590d lint \u9519\u8bef\uff0c\u63d0\u5347\u5f00\u53d1\u6548\u7387\u3002<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2>QA<\/h2>\n<ol>\n<li><strong>Codex CLI \u4e0e 2021 \u5e74\u7684 Codex \u6a21\u578b\u6709\u4f55\u4e0d\u540c\uff1f<\/strong><br \/>\nCodex CLI \u662f\u57fa\u4e8e\u6700\u65b0 OpenAI \u6a21\u578b\uff08o3\u3001o4-mini\uff09\u7684\u7ec8\u7aef\u5de5\u5177\uff0c\u4e0e 2021 \u5e74\u5df2\u505c\u7528\u7684 Codex \u6a21\u578b\u65e0\u5173\uff0c\u529f\u80fd\u66f4\u5f3a\u5927\u4e14\u5f00\u6e90\u3002<\/li>\n<li><strong>\u5982\u4f55\u786e\u4fdd\u64cd\u4f5c\u5b89\u5168\uff1f<\/strong><br \/>\nCodex CLI \u9ed8\u8ba4\u5728\u6c99\u7bb1\u4e2d\u8fd0\u884c\uff0cmacOS \u4f7f\u7528 Apple Seatbelt\uff0cLinux \u4f7f\u7528 Docker\uff0c\u7981\u7528\u7f51\u7edc\u5e76\u9650\u5236\u76ee\u5f55\u8bbf\u95ee\uff0c\u907f\u514d\u7cfb\u7edf\u98ce\u9669\u3002<\/li>\n<li><strong>\u652f\u6301\u54ea\u4e9b\u7f16\u7a0b\u8bed\u8a00\uff1f<\/strong><br \/>\n\u652f\u6301 Python\u3001JavaScript\u3001TypeScript\u3001Go\u3001SQL \u7b49\uff0c\u5177\u4f53\u7531\u4f7f\u7528\u7684 OpenAI \u6a21\u578b\u51b3\u5b9a\uff0c\u53ef\u901a\u8fc7\u6307\u4ee4\u6307\u5b9a\u8bed\u8a00\u3002<\/li>\n<li><strong>Codex CLI \u514d\u8d39\u5417\uff1f<\/strong><br \/>\nCodex CLI \u672c\u8eab\u514d\u8d39\uff0c\u4f46\u9700 OpenAI API \u5bc6\u94a5\uff0cAPI \u8c03\u7528\u53ef\u80fd\u4ea7\u751f\u8d39\u7528\uff0c\u8be6\u60c5\u89c1\u00a0OpenAI \u5b9a\u4ef7\u3002<\/li>\n<li><strong>\u5982\u4f55\u505c\u6b62 Codex CLI \u4fee\u6539\u6587\u4ef6\uff1f<\/strong><br \/>\n\u4f7f\u7528\u00a0<code>suggest<\/code>\u00a0\u6a21\u5f0f\uff0c\u6240\u6709\u66f4\u6539\u9700\u624b\u52a8\u786e\u8ba4\uff1a<\/p>\n<pre><code>codex --approval-mode suggest\r\n<\/code><\/pre>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>OpenAI Codex CLI \u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u7ec8\u7aef\u7f16\u7801\u5de5\u5177\uff0c\u7531 OpenAI \u5f00\u53d1\uff0c\u4e13\u4e3a\u4e60\u60ef\u7ec8\u7aef\u7684\u5f00\u53d1\u8005\u8bbe\u8ba1\u3002\u5b83\u901a\u8fc7\u81ea\u7136\u8bed\u8a00\u6307\u4ee4\u751f\u6210\u4ee3\u7801\u3001\u7f16\u8f91\u6587\u4ef6\u3001\u6267\u884c\u547d\u4ee4\uff0c\u5e76\u96c6\u6210 Git \u7248\u672c\u63a7\u5236\u3002Codex CLI \u4f7f\u7528 OpenAI \u7684\u6700\u65b0\u6a21\u578b\uff08\u5982 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":32782,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[417,20,493],"tags":[230,221],"class_list":["post-30531","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-productivity","category-tool","category-ai-programming","tag-aikaiyuanxiangmu","tag-aibiancheng"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts\/30531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/comments?post=30531"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts\/30531\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/media\/32782"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/media?parent=30531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/categories?post=30531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/tags?post=30531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}