### Manual sccache Setup with WebDAV
Source: https://docs.avrea.com/cache/build-cache/sccache
Manual setup for sccache including environment variables for WebDAV, installation, starting the server, building, and showing stats.
```yaml
env:
RUSTC_WRAPPER: sccache
SCCACHE_WEBDAV_ENDPOINT: "http://cache.avrea.com:8290/sccache-build/webdav"
SCCACHE_WEBDAV_KEY_PREFIX: ""
steps:
- uses: actions/checkout@v6
- name: Install sccache
run: |
SCCACHE_VERSION="v0.10.0"
curl -fsSL "https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" \
| tar xz --strip-components=1 -C /usr/local/bin/ "sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl/sccache"
- run: sccache --start-server
- run: cargo build --release
- run: sccache --show-stats
```
--------------------------------
### Example GitHub Actions workflow using Avrea runners
Source: https://docs.avrea.com/cache/packages/rubygems
An example workflow demonstrating how to use Avrea runners with `ruby/setup-ruby` and `bundle install`. No changes are needed in your workflow if the global Bundler configuration is set.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- run: bundle install
```
--------------------------------
### Install and Run sccache on Avrea Runners
Source: https://docs.avrea.com/cache/build-cache/sccache
This workflow installs sccache, sets RUSTC_WRAPPER, starts the sccache daemon, and then builds the project. Finally, it shows build statistics.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
env:
RUSTC_WRAPPER: sccache
steps:
- uses: actions/checkout@v6
- name: Install sccache
run: |
SCCACHE_VERSION="v0.10.0"
curl -fsSL "https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" \
| tar xz --strip-components=1 -C /usr/local/bin/ "sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl/sccache"
- run: sccache --start-server
- run: cargo build --release
- run: sccache --show-stats
```
--------------------------------
### Example GitHub Actions Workflow with Avrea
Source: https://docs.avrea.com/cache/packages/pip
A sample GitHub Actions workflow demonstrating how to use Avrea runners for Python projects. It includes checkout, Python setup, and package installation using pip.
```yaml
jobs:
test:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.14'
- run: pip install -r requirements.txt
- run: pytest
```
--------------------------------
### Manual uv Index URL Setup
Source: https://docs.avrea.com/cache/packages/pip
Manually configure the UV_INDEX_URL environment variable to use the Avrea PyPI cache for uv installations.
```shell
export UV_INDEX_URL="https://cache.avrea.com:8443/pypi/simple/"
```
--------------------------------
### Using Built-in Dependency Caching with Setup Actions
Source: https://docs.avrea.com/cache/github-actions
Demonstrates how dependency caching is automatically handled by setup actions like `actions/setup-go` and `actions/setup-node` when configured.
```yaml
- uses: actions/setup-go@v6
with:
go-version: '1.25'
# Built-in dependency caching works automatically
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
# npm dependency cache works automatically
```
--------------------------------
### Install Avrea CLI with Homebrew
Source: https://docs.avrea.com/cli
Use Homebrew to install the Avrea CLI.
```bash
brew install avrea-com/tap/avr
```
--------------------------------
### Set Email Domains Example
Source: https://docs.avrea.com/cli/reference/org
Examples showing how to set email domains for automatic organization membership. The first example sets a single domain, and the second sets multiple domains and skips confirmation.
```bash
avr org email-domain set example.com
```
```bash
avr org email-domain set example.com corp.example.com --yes
```
--------------------------------
### GitHub Actions Workflow with Node.js and npm Cache
Source: https://docs.avrea.com/cache/packages/npm
Example GitHub Actions workflow to checkout code, set up Node.js, and install dependencies using npm ci, leveraging npm caching.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
- run: npm ci
```
--------------------------------
### Add GitHub App Installation
Source: https://docs.avrea.com/cli/reference/org
Initiates the process to add a GitHub App installation to an organization. It can optionally open a browser and has a default wait time for detection.
```bash
avr org install add [OPTIONS]
```
--------------------------------
### Install Chocolatey Package on Avrea Runner
Source: https://docs.avrea.com/cache/packages/chocolatey
Example of a GitHub Actions workflow step to install a Chocolatey package using the pre-configured Avrea Windows runner. Ensures `choco install` uses the local cache.
```yaml
jobs:
build:
runs-on: avrea-windows
steps:
- uses: actions/checkout@v6
- run: choco install cmake --yes
```
--------------------------------
### Gradle Manual Setup
Source: https://docs.avrea.com/cache/packages/maven
Configure Gradle to use the Avrea cache as a repository by adding this to `~/.gradle/init.gradle`. This is for environments not automatically configured.
```gradle
allprojects {
repositories {
maven {
url "https://cache.avrea.com:8443/maven/"
}
}
}
```
--------------------------------
### Manual pip Index URL Setup
Source: https://docs.avrea.com/cache/packages/pip
Manually configure the PIP_INDEX_URL environment variable to use the Avrea PyPI cache for pip installations.
```shell
export PIP_INDEX_URL="https://cache.avrea.com:8443/pypi/simple/"
```
--------------------------------
### Maven Manual Setup
Source: https://docs.avrea.com/cache/packages/maven
Configure Maven to use the Avrea cache as a mirror by adding this to `~/.m2/settings.xml`. This is for environments not automatically configured.
```xml
avrea-cache
central
https://cache.avrea.com:8443/maven/
```
--------------------------------
### Install Avrea CLI with PyPI
Source: https://docs.avrea.com/cli
Install the Avrea CLI using pip. Requires Python 3.14 or later.
```bash
pip install avr-cli
```
--------------------------------
### Example GitHub Actions Workflow with Turborepo
Source: https://docs.avrea.com/cache/build-cache/turborepo
This is an example of a GitHub Actions workflow that uses Turborepo with Avrea's remote cache. Ensure Node.js is set up and dependencies are installed before running the Turbo build.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
- run: pnpm install --frozen-lockfile
- run: pnpm turbo build
```
--------------------------------
### List GitHub App Installations
Source: https://docs.avrea.com/cli/reference/org
Displays a list of all accessible GitHub App installations across your organizations. Useful for auditing and management.
```bash
avr org install list [OPTIONS]
```
--------------------------------
### GitHub Actions Workflow Example
Source: https://docs.avrea.com/cache/packages/cargo
Example of a GitHub Actions workflow that utilizes Avrea runners for building a Rust project. It includes checking out the code and running `cargo build --release`.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: cargo build --release
```
--------------------------------
### GitHub Actions Workflow with Avrea Runners
Source: https://docs.avrea.com/cache/build-cache/nx
Example of a GitHub Actions workflow using Avrea runners. It checks out code, sets up Node.js, installs dependencies, and runs Nx tasks, leveraging the pre-configured Nx environment variables for remote caching.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
- run: pnpm install --frozen-lockfile
- run: pnpm nx run-many -t build
```
--------------------------------
### Manual ccache Setup with Environment Variable
Source: https://docs.avrea.com/cache/build-cache/ccache
Manually configure ccache by setting the CCACHE_REMOTE_STORAGE environment variable within a workflow's environment section. This example shows how to set up the PATH and run build commands.
```yaml
env:
CCACHE_REMOTE_STORAGE: "http://cache.avrea.com:8290/ccache-build/cas|layout=flat"
steps:
- uses: actions/checkout@v6
- run: |
export PATH="/usr/lib/ccache:$PATH"
mkdir build && cd build && cmake ..
make -j$(nproc)
- run: ccache --show-stats
```
--------------------------------
### Example GitHub Actions Workflow
Source: https://docs.avrea.com/cache/build-cache/bazel
A typical workflow using Avrea runners that leverages the pre-configured Bazel remote cache.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: bazel build //...
- run: bazel test //...
```
--------------------------------
### Example GitHub Actions Workflow with Caching
Source: https://docs.avrea.com/cache/github-actions
A typical GitHub Actions workflow demonstrating the integration of `actions/setup-node` for dependency caching and subsequent build/test steps.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
- run: npm ci
- run: npm test
```
--------------------------------
### GitHub Actions Workflow with Maven Build Cache
Source: https://docs.avrea.com/cache/build-cache/maven
Example GitHub Actions workflow demonstrating how to set up Java and run Maven verify, which will utilize the configured build cache extension.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
- run: mvn verify
```
--------------------------------
### List Organizations with JSON Filtering
Source: https://docs.avrea.com/cli/reference/org
Examples demonstrating how to list organizations and filter the JSON output using the --json and --jq flags for specific fields or conditions.
```bash
avr org list --json slug,role
```
```bash
avr org list --json '*' -q '.[] | select(.role == "admin")'
```
--------------------------------
### View Repository Cache Usage Summary
Source: https://docs.avrea.com/cache/managing
Use this command to get a summary of cache usage for a specific repository.
```bash
avr cache usage --repo rep-abc123
```
--------------------------------
### Paginate Audit Events with Cursor
Source: https://docs.avrea.com/cli/reference/audit-events
Example of using a cursor to retrieve the next set of audit events from a previous response.
```bash
avr audit-events list --cursor ""
```
--------------------------------
### Gradle Build on Avrea Runners
Source: https://docs.avrea.com/cache/packages/maven
Example GitHub Actions workflow for building a Gradle project on Avrea runners. No changes are needed as Gradle is pre-configured to use the Avrea cache.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
- run: ./gradlew build
```
--------------------------------
### Maven Build on Avrea Runners
Source: https://docs.avrea.com/cache/packages/maven
Example GitHub Actions workflow for building a Maven project on Avrea runners. No changes are needed as Maven is pre-configured to use the Avrea cache.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
- run: mvn verify
```
--------------------------------
### GitHub Actions Workflow with Avrea Go Module Cache
Source: https://docs.avrea.com/cache/packages/go-modules
Example GitHub Actions workflow that uses Avrea runners and disables the default Go cache to leverage the Avrea build cache.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.25'
cache: false # Use Avrea build cache instead
- run: go build ./...
```
--------------------------------
### Manual Turborepo Environment Variable Setup
Source: https://docs.avrea.com/cache/build-cache/turborepo
Manually set the Turborepo environment variables in your CI/CD workflow file to configure the remote cache. No changes to `turbo.json` are required.
```yaml
env:
TURBO_API: "http://cache.avrea.com:8290"
TURBO_TOKEN: "unused"
TURBO_TEAM: "team_avrea"
```
--------------------------------
### Cross-Job Caching Example in GitHub Actions
Source: https://docs.avrea.com/cache/github-actions
Illustrates how to share caches across different jobs within the same workflow. The 'build' job saves the cache, and the 'test' job restores it.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/cache@v5
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
test:
needs: build
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/cache@v5
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm test
```
--------------------------------
### Manual Nx Remote Cache Setup in Workflow
Source: https://docs.avrea.com/cache/build-cache/nx
Manually configure the Nx remote cache environment variables within a GitHub Actions workflow's 'env' block. This is an alternative to pre-configured runner environments.
```yaml
env:
NX_SELF_HOSTED_REMOTE_CACHE_SERVER: "http://cache.avrea.com:8290/nx-build"
NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN: "unused"
```
--------------------------------
### Keep Job Alive on Failure for Debugging
Source: https://docs.avrea.com/debugging
This step is designed to keep the job VM alive for a specified duration (30 minutes in this example) if a previous step fails. This allows you to SSH into the VM and inspect the state before it's torn down. It uses a conditional `if: failure()` to ensure it only runs when needed.
```yaml
- name: Keep job alive on failure for debugging
if: failure()
run: |
echo "Job failed. Keeping VM alive for 30 minutes for debugging..."
echo "Open the SSH tab on the job page, or run: avr job ssh "
sleep 1800
```
--------------------------------
### Manual Nix Binary Cache Configuration and Usage
Source: https://docs.avrea.com/cache/build-cache/nix
Manually configure the Nix substituter by adding cache settings to `/etc/nix/nix.conf` and restarting the Nix daemon. Then, build and push store paths to the Avrea binary cache.
```yaml
- name: Configure Avrea nix binary cache
run: |
cat << 'NIXCONF' | sudo tee -a /etc/nix/nix.conf > /dev/null
trusted-users = root runner
substituters = http://cache.avrea.com:8290/nix-build/cache https://cache.nixos.org
trusted-substituters = http://cache.avrea.com:8290/nix-build/cache https://cache.nixos.org
require-sigs = false
NIXCONF
sudo systemctl restart nix-daemon
- run: nix build --no-link .#default
- run: nix copy --to http://cache.avrea.com:8290/nix-build/cache .#default
```
--------------------------------
### Remove GitHub App Installation
Source: https://docs.avrea.com/cli/reference/org
Suspends or removes a GitHub App installation. Confirmation is required by default, but can be skipped with the --yes flag.
```bash
avr org install remove [OPTIONS]
```
--------------------------------
### List all settings
Source: https://docs.avrea.com/cli/reference/settings
Lists all settings with their current values and source. Can filter by organization, repository, or key prefix. Supports JSON output for specific fields.
```bash
avr settings list --org org-abc123
```
```bash
avr settings list --org org-abc123 --repo rep-xyz789
```
```bash
avr settings list --repo avrea-com/avrea-core
```
```bash
avr settings list --prefix cache.
```
```bash
avr settings list --json key,value,source
```
--------------------------------
### Configure Avrea Nix Binary Cache on Avrea Runners
Source: https://docs.avrea.com/cache/build-cache/nix
Configure the Nix substituter by appending cache settings to `/etc/nix/nix.conf` and restarting the Nix daemon. This is necessary because `install-nix-action` overwrites `nix.conf`.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Configure Avrea nix binary cache
run: |
cat << 'NIXCONF' | sudo tee -a /etc/nix/nix.conf > /dev/null
trusted-users = root runner
substituters = http://cache.avrea.com:8290/nix-build/cache https://cache.nixos.org
trusted-substituters = http://cache.avrea.com:8290/nix-build/cache https://cache.nixos.org
require-sigs = false
NIXCONF
sudo systemctl restart nix-daemon
- name: Build
run: nix build --no-link .#default
- name: Push to Avrea binary cache
run: nix copy --to http://cache.avrea.com:8290/nix-build/cache .#default
```
--------------------------------
### Filter Audit Events by Action
Source: https://docs.avrea.com/cli/reference/audit-events
Example of filtering audit events to show only those with a specific action, such as 'CREATE'.
```bash
avr audit-events list --action CREATE
```
--------------------------------
### Verify Avrea Build Cache Binary and Set GOCACHEPROG
Source: https://docs.avrea.com/cache/build-cache/go
Manually set up the Avrea build cache on non-standard runner images. This snippet checks for the binary and falls back to the local cache if not found.
```shell
- name: Verify build cache binary
run: |
if [ ! -x /usr/local/bin/avrea-build-cache ]; then
echo "::warning::avrea-build-cache not found, falling back to local cache"
echo "GOCACHEPROG=" >> "$GITHUB_ENV"
fi
- run: go build ./...
```
--------------------------------
### Get Avr Configuration Value
Source: https://docs.avrea.com/cli/reference/config
Print the value of a specific configuration key, such as the active organization ID.
```bash
avr config get [OPTIONS] {org}
```
--------------------------------
### Limit Number of Returned Events
Source: https://docs.avrea.com/cli/reference/audit-events
Example of limiting the maximum number of audit events returned in a single request.
```bash
avr audit-events list --limit 10
```
--------------------------------
### Get JSON status with avr health
Source: https://docs.avrea.com/cli/reference/health
Use the --json option to retrieve the status in JSON format.
```bash
avr health --json status
```
--------------------------------
### List Payment Methods
Source: https://docs.avrea.com/cli/reference/billing
List all configured payment methods. You can specify which JSON fields to return.
```bash
avr billing payment-methods list [OPTIONS]
```
--------------------------------
### Output Audit Events as JSON
Source: https://docs.avrea.com/cli/reference/audit-events
Example of requesting audit events output in JSON format, specifying which fields to include.
```bash
avr audit-events list --json "acting_api_key_id,action,created_at"
```
--------------------------------
### View Available Setting Definitions
Source: https://docs.avrea.com/cache/managing
Displays the schema for all available cache settings, providing details on each configurable option.
```bash
avr settings schema
```
--------------------------------
### Run and View Avrea Resources
Source: https://docs.avrea.com/cli
Use these commands to run and view specific Avrea resources like runs and workflows, opening them directly in the web interface.
```bash
avr run view --web
avr workflow view --web
avr cache list --repo --web
```
--------------------------------
### Filter Audit Events by Creation Time (To)
Source: https://docs.avrea.com/cli/reference/audit-events
Example of filtering audit events to include only those created before a specific ISO-8601 timestamp.
```bash
avr audit-events list --to "2023-01-01T00:00:00Z"
```
--------------------------------
### Filter Audit Events by Creation Time (From)
Source: https://docs.avrea.com/cli/reference/audit-events
Example of filtering audit events to include only those created after a specific ISO-8601 timestamp.
```bash
avr audit-events list --from "2023-01-01T00:00:00Z"
```
--------------------------------
### List Repositories
Source: https://docs.avrea.com/cli/reference/repo
Lists repositories accessible within an organization. Use the --json option to specify fields or '*' for all fields, and -q for jq filtering.
```bash
avr repo list [OPTIONS]
```
```bash
avr repo list
```
```bash
avr repo list --json full_name,repository_id
```
```bash
avr repo list --json '*' -q '.[].full_name'
```
--------------------------------
### List available setting definitions
Source: https://docs.avrea.com/cli/reference/settings
Lists available setting definitions, including their type, scope, and default values. Can filter by prefix and scope, and output in JSON format.
```bash
avr settings schema
```
```bash
avr settings schema --prefix cache. --scope repository
```
```bash
avr settings schema --json '*'
```
--------------------------------
### Create a New Organization
Source: https://docs.avrea.com/cli/reference/org
Use this command to create a new organization. Specify the organization's name as an argument.
```bash
avr org create [OPTIONS] NAME
```
--------------------------------
### Filter JSON Output with jq
Source: https://docs.avrea.com/cli/reference/audit-events
Example of using jq to filter the JSON output of audit events, allowing for complex data manipulation.
```bash
avr audit-events list --json "*" --jq ".[] | select(.action == \"CREATE\")"
```
--------------------------------
### avr auth login command
Source: https://docs.avrea.com/cli/reference/auth
Authenticate via browser and store credentials. Use the --provider option to specify the OAuth provider.
```bash
avr auth login [OPTIONS]
```
--------------------------------
### Manually Configure Go Proxy for Go Module Cache
Source: https://docs.avrea.com/cache/packages/go-modules
Manually set the GOPROXY environment variable to use the Avrea Go module cache. The `,direct` suffix ensures fallback to direct fetching if the module is not in the cache.
```shell
export GOPROXY="https://cache.avrea.com:8443/gomod/,direct"
```
--------------------------------
### Filter Audit Events by Resource Type
Source: https://docs.avrea.com/cli/reference/audit-events
Example of filtering audit events to show only those related to a specific resource type, like 'api_key'.
```bash
avr audit-events list --resource-type api_key
```
--------------------------------
### Turborepo Environment Variables on Avrea Runners
Source: https://docs.avrea.com/cache/build-cache/turborepo
When running on Avrea runners, Turborepo environment variables are pre-configured. No additional setup is needed in your workflow.
```bash
TURBO_API="http://cache.avrea.com:8290"
TURBO_TOKEN="unused"
TURBO_TEAM="team_avrea"
```
--------------------------------
### Filter Audit Events by Actor User ID
Source: https://docs.avrea.com/cli/reference/audit-events
Example of filtering audit events to show events performed by a specific user, identified by their user ID.
```bash
avr audit-events list --actor-user-id
```
--------------------------------
### View Avrea Workflow Statistics
Source: https://docs.avrea.com/cli
Get aggregate statistics for workflows over the last 30 days, detailed breakdowns for a specific workflow, or an organization-wide health overview.
```bash
avr workflow list # aggregate stats per workflow over the last 30d
avr workflow view # per-job p95/median/failure breakdown + recent runs
avr status # org-wide health: recent runs, slowest workflows, cache usage
```
--------------------------------
### Show Cache Usage Summary as JSON
Source: https://docs.avrea.com/cli/reference/cache
Displays a summary of cache usage for a repository in JSON format, requesting all available fields.
```bash
avr cache usage --repo rep-abc123 --json '*'
```
--------------------------------
### List Active Avr Configuration
Source: https://docs.avrea.com/cli/reference/config
Show the currently active CLI configuration, including host, authentication, organization, and default repository settings.
```bash
avr config list [OPTIONS]
```
--------------------------------
### List Available JSON Fields
Source: https://docs.avrea.com/cli/reference/audit-events
Command to list all available fields that can be requested for JSON output.
```bash
avr audit-events list --json "?"
```
--------------------------------
### Show Billing Summary
Source: https://docs.avrea.com/cli/reference/billing
Displays the billing summary for the organization. Use the `--json` option to specify which fields to output.
```bash
avr billing summary [OPTIONS]
```
```bash
JSON FIELDS
billing_emails, default_payment_method, has_billing
```
--------------------------------
### Configure Bun Registry via bunfig.toml
Source: https://docs.avrea.com/cache/packages/npm
Explicitly configure the Bun registry in the bunfig.toml file to use the Avrea cache registry.
```toml
[install]
registry = "https://cache.avrea.com:8443/npm/"
```
--------------------------------
### GitHub Actions Workflow with ccache
Source: https://docs.avrea.com/cache/build-cache/ccache
Integrate ccache into a GitHub Actions workflow by ensuring ccache is on the PATH and optionally showing build statistics. This setup assumes ccache is pre-configured on the runner.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: mkdir build && cd build && cmake ..
- run: make -j$(nproc)
- run: ccache --show-stats
```
--------------------------------
### Main avr log command structure
Source: https://docs.avrea.com/cli/reference/log
This shows the basic syntax for the avr log command and its subcommands.
```bash
avr log [OPTIONS] COMMAND [ARGS]...
```
--------------------------------
### Configure Avrea Build Cache Environment Variables
Source: https://docs.avrea.com/cache/build-cache/go
Set these environment variables to enable the Avrea build cache. Ensure GOCACHEPROG points to the Avrea cache binary and BUILD_CACHE_URL to your cache server.
```shell
GOCACHEPROG="/usr/local/bin/avrea-build-cache gocache"
BUILD_CACHE_URL="http://cache.avrea.com:8290"
```
--------------------------------
### View Avr Job Metrics
Source: https://docs.avrea.com/cli/reference/job
Displays CPU, memory, and IO metrics for a job's VM. You can specify which metrics to view using the --source option and watch them update in real-time with --watch.
```bash
avr job metrics job-abc123
```
```bash
avr job metrics job-abc123 --source cpu --source network
```
```bash
avr job metrics job-abc123 --watch
```
--------------------------------
### List Current Cache Settings
Source: https://docs.avrea.com/cache/managing
View the current cache configuration settings for your organization or repository.
```bash
avr settings list
```
--------------------------------
### Triage Avrea Run Failures
Source: https://docs.avrea.com/cli
View only the failed steps of a run, grouped by job, or get a full paginated log dump. Tail a specific job's logs in real-time using `--follow`.
```bash
avr run view --log-failed # only the steps that failed, grouped by job
avr run logs # full log dump, paginated
avr job logs --follow # tail one job in real time
```
--------------------------------
### Configure Avrea CLI Settings
Source: https://docs.avrea.com/cli
Manage Avrea CLI configuration, including host, authentication, organization, and repository settings, using `avr config` commands.
```bash
avr config # status: host, auth, org, repo with sources
```
```bash
avr config list # same as bare `avr config`
```
```bash
avr config set org # store a default organization
```
```bash
avr config get org
```
```bash
avr config unset org
```
--------------------------------
### Print Field Schema with JSON
Source: https://docs.avrea.com/cli
Use the `--json '?'` flag to discover available fields for structured output.
```bash
avr run list --json '?' # prints the field schema
```
--------------------------------
### avr auth status command
Source: https://docs.avrea.com/cli/reference/auth
Display the authenticated user and connection state. Use --show-token to display the auth token or --json/--jq for structured output.
```bash
avr auth status [OPTIONS]
```
--------------------------------
### Avr Billing Invoices CLI
Source: https://docs.avrea.com/cli/reference/billing
Manage your invoices, including downloading, listing, and showing details.
```bash
avr billing invoices [OPTIONS] COMMAND [ARGS]...
```
--------------------------------
### List Individual Cache Entries
Source: https://docs.avrea.com/cache/managing
Use this command to list all individual cache entries within a repository. This is useful for identifying specific items to manage.
```bash
avr cache list --repo rep-abc123
```
--------------------------------
### Avr Billing Payment Methods CLI
Source: https://docs.avrea.com/cli/reference/billing
Manage your payment methods, such as adding, listing, removing, or setting a default.
```bash
avr billing payment-methods [OPTIONS] COMMAND [ARGS]...
```
--------------------------------
### Configure Go Proxy for Avrea Runners
Source: https://docs.avrea.com/cache/packages/go-modules
Set the GOPROXY environment variable to use the Avrea Go module cache. This is pre-configured on Avrea runners.
```shell
GOPROXY="https://cache.avrea.com:8443/gomod/,direct"
```
--------------------------------
### Authenticate Avrea CLI with Browser Login
Source: https://docs.avrea.com/cli
Perform a browser-based login for authentication. This is the recommended method.
```bash
avr auth login
```
--------------------------------
### List Organization Members in JSON Format
Source: https://docs.avrea.com/cli/reference/org
Outputs organization members in JSON format, specifying the desired fields. Available fields include joined_at, name, role, and user_id. Use '*' for all fields or '?' to list available fields. This command requires administrator privileges.
```bash
avr org members --json name,role
```
--------------------------------
### avr status Command Options
Source: https://docs.avrea.com/cli/reference/status
Illustrates the available options for the 'avr status' command, including filtering by organization, repository, and time, as well as JSON output.
```bash
--org Organization ID.
--repo Repository (org/repo or rep-xxx). Auto-detected from git remote if omitted.
--since Time window for stats panels: '7d', '24h', etc. _(default:`7d`)_
--json Output raw JSON.
```
--------------------------------
### Configure C/C++ Compiler Wrappers with sccache (Clang)
Source: https://docs.avrea.com/cache/build-cache/sccache
Set the CC and CXX environment variables to use sccache with Clang for C and C++ compilation.
```shell
env:
CC: sccache clang
CXX: sccache clang++
```
--------------------------------
### avr settings schema
Source: https://docs.avrea.com/cli/reference/settings
List available setting definitions, including their choices, default values, descriptions, and scopes. Supports filtering by prefix and scope, with JSON output options.
```APIDOC
## avr settings schema
### Description
List available setting definitions.
### Method
CLI Command
### Endpoint
N/A
### Parameters
#### Query Parameters
- `--prefix` (TEXT) - Optional - Filter by key prefix (e.g. 'cache.').
- `--scope` (CHOICE) - Optional - Filter by scope. _(choices:`repository` , `organization`)_
- `--json` (TEXT) - Optional - Output JSON. Pass comma-separated field names, "*" for all fields, or "?" to list available fields.
- `-q, --jq` (TEXT) - Optional - Filter --json output through a jq expression.
### Request Example
```
avr settings schema --prefix cache. --scope repository
```
### Response
#### Success Response (200)
- `key` (string) - The name of the setting.
- `choices` (array) - Possible choices for the setting if it's an enum.
- `default` (any) - The default value of the setting.
- `description` (string) - A description of the setting.
- `inherits` (boolean) - Whether the setting can be inherited from a higher scope.
- `value_type` (string) - The data type of the setting's value.
- `scopes` (array) - The scopes in which the setting is applicable.
- `min_value` (number) - The minimum allowed value for numeric settings.
- `max_value` (number) - The maximum allowed value for numeric settings.
#### Response Example
```json
{
"key": "cache.gha.enabled",
"choices": [],
"default": "true",
"description": "Enable or disable GitHub Actions caching.",
"inherits": true,
"value_type": "boolean",
"scopes": ["repository", "organization"],
"min_value": null,
"max_value": null
}
```
```
--------------------------------
### Search logs by query and repository
Source: https://docs.avrea.com/cli/reference/log
Use this to perform a full-text search for a specific query within a repository's logs.
```bash
avr log search --repo avrea-com/avrea-core --query "error"
```
--------------------------------
### View a single job with its steps
Source: https://docs.avrea.com/cli/reference/job
Use `avr job view` to display details of a specific job. Options allow filtering output by log status, JSON fields, or applying jq filters.
```bash
avr job view [OPTIONS] JOB_ID
```
```bash
avr job view job-abc123
```
```bash
avr job view job-abc123 --log-failed
```
```bash
avr job view job-abc123 --json conclusion,steps
```
```bash
avr job view job-abc123 --json '*' --jq '.steps[] | select(.conclusion=="failure")'
```
--------------------------------
### Configure Bundler to use Avrea's RubyGems mirror
Source: https://docs.avrea.com/cache/packages/rubygems
Configure Bundler globally to use Avrea's cache as a mirror for rubygems.org. This is the recommended approach for Avrea runners.
```bash
bundle config --global mirror.https://rubygems.org https://cache.avrea.com:8443/rubygems
```
--------------------------------
### Main avr org Command Structure
Source: https://docs.avrea.com/cli/reference/org
The base command for interacting with organization-related features. Use subcommands to perform specific actions.
```bash
avr org [OPTIONS] COMMAND [ARGS]...
```
--------------------------------
### Monitor Avrea Job VM Metrics
Source: https://docs.avrea.com/cli
View live VM metrics (CPU, memory, IO) for a job while it runs, refreshed periodically. Also available as static post-mortem data after the job completes.
```bash
avr job metrics --watch # CPU/memory/IO gauges, refreshed every few seconds
avr job metrics # static post-mortem after the job ended
```
--------------------------------
### Manual NuGet Configuration
Source: https://docs.avrea.com/cache/packages/nuget
Add this configuration to your NuGet.config file to manually point to the Avrea cache. This is useful if you are not using Avrea runners or need custom configuration.
```xml
```
--------------------------------
### GitHub Actions Workflow with Avrea Build Cache
Source: https://docs.avrea.com/cache/build-cache/go
Integrate Avrea build cache into your GitHub Actions workflow. Set `cache: false` for `actions/setup-go` to prevent redundant caching.
```yaml
jobs:
build:
runs-on: avrea-ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.25'
cache: false # Use Avrea build cache instead
- run: go build ./...
- run: go test ./...
```
--------------------------------
### List Cache Entries as JSON
Source: https://docs.avrea.com/cli/reference/cache
Lists cache entries for a repository and outputs the result in JSON format, specifying the desired fields.
```bash
avr cache list --repo rep-abc123 --json key,size_bytes,created_at
```
--------------------------------
### Switch Avrea API Hosts
Source: https://docs.avrea.com/cli
Switch between configured Avrea API hosts interactively or override the host for a single command using the AVR_HOST environment variable.
```bash
avr auth switch # interactive picker across stored hosts
```
```bash
AVR_HOST=https://api.staging.example.com avr run list # one-shot override
```
--------------------------------
### Show Billing Settings
Source: https://docs.avrea.com/cli/reference/billing
Display your current billing settings, including address and associated customer IDs. You can specify which JSON fields to return.
```bash
avr billing settings [OPTIONS]
```
--------------------------------
### avr settings list
Source: https://docs.avrea.com/cli/reference/settings
List settings with their current values and source. Supports filtering by organization, repository, and key prefix, with options for JSON output and browser viewing.
```APIDOC
## avr settings list
### Description
List settings with their current values and source.
### Method
CLI Command
### Endpoint
N/A
### Parameters
#### Query Parameters
- `--org` (TEXT) - Optional - Organization ID. Uses default org if not specified.
- `--repo` (TEXT) - Optional - Repository (org/repo or rep-xxx). Auto-detected from git remote if omitted.
- `--prefix` (TEXT) - Optional - Filter by key prefix (e.g. 'cache.').
- `--web` - Optional - Open in browser.
- `--json` (TEXT) - Optional - Output JSON. Pass comma-separated field names, "*" for all fields, or "?" to list available fields.
- `-q, --jq` (TEXT) - Optional - Filter --json output through a jq expression.
### Request Example
```
avr settings list --org org-abc123
```
### Response
#### Success Response (200)
- `key` (string) - The name of the setting.
- `source` (string) - The source of the setting's value (e.g., default, repository, organization).
- `value` (any) - The current value of the setting.
#### Response Example
```json
{
"key": "cache.gha.enabled",
"source": "repository",
"value": "true"
}
```
```
--------------------------------
### Avr Billing CLI Main Command
Source: https://docs.avrea.com/cli/reference/billing
The base command for interacting with Avr billing features. Use subcommands to manage specific aspects.
```bash
avr billing [OPTIONS] COMMAND [ARGS]...
```
--------------------------------
### Configure C/C++ Compiler Wrappers with sccache (GCC)
Source: https://docs.avrea.com/cache/build-cache/sccache
Set the CC and CXX environment variables to use sccache with GCC for C and C++ compilation.
```shell
env:
CC: sccache gcc
CXX: sccache g++
```
--------------------------------
### avr auth command structure
Source: https://docs.avrea.com/cli/reference/auth
The base command structure for avr authentication operations.
```bash
avr auth [OPTIONS] COMMAND [ARGS]...
```
--------------------------------
### SSH into Avrea Job VM
Source: https://docs.avrea.com/cli
Connect to a running job's virtual machine via SSH. Use `--print-command` to only display the SSH command string without executing it.
```bash
avr job ssh
avr job ssh --print-command # just print the ssh string
```
--------------------------------
### avr run list
Source: https://docs.avrea.com/cli/reference/run
List workflow runs for an organization.
```APIDOC
## avr run list
### Description
List workflow runs for an organization.
### Method
`avr run list`
### Endpoint
`avr run list [OPTIONS]`
### Parameters
#### Query Parameters
- **--org** `` - Organization ID. Uses default org if not specified (see: avr config set org).
- **--repo** `` - Filter by repository (org/repo or rep-xxx, repeatable). Auto-detected from git remote if omitted. _(repeatable)_
- **--status** `` - Filter by state (queued, in_progress, completed) or conclusion (success, failure, ...). Repeatable. _(choices:`action_required` , `cancelled`, `completed`, `failure`, `in_progress`, `neutral`, `queued`, `skipped`, `stale`, `startup_failure`, `success`, `timed_out` · repeatable)_
- **--branch** `` - Filter by head branch (repeatable). _(repeatable)_
- **-w, --workflow** `` - Filter by workflow ID (wfl-xxx, repeatable). _(repeatable)_
- **--since** `` - Relative time window: '7d', '24h', etc. Sugar for --created-after.
- **--from, --created-after** `` - Only runs created after this ISO timestamp.
- **--to, --created-before** `` - Only runs created before this ISO timestamp.
- **-L, --limit** `` - Max runs to return. _(default:`20`)_
- **--cursor** `` - Pagination cursor from a previous response.
- **--order** `` - Sort order. _(choices:`created_at.desc` , `created_at.asc` · default: `created_at.desc`)_
- **--json** `` - Output JSON. Pass comma-separated field names, "*" for all fields, or "?" to list available fields.
- **-q, --jq** `` - Filter --json output through a jq expression.
- **--web** - Open in browser.
### JSON Fields
conclusion, created_at, display_title, duration_seconds, event,
head_branch, head_sha, platform_run_id, repository, run_attempt, run_id,
run_number, status, triggering_actor, updated_at, workflow, workflow_id
```
--------------------------------
### Configure sccache WebDAV Endpoint
Source: https://docs.avrea.com/cache/build-cache/sccache
Set these environment variables to configure sccache to use the Avrea WebDAV endpoint for caching.
```shell
SCCACHE_WEBDAV_ENDPOINT="http://cache.avrea.com:8290/sccache-build/webdav"
SCCACHE_WEBDAV_KEY_PREFIX=""
```
--------------------------------
### Enable Tab Completion for Avrea CLI
Source: https://docs.avrea.com/cli
Configure tab completion for your shell (bash, zsh, fish) to improve command-line efficiency.
```bash
# bash
eval "$(_AVR_COMPLETE=bash_source avr)"
# zsh
eval "$(_AVR_COMPLETE=zsh_source avr)"
# fish
_AVR_COMPLETE=fish_source avr | source
```
--------------------------------
### Download Invoice PDF
Source: https://docs.avrea.com/cli/reference/billing
Download a specific invoice as a PDF. Specify the invoice ID and optionally an output path.
```bash
avr billing invoices download [OPTIONS] INVOICE_ID
```