Commit Graph

45 Commits

Author SHA1 Message Date
Luci
1ef8e8afd3 docs: provider config (#653)
close: #651

Hi! @tibo-openai 👋 Could you share some great examples of
`instructions.md` files? Thanks!

---------

Co-authored-by: Thibault Sottiaux <tibo@openai.com>
2025-04-25 07:25:32 -07:00
Fouad Matin
bd1c3deed9 update: readme (#630)
- mention support for ZDR
- codex open source fund
2025-04-24 14:05:26 -07:00
Asa
d1c0d5e683 feat: update README and config to support custom providers with API k… (#577)
When using a non-built-in provider with the `--provider` option, users
are prompted:

```
Set the environment variable <provider>_API_KEY and re-run this command.
You can create a <provider>_API_KEY in the <provider> dashboard.
```

However, many users are confused because, even after correctly setting
`<provider>_API_KEY`, authentication may still fail unless
`OPENAI_API_KEY` is _also_ present in the environment. This is not
intuitive and leads to ambiguity about which API key is actually
required and used as a fallback, especially when using custom or
third-party (non-listed) providers.

Furthermore, the original README/documentation did not mention the
requirement to set `<provider>_BASE_URL` for non-built-in providers,
which is necessary for proper client behavior. This omission made the
configuration process more difficult for users trying to integrate with
custom endpoints.
2025-04-24 11:08:19 -07:00
Michael Bolin
94d5408875 add instructions for connecting to a visual debugger under Contributing (#496)
While here, I also moved the Nix stuff to the end of the
**Contributing** section and replaced some examples with `npm` to use
`pnpm`.
2025-04-22 09:43:10 -07:00
Michael Bolin
9b06fb48a7 add check to ensure ToC in README.md matches headings in the file (#541)
This introduces a Python script (written by Codex!) to verify that the
table of contents in the root `README.md` matches the headings. Like
`scripts/asciicheck.py` in https://github.com/openai/codex/pull/513, it
reports differences by default (and exits non-zero if there are any) and
also has a `--fix` option to synchronize the ToC with the headings.

This will be enforced by CI and the changes to `README.md` in this PR
were generated by the script, so you can see that our ToC was missing
some entries prior to this PR.
2025-04-22 09:38:12 -07:00
Michael Bolin
c00ae2dcc1 Enforce ASCII in README.md (#513)
This all started because I was going to write a script to autogenerate
the Table of Contents in the root `README.md`, but I noticed that the
`href` for the "Why Codex?" heading was `#whycodex` instead of
`#why-codex`. This piqued my curiosity and it turned out that the space
in "Why Codex?" was not an ASCII space but **U+00A0**, a non-breaking
space, and so GitHub ignored it when generating the `href` for the
heading.

This also meant that when I did a text search for `why codex` in the
`README.md` in VS Code, the "Why Codex" heading did not match because of
the presence of **U+00A0**.

In short, these types of Unicode characters seem like a hazard, so I
decided to introduce this script to flag them, and if desired, to
replace them with "good enough" ASCII equivalents. For now, this only
applies to the root `README.md` file, but I think we should ultimately
apply this across our source code, as well, as we seem to have quite a
lot of non-ASCII Unicode and it's probably going to cause `rg` to miss
things.

Contributions of this PR:

* `./scripts/asciicheck.py`, which takes a list of filepaths and returns
non-zero if any of them contain non-ASCII characters. (Currently, there
is one exception for  aka **U+2728**, though I would like to default to
an empty allowlist and then require all exceptions to be specified as
flags.)
* A `--fix` option that will attempt to rewrite files with violations
using a equivalents from a hardcoded substitution list.
* An update to `ci.yml` to verify `./scripts/asciicheck.py README.md`
succeeds.
* A cleanup of `README.md` using the `--fix` option as well as some
editorial decisions on my part.
* I tried to update the `href`s in the Table of Contents to reflect the
changes in the heading titles. (TIL that if a heading has a character
like `&` surrounded by spaces, it becomes `--` in the generated `href`.)
2025-04-22 10:07:40 -04:00
Fouad Matin
0e9d75657b update: readme (#491) 2025-04-21 15:06:03 -07:00
Daniel Nakov
e7a3eec942 docs: Add note about non-openai providers; add --provider cli flag to the help (#484) 2025-04-21 14:53:09 -07:00
Michael Bolin
d36d295a1a revert #386 due to unsafe shell command parsing (#478)
Reverts https://github.com/openai/codex/pull/386 because:

* The parsing logic for shell commands was unsafe (`split(/\s+/)`
instead of something like `shell-quote`)
* We have a different plan for supporting auto-approved commands.
2025-04-21 12:52:11 -04:00
John Gardner
965420cfc5 feat: read approvalMode from config file (#298)
This PR implements support for reading the approvalMode setting from the
user's config file (`~/.codex/config.json` or `~/.codex/config.yaml`),
allowing users to set a persistent default approval mode without needing
to specify command-line flags for each session.

Changes:
- Added approvalMode to the AppConfig type in config.ts
- Updated loadConfig() to read the approval mode from the config file
- Modified saveConfig() to persist the approval mode setting
- Updated CLI logic to respect the config-defined approval mode (while
maintaining CLI flag priority)
- Added comprehensive tests for approval mode config functionality
- Updated README to document the new config option in both YAML and JSON
formats
- additions to `.gitignore` for other CLI tools

Motivation:
As a user who regularly works with CLI-tools, I found it odd to have to
alias this with the command flags I wanted when `approvalMode` simply
wasn't being parsed even though it was an optional prop in `config.ts`.
This change allows me (and other users) to set the preference once in
the config file, streamlining daily usage while maintaining the ability
to override via command-line flags when needed.

Testing:
I've added a new test case loads and saves approvalMode correctly that
verifies:
- Reading the approvalMode from the config file works correctly
- Saving the approvalMode to the config file works as expected
- The value persists through load/save operations

All tests related to the implementation are passing.
2025-04-19 07:25:25 -07:00
autotaker
ca7ab76569 feat: add user-defined safe commands configuration and approval logic #380 (#386)
This pull request adds a feature that allows users to configure
auto-approved commands via a `safeCommands` array in the configuration
file.

## Related Issue
#380 

## Changes
- Added loading and validation of the `safeCommands` array in
`src/utils/config.ts`
- Implemented auto-approval logic for commands matching `safeCommands`
prefixes in `src/approvals.ts`
- Added test cases in `src/tests/approvals.test.ts` to verify
`safeCommands` behavior
- Updated documentation with examples and explanations of the
configuration
2025-04-18 22:35:32 -07:00
Benny Yen
fd6f6c51c0 docs: update README to use pnpm commands (#390)
Since we migrated to `pnpm` in #287, this updates the README to reflect
that change.
Just a small cleanup to align the commands with the current setup.
2025-04-18 22:16:13 -07:00
Gerred Dillon
41b8fe08dd feat: add Nix flake for reproducible development environments (#225)
This PR introduces a Nix flake configuration to enable reproducible
development environments:

- Adds flake.nix defining a devShell with necessary dependencies.
- Updates README.md with usage instructions for `nix develop`.
- Ensures CI compatibility with Nix for consistent builds.
2025-04-17 22:52:54 -07:00
gambhir ⚡
3e517201cd fix(docs): Fix the <details> misplace in README.md (#294)
#291 Fixes

Fix the misplace of `<details>`

**BEFORE**
<img width="876" alt="image"
src="https://github.com/user-attachments/assets/254de872-d08d-4bca-875a-36bf793e3cd3"
/>



**AFTER**
<img width="600" alt="image"
src="https://github.com/user-attachments/assets/337e3759-0c7b-4660-a9a6-c688cacf4c9d"
/>
2025-04-17 20:26:09 -07:00
Sam Verhasselt
6ee589cd1a feat(bin): support bun fallback runtime for codex CLI (#282)
This PR adds a shell wrapper in `codex-cli/bin/codex` to detect node or
bun as the runtime.

It updates:
- `package.json` bin entry
- published files list to include bin/
- README install instructions to include `bun install -g @openai/codex`
2025-04-17 17:32:19 -07:00
Fouad Matin
e80d1df172 add(.github): issue templates (#283)
Add issue templates for:
- Bug report
- Docs issue
2025-04-17 17:19:30 -07:00
kchro3
0a2e416b7a feat: add notifications for MacOS using Applescript (#160)
yolo'ed it with codex. Let me know if this looks good to you.

https://github.com/openai/codex/issues/148

tested with:
```
npm run build:dev
```

<img width="377" alt="Screenshot 2025-04-16 at 18 12 01"
src="https://github.com/user-attachments/assets/79aa799b-b0b9-479d-84f1-bfb83d34bfb9"
/>
2025-04-17 16:19:26 -07:00
Jon Church
d5eed65963 fix: npm run format:fix in root (#268)
stupid minor. unless you have main branch push setup to fix this
yourself, here you go

Latest commit is failing the format step in repo root

https://github.com/openai/codex/actions/runs/14524272942/job/40752229698
2025-04-17 13:39:50 -07:00
Dan Lewis
603def0c7a docs: mention dotenv support in Quickstart (#262)
Add a note in Quickstart that you can drop your API key into a `.env`
file
(since dotenv support was introduced in 40266be #122).

 Ran `npm test && npm run lint && npm run typecheck` locally

I have read the CLA Document and I hereby sign the CLA

Signed-off-by: Dan Lewis <dglewi@gmail.com>
2025-04-17 13:29:57 -07:00
Uladzimir Yancharuk
701b6736ff docs: add tracing instructions to README (#257)
**What**?
Add a `Tracing / Verbose Logging` section to the README

**Why**?
Enable easier troubleshooting by logging full API requests, responses,
and prompt details used during code generation.

**How**?

Inserted the new section between `Non‑interactive / CI mode` and `FAQ`.
2025-04-17 11:44:02 -07:00
Christopher Cooper
f9c15523e7 docs: clarify sandboxing situation on Linux (#103)
There doesn't appear to actually be any sandboxing on Linux. Correct the
README.

Signed-off-by: Christopher Cooper <christopher@cg505.com>
2025-04-17 08:15:39 -07:00
Alpha Diop
639c67b909 Feat/add husky (#223)
# Add Husky and lint-staged for automated code quality checks

## Description
This PR adds Husky Git hooks and lint-staged to automate code quality
checks during the development workflow.

## Features Added
- Pre-commit hook that runs lint-staged to check files before committing
- Pre-push hook that runs tests and type checking before pushing
- Configuration for lint-staged to format and lint different file types
- Documentation explaining the Husky setup and usage
- Updated README.md with information about Git hooks

## Benefits
- Ensures consistent code style across the project
- Prevents pushing code with failing tests or type errors
- Reduces the need for style-related code review comments
- Improves overall code quality

## Implementation Details
- Added Husky and lint-staged as dev dependencies
- Created pre-commit and pre-push hooks
- Added configuration for lint-staged
- Added documentation in HUSKY.md
- Updated README.md with a new section on Git hooks

## Testing
The hooks have been tested locally and work as expected:
- Pre-commit hook runs ESLint and Prettier on staged files
- Pre-push hook runs tests and type checking

I have read the CLA Document and I hereby sign the CLA

---------

Signed-off-by: Alpha Diop <alphakhoss@gmail.com>
2025-04-17 07:18:43 -07:00
Akshey D
842de865cd docs: add ZDR org limitation to README (#234)
**What?**
Add a section to the README documenting the current limitation for Codex
with Zero Data Retention (ZDR) organizations.

**Why?**
Users from ZDR organizations encounter errors due to the Responses API’s
requirement for `store:true`, which is incompatible with ZDR policies.
See #106 for more info.

**How?**
- Added a new section in the README, after FAQ and before Funding. 
- Explained the error message and reason.
- Linked to documentation as linked in the issue.
2025-04-17 07:09:23 -07:00
Thibault Sottiaux
4da38e7f01 (fix) move funding section before contrib section (#184)
Signed-off-by: Thibault Sottiaux <tibo@openai.com>
2025-04-16 21:01:03 -07:00
Mert Erbak
057f113c6d document Codex open source fund (#162)
I added a section about the Codex Open Source Fund to the README to
reach more developers.
2025-04-16 18:34:55 -07:00
Thibault Sottiaux
2aa8ae4167 fmt (#161)
Signed-off-by: Thibault Sottiaux <tibo@openai.com>
2025-04-16 18:15:22 -07:00
Thibault Sottiaux
9172840647 w
Signed-off-by: Thibault Sottiaux <tibo@openai.com>
2025-04-16 18:10:47 -07:00
Mehmet Vecdi Gönül
b8aea2340d minor change in description of Build from source in README.md (#149)
Separated the `node ./dist/cli.js --help ` and `node ./dist/cli.js `.
The comment suggested `node ./dist/cli.js --help ` was to run the
locally-built CLI but in fact it shows the usage an options. It is a
minor change and clarifies the flow for new developers.
2025-04-16 17:07:44 -07:00
Ashwin Ramaswami
099224e313 Fix markdown table in README (#144)
Before:

<img width="909" alt="image"
src="https://github.com/user-attachments/assets/8de0d798-5587-407a-9196-bda3e26c1331"
/>

After:

<img width="945" alt="image"
src="https://github.com/user-attachments/assets/90454694-2f26-49b1-8c4b-e017237797ca"
/>
2025-04-16 17:01:45 -07:00
Tomas Cupr
33d0d73b82 feat: add shell completion subcommand (#138)
Why
---
Improves the usability of the `codex` CLI by adding shell completion for
file paths. This allows users to quickly complete file arguments using
tab completion in bash, zsh, and fish shells. Enable via `eval "$(codex
completion <shell>)"`.
2025-04-16 16:34:44 -07:00
rohanoai
a39396d5c9 Adds link to prompting guide in README (#141) 2025-04-16 16:24:52 -07:00
Ilan Bigio
72d0230b33 Change bash to shell in README (#132) 2025-04-16 15:33:42 -07:00
Ilan Bigio
50925c0d6c Set up CLA process and remove DCO (#129)
Signed-off-by: Ilan Bigio <ilan@openai.com>
2025-04-16 15:24:31 -07:00
Isaac
cdd8b67dcd docs: add FAQ clarifying relation to OpenAI Codex (2021) (#91)
Signed-off-by: Isaac Gemal <isaacgemal@gmail.com>
2025-04-16 13:21:40 -07:00
Fouad Matin
3cd31c8e13 add: release script (#96)
* add: release script

* add: src to npm module

* fix: readme

Signed-off-by: Fouad Matin <fouad@openai.com>

---------

Signed-off-by: Fouad Matin <fouad@openai.com>
2025-04-16 13:21:22 -07:00
Abhinav Das
e8afebac15 changing some readme text to make it more exact (#77)
Making README more factually and grammatically exact.
2025-04-16 12:44:03 -07:00
Misha Davidov
a5641a0d9c [readme] security review recipe (#72)
* [readme] security review recipe
2025-04-16 12:12:44 -07:00
Samin Amanat
24e86da575 Update README.md (#46)
Fix a typo where a p should have been a q
2025-04-16 11:42:46 -07:00
Thibault Sottiaux
e323b2cc95 remove rg requirement (#50)
Signed-off-by: Thibault Sottiaux <tibo@openai.com>
2025-04-16 11:37:16 -07:00
Hugo
b84075aa64 add explanation on how to add OPENAI_API_KEY to docs (#28)
Signed-off-by: Hugo Biais <hugobiais75@gmail.com>
2025-04-16 11:24:35 -07:00
oai-ragona
501e96f3d5 [readme] Add recipe for code review (#40)
One of my favorite use cases is a read-only one; have `codex` suggest areas of the codebase that need attention. From here, it's also easy for the user to select one of the proposed tasks and have `codex` make the PR.
2025-04-16 11:19:58 -07:00
Arash Ari Sheyda
26d551e303 chore(readme): fix typos (#27) 2025-04-16 11:03:52 -07:00
ddgond
704df1efa3 Update README.md to include correct default (#12) 2025-04-16 10:45:24 -07:00
Thibault Sottiaux
4ad39fc4e1 remove triaging labels section + avoid capturing exitOnCtrlC for full-context mode
Signed-off-by: Thibault Sottiaux <tibo@openai.com>
2025-04-16 10:41:44 -07:00
Ilan Bigio
59a180ddec Initial commit
Signed-off-by: Ilan Bigio <ilan@openai.com>
2025-04-16 12:56:08 -04:00