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
Copy file name to clipboardExpand all lines: docs/guide/extending.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,6 +155,41 @@ export class MyCustomSource implements ConfigSource {
155
155
}
156
156
```
157
157
158
+
### Plugin Configuration
159
+
160
+
Plugins cannot add flags to commands they don't own (this is an oclif limitation). Instead, plugins should accept configuration via environment variables:
161
+
162
+
```bash
163
+
# Configure the example plugin's env file location
164
+
export B2C_ENV_FILE_PATH=/path/to/custom/.env.b2c
165
+
b2c code deploy
166
+
```
167
+
168
+
**Plugin authors should:**
169
+
170
+
1. Document supported environment variables in your plugin README
171
+
2. Use sensible defaults when env vars are not set
172
+
3. Access the `flags` property in hook options for future extensibility
173
+
174
+
**Hook Options:**
175
+
176
+
The hook receives a `flags` property containing all parsed CLI flags from the current command:
0 commit comments