CLI Examples
Create workflows from natural language
Section titled “Create workflows from natural language”The fastest way to get things done. Describe your task and SWEny builds a complete workflow:
Content generation with quality gates
Section titled “Content generation with quality gates”sweny workflow create "generate SEO blog posts for each topic in our \ content calendar, run each through an LLM quality judge that checks \ readability, accuracy, and keyword density, loop back for rewrites \ if quality fails, then publish passing content"Security audit
Section titled “Security audit”sweny workflow create "scan recent commits for exposed secrets, review \ open PRs for security-sensitive changes, check dependency files for \ known vulnerabilities, compile a security posture report, and create \ Linear tickets for any critical findings"Competitive analysis
Section titled “Competitive analysis”sweny workflow create "research the top 5 competitors in our space, \ gather pricing models, key features, and target audience for each, \ synthesize a competitive analysis comparing them across dimensions, \ and produce an executive brief with strategic recommendations"Product launch planning
Section titled “Product launch planning”sweny workflow create "research recent product launches for lessons \ learned, draft launch copy with a tagline, 3 value props, and a tweet, \ create a launch checklist as Linear issues, and compile a launch brief"Refine any workflow with natural language
Section titled “Refine any workflow with natural language”# Add a quality gate with loop-back logicsweny workflow edit .sweny/workflows/launch_planner.yml \ "add a quality gate after drafting copy that rejects taglines over \ 10 words or vague value props — loop back to redraft if rejected"
# Add notification stepssweny workflow edit .sweny/workflows/security_audit.yml \ "add a Slack notification after creating tickets"Run and manage workflows
Section titled “Run and manage workflows”# Run a workflowsweny workflow run .sweny/workflows/my-workflow.yml
# Dry run (validate structure, don't execute)sweny workflow run .sweny/workflows/my-workflow.yml --dry-run
# Validate without runningsweny workflow validate .sweny/workflows/my-workflow.yml
# Export a built-in workflow for customizationsweny workflow export triage > my-triage.yml
# List available skillssweny workflow listLocal-only mode (no external services)
Section titled “Local-only mode (no external services)”The fastest way to try the built-in triage workflow. Point it at a local log file and run entirely offline:
observability-provider: filelog-file: ./sample-errors.jsonissue-tracker-provider: filesource-control-provider: filenotification-provider: fileoutput-dir: .sweny/outputANTHROPIC_API_KEY=sk-ant-...sweny triage --dry-runOutput goes to .sweny/output/:
issues/LOCAL-1.md— issue ticketsprs/pr-1.md— PR descriptionsnotifications/summary-*.md— run summaries
Datadog with GitHub Issues
Section titled “Datadog with GitHub Issues”The most common production setup:
observability-provider: datadogissue-tracker-provider: github-issuessource-control-provider: githubtime-range: 4hseverity-focus: errorsANTHROPIC_API_KEY=sk-ant-...DD_API_KEY=your-api-keyDD_APP_KEY=your-app-keyGITHUB_TOKEN=ghp_...sweny triageSentry with Linear
Section titled “Sentry with Linear”observability-provider: sentrysentry-org: my-orgsentry-project: my-projectissue-tracker-provider: linearlinear-team-id: your-team-uuidANTHROPIC_API_KEY=sk-ant-...SENTRY_AUTH_TOKEN=sntrys_...LINEAR_API_KEY=lin_api_...GITHUB_TOKEN=ghp_...sweny triageGitLab with Jira
Section titled “GitLab with Jira”observability-provider: datadogsource-control-provider: gitlabissue-tracker-provider: jiragitlab-base-url: https://gitlab.mycompany.comANTHROPIC_API_KEY=sk-ant-...DD_API_KEY=your-api-keyDD_APP_KEY=your-app-keyGITLAB_TOKEN=glpat-...GITLAB_PROJECT_ID=my-group/my-projectJIRA_BASE_URL=https://mycompany.atlassian.netJIRA_EMAIL=bot@mycompany.comJIRA_API_TOKEN=your-tokensweny triageDry run (analyze only)
Section titled “Dry run (analyze only)”Analyze errors without creating issues or PRs. Useful for validating your setup or reviewing what the agent would do:
sweny triage --dry-runFilter to a specific service
Section titled “Filter to a specific service”Only investigate errors from billing services in the last 4 hours:
sweny triage \ --service-filter 'billing-*' \ --time-range 4h \ --severity-focus errorsThorough investigation with more turns
Section titled “Thorough investigation with more turns”Give the agent more room to explore complex issues:
sweny triage \ --investigation-depth thorough \ --max-investigate-turns 100 \ --max-implement-turns 50 \ --time-range 7dWork on a specific existing issue
Section titled “Work on a specific existing issue”Point the triage workflow at an existing issue instead of scanning for new ones:
sweny triage \ --issue-override 'ENG-123' \ --additional-instructions 'Focus on the webhook handler timeout'Implement a fix for a tracked issue
Section titled “Implement a fix for a tracked issue”Run the implement workflow directly on a known issue — skips log scanning entirely:
sweny implement ENG-123Pass additional guidance to the coding agent:
sweny implement ENG-123 \ --additional-instructions 'Add a null check before accessing event.payload.metadata'Use a different base branch:
sweny implement ENG-456 --base-branch developJSON output for scripting
Section titled “JSON output for scripting”Pipe structured output to other tools:
# Full JSON resultsweny triage --dry-run --json | jq .
# Extract specific fieldssweny triage --json | jq 'to_entries[] | select(.value.status == "success") | .key'Run a custom workflow
Section titled “Run a custom workflow”Execute a workflow defined in a YAML file:
sweny workflow run my-workflow.ymlValidate first without running:
sweny workflow run my-workflow.yml --dry-runGenerate a workflow from a prompt
Section titled “Generate a workflow from a prompt”Describe what you want in plain English and let the LLM build the workflow:
sweny workflow create "check for slow database queries and file tickets"The CLI generates the workflow, renders a DAG preview, and asks if you want to save, refine, or discard. Save it and run it:
sweny workflow run .sweny/workflows/check-slow-queries.ymlFor non-interactive use (CI, scripts), pass --json:
sweny workflow create "monitor API latency and alert on regressions" --json > workflow.jsonEdit a workflow with natural language
Section titled “Edit a workflow with natural language”Modify an existing workflow without hand-editing YAML:
sweny workflow edit my-workflow.yml "add a Slack notification after creating tickets"Or start an interactive session:
sweny workflow edit my-workflow.ymlExport a built-in workflow for customization
Section titled “Export a built-in workflow for customization”Use a built-in workflow as a starting point:
sweny workflow export triage > my-triage.ymlEdit the exported file, then run it:
sweny workflow run my-triage.ymlBoth triage and implement are available:
sweny workflow export implement > my-implement.ymlList available skills
Section titled “List available skills”See what skills are available for workflow nodes:
sweny workflow listMachine-readable output:
sweny workflow list --json | jq '.[].id'Slack notifications
Section titled “Slack notifications”Send triage results to a Slack channel:
notification-provider: slackNOTIFICATION_WEBHOOK_URL=https://hooks.slack.com/services/...sweny triageInline credentials (quick testing)
Section titled “Inline credentials (quick testing)”For one-off runs, pass credentials inline without editing .env:
SENTRY_AUTH_TOKEN=sntrys_... sweny triage \ --observability-provider sentry \ --sentry-org my-org \ --sentry-project my-project \ --time-range 6h \ --dry-runValidate a workflow in CI
Section titled “Validate a workflow in CI”Add a validation step to your CI pipeline:
sweny workflow validate .sweny/workflows/*.ymlWith JSON output for programmatic checks:
sweny workflow validate my-workflow.yml --json# {"valid": true, "errors": []}Stream events for Studio Live Mode
Section titled “Stream events for Studio Live Mode”Use --stream to emit NDJSON ExecutionEvent objects to stdout. This is how Studio connects to a running workflow:
sweny triage --stream 2>/dev/null | ws-broadcast--stream works alongside the normal progress display — events go to stdout, the spinner goes to stderr:
sweny workflow run my-workflow.yml --stream > events.jsonlYou can also combine --stream with --json to get both the event stream during execution and the final results:
sweny implement ENG-123 --stream > events.jsonlBell notification on completion
Section titled “Bell notification on completion”Ring the terminal bell when a long-running workflow finishes:
sweny triage --bellE2E browser testing
Section titled “E2E browser testing”Generate AI-driven end-to-end tests for any web app. No Playwright scripts — the AI agent drives a real browser.
Set up e2e tests with the wizard
Section titled “Set up e2e tests with the wizard”sweny e2e initThe wizard asks which flows to test (registration, login, purchase, onboarding, upgrade, cancellation, custom), per-flow details, and whether to auto-cleanup test data. It generates workflow YAML files in .sweny/e2e/.
Run all e2e tests
Section titled “Run all e2e tests”sweny e2e runExecutes every .yml in .sweny/e2e/ sequentially. Auto-generates test credentials (e2e-{timestamp}@yourapp.test), resolves template variables, and reports pass/fail per workflow.
Run a specific test
Section titled “Run a specific test”sweny e2e run registration.ymlCustom timeout for slow flows
Section titled “Custom timeout for slow flows”sweny e2e run --timeout 600000 # 10 minutes per workflowTest with a staging environment
Section titled “Test with a staging environment”E2E_BASE_URL=https://staging.myapp.comE2E_EMAIL=test@example.comE2E_PASSWORD=secretsweny e2e runFull E2E guide — wizard details, template variables, cleanup backends, and generated workflow structure.