Headless / CI
Run Vyre Agent in headless mode inside CI/CD pipelines. Automate code review, test fixing, documentation generation, and more as part of your existing workflow.
CI setup
Headless mode requires:
- A Vyre API token (generate at vyre.dev/settings/tokens)
- The Vyre CLI installed in your CI environment
- Your repository checked out
bash
# Install CLI in CI
curl -fsSL https://vyre.dev/install.sh | sh
# Authenticate with token
export VYRE_API_TOKEN=${{ secrets.VYRE_API_TOKEN }}
vyre whoami # verifyGitHub Actions
yaml
# .github/workflows/vyre.yml
name: Vyre Agent
on:
pull_request:
types: [opened, synchronize]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Vyre CLI
run: curl -fsSL https://vyre.dev/install.sh | sh
- name: Review PR
env:
VYRE_API_TOKEN: ${{ secrets.VYRE_API_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
vyre agent run \
--task "Review this pull request. Check for bugs, missing tests,
and code quality issues. Post inline comments." \
--context "github:pr:${{ github.event.pull_request.number }}" \
--model claude-sonnet-4-5 \
--max-duration 300GitLab CI
yaml
# .gitlab-ci.yml
stages:
- review
vyre-review:
stage: review
image: ubuntu:22.04
only:
- merge_requests
script:
- curl -fsSL https://vyre.dev/install.sh | sh
- vyre agent run
--task "Review this merge request"
--context "gitlab:mr:$CI_MERGE_REQUEST_IID"
--model claude-sonnet-4-5
variables:
VYRE_API_TOKEN: $VYRE_API_TOKENConfiguration
Available flags
bash
vyre agent run [flags]
--task "description" Task description (required)
--context "source" Add context (file, PR, issue, URL)
--model "model-name" AI model to use
--max-duration 300 Max run time in seconds
--dry-run Preview actions without executing
--output json Output format (text/json)
--no-write Read-only mode (no file edits)Exit codes
code
0 Success — task completed
1 Error — task failed or timed out
2 Auth error — invalid or missing token
3 Rate limit — usage limit reachedUse exit codes in CI to conditionally fail jobs:
bash
vyre agent run --task "..." || echo "Agent failed" && exit 1Structured output
Add --output json to get machine-readable output:
json
{
"status": "success",
"duration": 142,
"files_changed": ["src/api/users.ts", "src/api/users.test.ts"],
"summary": "Fixed the null reference error in getUser() and added a test.",
"pr_url": "https://github.com/org/repo/pull/246"
}