の日記
今日やったこと
日常
義姉たちからもらったシールの入っているウエハースのウエハースを貰ったので、仕事のお供に食べていた。ウエハース美味しいね。
レガシーコード改善ガイドが届いたよ!!思いのほか本が分厚い。熱が冷めぬうちに読み切りたいな。
昨日は義実家で娘の誕生日パーティが行われていたので、今日は3人でミニ誕生日会をした。みんなでおなじハンバーグを食べ、同じスープを飲んだ。
夜ご飯のあとのデザートで、おすすめされた成城石井のマスカルポーネプリンを食べた。名前のとおりもっちりとした触感でマスカルポーネを感じることができるプリンでした。生地は甘すぎず、上のカラメルも苦いタイプではなかったが、甘すぎるタイプでもなくちょうどよかった。妻の2等分にして食べることにしていたが、食べ始めは半分も食べられるか不安だった。結果としては、重すぎることもなくペロッと半分食べきることができた。
技術
- OpenRouterのAPIを$10分のクレジットを買った
- $10以上クレジット買うことで、無料で使えるAPIコール数が増えるらしい
- これで何か遊んでみます
- ChatGPTのwebクライアントからSoraに飛べることに気が付いた
- 動画を生成したかったのだが、新規アカウントはまだ動画を作れないようだ。。無念
- ChatGPT 4oさんに色んな画像を生成してもらっている
- 非常に便利
OpenAIが発表したCodex CLIというコーディングエージェントを入れてみた
2025/04/17 23:00時点でのcodexのヘルプはこのような感じ
> 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コマンドを単体で叩いてみた。
> 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-keysOPENAI_API_KEYを定義しないといけないようだ。
API_KEYは盛っていないので、今度試す。
今後はホワイトリスト形式でコマンドも叩けるようにしたいらしい
~/.codex/instructions.mdに全体的な指示、codex.mdがプロジェクトルートやcwd内の指示を書けるらしい。
claudeのAPIとopenrouterのAPI持ってる中でopen aiのAPIキーを購入するか悩むけども、今はとりあえず試すのが正しい時期なので明日以降試す。
仕事
今日中に終わると思っていた課題だが、あまりにも自信がないので明日に持ち越すことにした。
Where句が大きすぎると、もはや何をしたいのかが全く分からなくなる。
ドキュメントを整備していかないとなと強く思わされる。