0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Codex CLIをコマンドとして使う

Posted at

Codex CLIをコマンドとして使う

Codex CLIを起動すると「対話型モード」になるわけですが、プロンプトを引数にしてコマンドで使うと便利かもしれないと思いました。

codex exec --yolo --skip-git-repo-check "pythonでおみくじアプリを作って"

「-skip-git-repo-check」はgitのリポジトリとしてフォルダが登録されてないと動かないのでそのチェックを外す。
これで一連の操作が終った後、Codex CLI自体も終了した。
バッチファイルを組んでも良いし、プログラムでプロンプト部分を作っても良いと思う。

プロンプトをファイルとして与えたいなら例えば「Agents.md」に書いておいて"Agents.mdを読んで実行して"とプロンプトに与えれば良いわけです。

codex exec --yolo --skip-git-repo-check "Agents.mdを読んで実行して"
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?