Previously, users could supply their API key directly via: ```shell codex login --api-key KEY ``` but this has the drawback that `KEY` is more likely to end up in shell history, can be read from `/proc`, etc. This PR removes support for `--api-key` and replaces it with `--with-api-key`, which reads the key from stdin, so either of these are better options: ``` printenv OPENAI_API_KEY | codex login --with-api-key codex login --with-api-key < my_key.txt ``` Other CLIs, such as `gh auth login --with-token`, follow the same practice.
21 KiB
21 KiB