の日記

今​日やった​こと

日常

義姉たちから​もらった​シールの​入っている​ウエハースの​ウエハースを​貰ったので、​仕事の​お供に​食べていた。​ウエハース美味しいね。

レガシーコード改善ガイドが​届いたよ!!​思いの​ほか本が​分厚い。​熱が​冷めぬうちに​読み切りたいな。

昨日は​義実家で​娘の​誕生日パーティが​行われていたので、​今日は​3人で​ミニ誕生日会を​した。​みんなで​おなじハンバーグを​食べ、​同じ​スープを​飲んだ。
夜​ご飯の​あとの​デザートで、​おすすめされた​成城石井の​マスカルポーネプリンを​食べた。​名前の​とおりも​っちりと​した​触感で​マスカルポーネを​感じる​ことができる​プリンでした。​生地は​甘すぎず、​上の​カラメルも​苦い​タイプではなかったが、​甘すぎる​タイプでもなく​ちょうど​よかった。​妻の​2等分に​して​食べる​ことに​していたが、​食べ始めは​半分も​食べられるか​不安だった。​結果と​しては、​重すぎる​こともなく​ペロッと​半分​食べきる​ことが​できた。

技術

OpenAIが​発表した​Codex CLIと​いう​コーディングエージェントを​入れてみた

https://openai.com/index/openai-codex/

2025/04/17 23:00時点での​codexの​ヘルプは​このような​感じ

1234567891011121314151617181920212223242526272829303132
> codex --help                                                                     
  Usage
    $ codex [options] <prompt>

  Options
    -h, --help                 Show usage and exit
    -m, --model <model>        Model to use for completions (default: o4-mini)
    -i, --image <path>         Path(s) to image files to include as input
    -v, --view <rollout>       Inspect a previously saved rollout instead of starting a session
    -q, --quiet                Non-interactive mode that only prints the assistant's final output
    -a, --approval-mode <mode> Override the approval policy: 'suggest', 'auto-edit', or 'full-auto'

    --auto-edit                Automatically approve file edits; still prompt for commands
    --full-auto                Automatically approve edits and commands when executed in the sandbox

    --no-project-doc           Do not automatically include the repository's 'codex.md'
    --project-doc <file>       Include an additional markdown file at <file> as context
    --full-stdout              Do not truncate stdout/stderr from command outputs

  Dangerous options
    --dangerously-auto-approve-everything
                               Skip all confirmation prompts and execute commands without
                               sandboxing. Intended solely for ephemeral local testing.

  Experimental options
    -f, --full-context         Launch in "full-context" mode which loads the entire repository
                               into context and applies a batch of edits in one go. Incompatible
                               with all other flags, except for --model.

  Examples
    $ codex "Write and run a python program that prints ASCII art"
    $ codex -q "fix build issues"

READMEの​gifには​引数を​渡して​実行していたが、​試しにcodexコマンドを​単体で​叩いてみた。

12345
> codex                                                                            
Missing OpenAI API key.

Set the environment variable OPENAI_API_KEY and re-run this command.
You can create a key here: https://platform.openai.com/account/api-keys

OPENAI_API_KEYを​定義しないと​いけないようだ。
API_KEYは​盛っていないので、​今度試す。
今後は​ホワイトリスト形式で​コマンドも​叩けるように​したいらしい
~/.codex/instructions.mdに​全体的な​指示、codex.mdが​プロジェクトルートや​cwd内の​指示を​書けるらしい。
claudeの​APIと​openrouterの​API​持ってる​中で​open aiの​APIキーを​購入するか​悩むけども、​今は​とりあえず試すのが​正しい​時期なので​明日以降試す。

仕事

今​日中に​終わると​思っていた​課題だが、​あまりにも​自信が​ないので​明日に​持ち越すことにした。
Where句が​大きすぎると、もは​や​何を​したいのかが​全く​分から​なくなる。
ドキュメントを​整備していかないとなと​強く​思わされる。

明日​以降やりたい​こと