Commands ( /specify, ...) are ignored for Codex Cli
commands should be installed in ~/.codex/prompts/ not in projectfolder/.codex/commands/
They are ignored by Codex Cli.
Same issue here.
same issue
You'd need to set your $CODEX_HOME env variable on a per-project basis, as well as link the commands dir to prompts. I use devbox for most of my projects (you could also use something like direnv):
devbox.json
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
"packages": [],
"env": {
"CODEX_HOME": "$DEVBOX_PROJECT_ROOT/.codex"
},
"shell": {
"init_hook": [
"[ ! -e $DEVBOX_PROJECT_ROOT/.codex/prompts ] && ln -s $DEVBOX_PROJECT_ROOT/.codex/commands $DEVBOX_PROJECT_ROOT/.codex/prompts || true"
],
"scripts": {
"codex": [
"codex"
]
}
}
}
Now if you run devbox run codex, you should get your prompts.
Optionally, you can also link your global codex auth.json and config.toml files:
ln -s ~/.codex/auth.json .codex/auth.json
ln -s ~/.codex/config.toml .codex/config.toml
That way you don't need per project authentication and settings.
Whatever you do, make absolutely sure you have .codex/auth.json in your .gitignore file at minimum. My .gitignore looks like this:
.codex/*
!.codex/commands
Seems like the codex support was released a little prematurely :)
Will get this fixed today - looking at latest code.
I updated the latest release with guidelines on setting the env var. The files are now also dropped into .codex/prompts properly. @miklschmidt @edelah @whittenator - please verify
@localden confirmed, it works when following the provided guidance after initializing 👍
@localden is there a way to prepopulate .gitignore? Codex will place auth tokens directly in the .codex folder.
Is the guide supposed to be referenced after initializing spec kit on the project? because it's not showing anything relevant to me.
I updated the latest release with guidelines on setting the env var. The files are now also dropped into
.codex/promptsproperly. @miklschmidt @edelah @whittenator - please verify
Sorry currently not able to test this out. Got rate limited and have to wait 3 days to use Codex again :(
@localden is there a way to prepopulate .gitignore? Codex will place auth tokens directly in the .codex folder.
I am going to add a warning in Specify about this, but I don't think I can do a blanket exclusion here. I try not to interfere with things like .gitignore too much because these files are so developer-specific.
Is the guide supposed to be referenced after initializing spec kit on the project? because it's not showing anything relevant to me.
Tell me more - what guide and referenced when/where?
I updated the latest release with guidelines on setting the env var. The files are now also dropped into
.codex/promptsproperly. @miklschmidt @edelah @whittenator - please verify
This. please explain how to access these guidelines @localden
i tested and i can see the commands are being dropped in the prompts folder now. still needed to copy them to the ~/.codex/prompts and it was recognized by codex. but after running /specify feature text for example. codex doesn't recognize the arguments and replies that the arguments are empty and terminates the processes. i assume am missing settings up the codex home variable. i would like to understand more what is the correct setup :). Thank you for you work.
@abdull1986 this is related to #448 #454 - there is a gap in Codex CLI (https://github.com/openai/codex/issues/2890).
Closing the issue as the Codex CLI integration should now be working. Please open a new one if there are more issues!