Skip to content

Commit d682f5a

Browse files
committed
Clarification
1 parent 895bcbe commit d682f5a

2 files changed

Lines changed: 30 additions & 3 deletions

File tree

.github/workflows/scripts/create-release-packages.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ build_variant() {
161161
mkdir -p "$base_dir/.windsurf/workflows"
162162
generate_commands windsurf md "\$ARGUMENTS" "$base_dir/.windsurf/workflows" "$script" ;;
163163
codex)
164-
mkdir -p "$base_dir/.codex/commands"
165-
generate_commands codex md "\$ARGUMENTS" "$base_dir/.codex/commands" "$script" ;;
164+
mkdir -p "$base_dir/.codex/prompts"
165+
generate_commands codex md "\$ARGUMENTS" "$base_dir/.codex/prompts" "$script" ;;
166166
esac
167167
( cd "$base_dir" && zip -r "../spec-kit-template-${agent}-${script}-${NEW_VERSION}.zip" . )
168168
echo "Created $GENRELEASES_DIR/spec-kit-template-${agent}-${script}-${NEW_VERSION}.zip"

src/specify_cli/__init__.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import zipfile
2929
import tempfile
3030
import shutil
31+
import shlex
3132
import json
3233
from pathlib import Path
3334
from typing import Optional, Tuple
@@ -983,12 +984,24 @@ def init(
983984
# Boxed "Next steps" section
984985
steps_lines = []
985986
if not here:
986-
steps_lines.append(f"1. [bold green]cd {project_name}[/bold green]")
987+
steps_lines.append(f"1. Go to the project folder: [cyan]cd {project_name}[/cyan]")
987988
step_num = 2
988989
else:
989990
steps_lines.append("1. You're already in the project directory!")
990991
step_num = 2
991992

993+
# Add Codex-specific setup step if needed
994+
if selected_ai == "codex":
995+
codex_path = project_path / ".codex"
996+
quoted_path = shlex.quote(str(codex_path))
997+
if os.name == "nt": # Windows
998+
cmd = f"setx CODEX_HOME {quoted_path}"
999+
else: # Unix-like systems
1000+
cmd = f"export CODEX_HOME={quoted_path}"
1001+
1002+
steps_lines.append(f"{step_num}. Set [cyan]CODEX_HOME[/cyan] environment variable before running Codex: [cyan]{cmd}[/cyan]")
1003+
step_num += 1
1004+
9921005
steps_lines.append(f"{step_num}. Start using slash commands with your AI agent:")
9931006
steps_lines.append(" 2.1 [cyan]/constitution[/] - Establish project principles")
9941007
steps_lines.append(" 2.2 [cyan]/specify[/] - Create specifications")
@@ -1000,6 +1013,20 @@ def init(
10001013
console.print()
10011014
console.print(steps_panel)
10021015

1016+
# Add Codex warning if using Codex
1017+
if selected_ai == "codex":
1018+
warning_text = """[bold yellow]Important Note:[/bold yellow]
1019+
1020+
Custom prompts do not yet support arguments in Codex. You may need to manually
1021+
specify additional project instructions directly in prompt files located in
1022+
[cyan].codex/prompts/[/cyan].
1023+
1024+
For more information, see: [cyan]https://github.com/openai/codex/issues/2890[/cyan]"""
1025+
1026+
warning_panel = Panel(warning_text, title="Slash Commands in Codex", border_style="yellow", padding=(1,2))
1027+
console.print()
1028+
console.print(warning_panel)
1029+
10031030
@app.command()
10041031
def check():
10051032
"""Check that all required tools are installed."""

0 commit comments

Comments
 (0)