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
Message: fmt.Sprintf("running workflows on GitHub Actions: %v", err),
@@ -296,6 +297,7 @@ func init() {
296
297
runCmd.Flags().StringP("engine", "a", "", "Override AI engine (claude, codex, copilot, custom)")
297
298
runCmd.Flags().StringP("repo", "r", "", "Repository to run the workflow in (owner/repo format)")
298
299
runCmd.Flags().Bool("auto-merge-prs", false, "Auto-merge any pull requests created during the workflow execution")
300
+
runCmd.Flags().Bool("use-local-secrets", false, "Use local environment API key secrets for workflow execution (pushes and cleans up secrets in repository)")
gh aw add githubnext/agentics/ci-doctor # Add workflow and compile to GitHub Actions
26
26
gh aw compile # Recompile to GitHub Actions
27
27
gh aw trial githubnext/agentics/ci-doctor # Test workflow safely before adding
28
-
gh aw trial ./my-workflow.md # Test local workflow during development
28
+
gh aw trial ./my-workflow.md --use-local-secrets # Test local workflow with local API keys
29
29
gh aw update # Update all workflows with source field
30
30
gh aw status # Check status
31
31
gh aw run daily-perf # Execute workflow
@@ -276,6 +276,7 @@ These commands control the execution and state of your compiled agentic workflow
276
276
gh aw run WorkflowName # Run single workflow
277
277
gh aw run WorkflowName1 WorkflowName2 # Run multiple workflows
278
278
gh aw run WorkflowName --repeat 3 # Run 3 times total
279
+
gh aw run workflow --use-local-secrets # Use local API keys for execution
279
280
gh aw run weekly-research --enable-if-needed --input priority=high
280
281
```
281
282
@@ -287,6 +288,7 @@ Test workflows safely in a temporary private repository without affecting your t
287
288
gh aw trial githubnext/agentics/ci-doctor # Test from source repo
288
289
gh aw trial ./my-local-workflow.md # Test local file
289
290
gh aw trial workflow1 workflow2 # Compare multiple workflows
291
+
gh aw trial ./workflow.md --use-local-secrets # Use local API keys for trial
290
292
gh aw trial ./workflow.md --logical-repo myorg/myrepo --host-repo myorg/host-repo # Act as if in a different logical repo. Uses PAT to see issues/PRs
291
293
gh aw trial ./workflow.md --clone-repo myorg/myrepo --host-repo myorg/host-repo # Copy the code of the clone repo for into host repo. Agentic will see the codebase of clone repo but not the issues/PRs.
292
294
gh aw trial ./workflow.md --append "Extra content"# Append custom content to workflow
@@ -298,6 +300,7 @@ gh aw trial githubnext/agentics/issue-triage --trigger-context "#456"
298
300
Other flags:
299
301
--engine ENGINE # Override engine (default: from frontmatter)
300
302
--auto-merge-prs # Auto-merge PRs created during trial
303
+
--use-local-secrets # Use local environment API keys (pushes/cleans up secrets)
301
304
--repeat N # Repeat N times
302
305
--force-delete-host-repo-before # Force delete existing host repo BEFORE start
303
306
--delete-host-repo-after # Delete host repo AFTER trial
@@ -310,6 +313,31 @@ When using `gh aw trial --logical-repo`, the agentic workflow operates as if it
310
313
311
314
When using `gh aw trial --clone-repo`, the agentic workflow uses the codebase from the specified clone repository while still interacting with issues and pull requests from the host repository. This allows for testing how the workflow would behave with a different codebase while maintaining access to the relevant repository data.
312
315
316
+
### Using Local API Keys
317
+
318
+
Both `run` and `trial` commands support the `--use-local-secrets` flag to automatically push required API key secrets from your local environment to the repository before execution:
319
+
320
+
```bash
321
+
gh aw run my-workflow --use-local-secrets # Use local API keys for run
322
+
gh aw trial ./workflow.md --use-local-secrets # Use local API keys for trial
323
+
```
324
+
325
+
**How it works:**
326
+
- Reads API keys from environment variables (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `COPILOT_CLI_TOKEN`, etc.)
327
+
- Temporarily pushes the required secrets to the repository before workflow execution
328
+
- Automatically cleans up (deletes) the secrets after completion
329
+
- Only pushes secrets that are actually needed by the workflow's AI engine
330
+
331
+
**When to use:**
332
+
- Testing workflows that require AI engine secrets not yet configured in the repository
333
+
- Trial mode when you want to test with your local API keys
334
+
- Development environments where you don't want to permanently store secrets
335
+
336
+
**Security notes:**
337
+
- Secrets are only pushed temporarily and are cleaned up automatically
338
+
- Use with caution in shared or production repositories
339
+
- Consider using repository secrets for permanent deployments
0 commit comments