OpenAI Codex CLI: Lightweight coding agent that runs in your terminal

https://news.ycombinator.com/rss Hits: 23
Summary

OpenAI Codex CLI Lightweight coding agent that runs in your terminal npm i -g @openai/codex Quickstart Install globally: npm install -g @openai/codex Next, set your OpenAI API key as an environment variable: export OPENAI_API_KEY= " your-api-key-here " Note: This command sets the key only for your current terminal session. To make it permanent, add the export line to your shell's configuration file (e.g., ~/.zshrc ). Run interactively: codex Or, run with a prompt as input (and optionally in Full Auto mode): codex " explain this codebase to me " codex --approval-mode full-auto " create the fanciest todo-list app " That’s it – Codex will scaffold a file, run it inside a sandbox, install any missing dependencies, and show you the live result. Approve the changes and they’ll be committed to your working directory. Why Codex? Codex CLI is built for developers who already live in the terminal and want ChatGPT‑level reasoning plus the power to actually run code, manipulate files, and iterate – all under version control. In short, it’s chat‑driven development that understands and executes your repo. Zero setup — bring your OpenAI API key and it just works! — bring your OpenAI API key and it just works! Full auto-approval, while safe + secure by running network-disabled and directory-sandboxed by running network-disabled and directory-sandboxed Multimodal — pass in screenshots or diagrams to implement features ✨ And it's fully open-source so you can see and contribute to how it develops! Security Model & Permissions Codex lets you decide how much autonomy the agent receives and auto-approval policy via the --approval-mode flag (or the interactive onboarding prompt): Mode What the agent may do without asking Still requires approval Suggest (default) • Read any file in the repo • All file writes/patches • All shell/Bash commands Auto Edit • Read and apply‑patch writes to files • All shell/Bash commands Full Auto • Read/write files • Execute shell commands – In Full Auto every ...

First seen: 2025-04-16 19:19

Last seen: 2025-04-17 18:12