@xcelera/cli
v3.0.0
Published
CLI for xcelera.dev
Maintainers
Readme
xcelera CLI
A CLI for running Lighthouse performance audits using xcelera.dev
Usage
CLI Usage
# Basic audit
xcelera audit --ref https://example.com --token your-api-tokenAuthenticated Pages
For pages behind login, you can pass authentication credentials:
# With session cookie
xcelera audit --ref myapp-com-dashboard --cookie "session=abc123"
# With bearer token header
xcelera audit --ref myapp-com-admin \
--header "Authorization: Bearer eyJhbG..."
# Multiple cookies
xcelera audit --ref myapp-com-dashboard \
--cookie "session=abc123" --cookie "csrf=xyz"
# With Netscape cookie file (cookies.txt)
xcelera audit --ref myapp-com-dashboard \
--cookie-file ./cookies.txt
GitHub Action Usage
- name: Lighthouse Performance Audit
uses: xcelera/cli@v1
with:
ref: myapp-com-dashboard
token: ${{ secrets.XCELERA_TOKEN }}For authenticated pages in CI:
# With session cookie
- name: Lighthouse Audit (Cookie Auth)
uses: xcelera/cli@v1
with:
ref: myapp-com-dashboard
token: ${{ secrets.XCELERA_TOKEN }}
cookie: "session=value"
# With Netscape cookie file (cookies.txt)
- name: Lighthouse Audit (Cookie File Auth)
uses: xcelera/cli@v1
with:
ref: myapp-com-dashboard
token: ${{ secrets.XCELERA_TOKEN }}
cookie-file: ./cookies.txt
# With bearer token header
- name: Lighthouse Audit (Bearer Auth)
uses: xcelera/cli@v1
with:
ref: myapp-com-admin
token: ${{ secrets.XCELERA_TOKEN }}
header: "Authorization: Bearer eybDfd..."
# With full auth JSON (multiple cookies/headers)
- name: Lighthouse Audit (Full Auth)
uses: xcelera/cli@v1
with:
ref: myapp-com-dashboard
token: ${{ secrets.XCELERA_TOKEN }}
auth: '{"cookies":[{"name":"session","value":"session_value"},{"name":"csrf","value":"csrf_value"}]}'Setup
1. Get Your API Token
- Go to Xcelera Settings
- Create a new API token
- Copy the token value
2. Add Token to GitHub Secrets
- Go to your repository settings
- Navigate to "Secrets and variables" → "Actions"
- Create a new repository secret named
XCELERA_TOKEN - Paste your API token as the value
Development
GitHub Actions are pinned to specific commits. e.g.
uses: super-linter/super-linter/slim@7bba2eeb89d01dc9bfd93c497477a57e72c83240 # v8.2.0
To update the pinned versions, run the following command:
pinact run -u