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:

  1. A Vyre API token (generate at vyre.dev/settings/tokens)
  2. The Vyre CLI installed in your CI environment
  3. 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  # verify

GitHub 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 300

GitLab 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_TOKEN

Configuration

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 reached

Use exit codes in CI to conditionally fail jobs:

bash
vyre agent run --task "..." || echo "Agent failed" && exit 1
Structured 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"
}