You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: fix --output flag description to match actual behavior
- --output accepts full file path, format auto-detected from extension
- --output-dir for directory-only (uses default filename)
- Copilot's assumption was incorrect for this implementation
Signed-off-by: spencercjh <spencercjh@gmail.com>
Copy file name to clipboardExpand all lines: docs/configuration.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,9 @@ Complete reference for `.spec-forge.yaml` configuration.
4
4
5
5
## Configuration File Location
6
6
7
-
Spec Forge looks for `.spec-forge.yaml` in:
7
+
Spec Forge looks for `.spec-forge.yaml` in the current working directory only.
8
8
9
-
1. Current working directory
10
-
2. Project directory (when using `spec-forge generate ./project`)
9
+
**Note:** If you run `spec-forge generate ./path/to/project`, the config file must be in your current directory, not in `./path/to/project`. Use `--config /path/to/.spec-forge.yaml` to specify a custom location.
Environment variable containing the API key. **Only used for `custom` provider.**
130
129
131
130
```yaml
132
131
enrich:
133
-
apiKeyEnv: LLM_API_KEY
132
+
provider: custom
133
+
apiKeyEnv: MY_API_KEY
134
134
```
135
135
136
-
Default: `LLM_API_KEY`for custom, `OPENAI_API_KEY` for OpenAI, etc.
136
+
**Note:** For OpenAI and Anthropic providers, API keys are always read from `OPENAI_API_KEY` and `ANTHROPIC_API_KEY` respectively. The `apiKeyEnv` setting only applies to custom providers.
137
137
138
138
### `enrich.language`
139
139
@@ -174,7 +174,7 @@ output:
174
174
175
175
Default: Current directory
176
176
177
-
CLI equivalent: `--output`(accepts file or directory)
177
+
CLI equivalent: `--output-dir`for directory, `--output` for full file path
Keep API keys in environment variables, never in config files:
197
200
198
201
```yaml
202
+
# .spec-forge.yaml - Safe: no API keys
199
203
enrich:
200
-
apiKeyEnv: OPENAI_API_KEY # Instead of apiKey
204
+
enabled: true
205
+
provider: openai
206
+
model: gpt-4o
207
+
```
201
208
202
-
readme:
203
-
# No slug here, pass via CLI or keep in CI secrets
209
+
```bash
210
+
# Set environment variable
211
+
export OPENAI_API_KEY="sk-xxx"
212
+
213
+
# Run spec-forge
214
+
spec-forge generate ./
204
215
```
205
216
217
+
**Note:** For OpenAI and Anthropic, API keys are always read from `OPENAI_API_KEY` and `ANTHROPIC_API_KEY` respectively. For custom providers, use `LLM_API_KEY` or set `apiKeyEnv` in config.
Copy file name to clipboardExpand all lines: docs/quick-start.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ Requirements:
109
109
110
110
## Configuration
111
111
112
-
Create `.spec-forge.yaml` in your project root:
112
+
Create `.spec-forge.yaml` in your **current working directory**:
113
113
114
114
```yaml
115
115
# AI Enrichment
@@ -127,6 +127,8 @@ output:
127
127
format: yaml # yaml or json
128
128
```
129
129
130
+
**Important:** Spec Forge reads `.spec-forge.yaml` from the current working directory, not the project directory. If you run `spec-forge generate ./path/to/project`, ensure the config file is in your current directory, not `./path/to/project`.
0 commit comments