/revyl-cli:revyl-cli-auth-bypassfrom Revyl CLI
Sets up test-only auth bypass for Revyl runs across Web, Expo, React Native, native iOS, native Android, and Flutter apps. Detects the app stack and implements the handler.
Ships in Revyl CLI. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill is shared with the standalone Revyl CLI. In this plugin, run each
Revyl command it shows through the plugin's pinned launcher, never revyl
from PATH or another installed CLI. Resolve the launcher from this skill's
own directory:
${CLAUDE_SKILL_DIR}.SKILL.md; use its absolute parent
directory. If the Claude Code value above isn't an absolute path, use this
rule instead.The launcher is ../../scripts/launch-revyl from that directory on POSIX and
../../scripts/launch-revyl.cmd on Windows. Write its resolved absolute path
into each command; the commands below show it as "$LAUNCHER", and a revyl
command named in prose means the same command through the launcher. Run each
command from the app directory (the one holding .revyl/config.yaml), never
from the plugin's own folder: the CLI reads the current directory's Git branch,
commit, and config, so a command run inside the plugin resolves the wrong build
or project.
Use this skill only when the user explicitly asks to set up test-only auth bypass for a Revyl test or dev loop. Detect the app stack, apply the shared safety contract, then implement the handler in that stack. This is app code guidance, not a Revyl authentication shortcut.
For Web, read manual Web setup first and use its signed
server-route contract instead of the mobile deep-link flow below. It includes
Next.js and static Vite examples; revyl init does not choose their defaults.
revyl init --detect, app source, revyl dev list, screenshots, or reports can answer the question..claude/skills compatibility links plus WebFetch/WebSearch or configured MCP/browser tools; Cursor .cursor/skills when using --copy, otherwise shared .agents/skills, plus available MCP/browser tools. Codex also discovers shared .agents/skills directly.revyl device screenshot or revyl device report instead of claiming browser access.Prefer one app-specific deep link shape across platforms:
myapp://revyl-auth?token=<token>&role=<role>&redirect=<allowlisted-route>
Gate the handler with Revyl launch variables:
"$LAUNCHER" global launch-var create REVYL_AUTH_BYPASS_ENABLED=true
"$LAUNCHER" global launch-var create REVYL_AUTH_BYPASS_TOKEN=<test-only-token> --secret
Then start the Revyl session with those launch vars before opening the auth link:
"$LAUNCHER" dev --no-build \
--launch-var REVYL_AUTH_BYPASS_ENABLED \
--launch-var REVYL_AUTH_BYPASS_TOKEN
"$LAUNCHER" device navigate \
--url "myapp://revyl-auth?token=$REVYL_AUTH_BYPASS_TOKEN&role=buyer&redirect=%2Fcheckout"
Do not commit real tokens, passwords, durable sessions, or production bypasses. Use Revyl launch vars, CI secrets, or a staging backend token exchange.
Start from repo evidence, not guesses:
pwd
ls
find . -maxdepth 3 \( -name app.json -o -name app.config.js -o -name package.json -o -name ios -o -name android -o -name pubspec.yaml -o -name Podfile -o -name build.gradle -o -name '*.xcodeproj' \) 2>/dev/null
Use these signals:
expo dependency plus an app/ route tree and expo-router.expo dependency without Expo Router routes.react-native dependency plus ios/ or android/, without Expo as the primary runtime.pubspec.yaml plus Flutter ios/, android/, or lib/ structure.In monorepos, run setup from the actual app directory.
Preserve the shared contract. Do not invent a new architecture unless the app cannot support deep links or test-only launch config. Read only the reference matching the detected app stack; do not load unrelated platform recipes:
For KMP, Bazel, Capacitor/Ionic, Unity, or other less common shapes, select only the closest native or framework reference from repo evidence. Every reference uses the shared safety and verification rules below.
REVYL_AUTH_BYPASS_ENABLED=true.Create or update launch vars once:
export REVYL_AUTH_BYPASS_TOKEN="<test-only-token>"
"$LAUNCHER" global launch-var create REVYL_AUTH_BYPASS_ENABLED=true
"$LAUNCHER" global launch-var create REVYL_AUTH_BYPASS_TOKEN="$REVYL_AUTH_BYPASS_TOKEN" --secret
If a launch var already exists, update it instead:
"$LAUNCHER" global launch-var update REVYL_AUTH_BYPASS_TOKEN --value "$REVYL_AUTH_BYPASS_TOKEN"
Start a fresh session with launch vars attached:
export REVYL_CONTEXT="${USER:-agent}-auth-bypass-$$"
"$LAUNCHER" dev --context "$REVYL_CONTEXT" --no-build \
--launch-var REVYL_AUTH_BYPASS_ENABLED \
--launch-var REVYL_AUTH_BYPASS_TOKEN
Launch vars apply only when the device session starts. If Revyl reused an old session, stop it and start a fresh one.
After the app loads normally, run the valid and rejected cases:
"$LAUNCHER" device navigate --url "myapp://revyl-auth?token=$REVYL_AUTH_BYPASS_TOKEN&role=buyer&redirect=%2Fcheckout"
"$LAUNCHER" device screenshot --out /tmp/revyl-auth-bypass-valid.png
"$LAUNCHER" device navigate --url "myapp://revyl-auth?token=wrong-token&role=buyer&redirect=%2Fcheckout"
"$LAUNCHER" device navigate --url "myapp://revyl-auth?token=$REVYL_AUTH_BYPASS_TOKEN&role=admin&redirect=%2Fcheckout"
"$LAUNCHER" device navigate --url "myapp://revyl-auth?token=$REVYL_AUTH_BYPASS_TOKEN&role=buyer&redirect=%2Fadmin"
"$LAUNCHER" device screenshot --out /tmp/revyl-auth-bypass-rejected.png
Expected results:
When a Revyl test depends on this bypass, include the same launch vars on the test or session:
test:
metadata:
name: checkout-auth-smoke
platform: ios
build:
name: my-app
env_vars:
- REVYL_AUTH_BYPASS_ENABLED
- REVYL_AUTH_BYPASS_TOKEN
blocks:
- type: manual
step_type: navigate
step_description: "myapp://revyl-auth?token={{global.revyl-auth-bypass-token}}&role=buyer&redirect=%2Fcheckout"
- type: validation
step_description: "The checkout screen is visible for the signed-in buyer."
Test steps go under blocks:, and build.name is the Revyl app name. Use the app's real variable/global naming conventions. Do not put raw secrets in YAML.
After the app-side handler works, add a session.auth_bypass section to
.revyl/config.yaml so every revyl dev and revyl device start session
launches authenticated automatically — no flags, no manual deep link:
session:
auth_bypass:
launch_vars: [REVYL_AUTH_BYPASS_ENABLED, REVYL_AUTH_BYPASS_TOKEN]
deep_link: "myapp://revyl-auth?token=${REVYL_AUTH_BYPASS_TOKEN}&redirect=/home"
${VAR} placeholders resolve server-side from launch variables already
attached to the device session; secret values never enter CLI or MCP output.
The deep link re-fires after every app (re)launch. If the app shows a
logged-out state mid-session but the boot token is still valid, run
revyl dev auth refresh to re-fire that same deep link — it does not remint.
Launch environment is fixed at boot, so apps that compare the deep-link token
to a launch-env gate reject a newly minted value. If the token itself expired,
run revyl dev stop then revyl dev so a fresh mint is applied as launch
environment. Mint tokens with a TTL that comfortably covers a dev or preview
session. This section is also honored by Revyl PR review previews, so preview
devices open signed in. Verify with a fresh revyl dev session and a
screenshot.
If the repo can mint a test token, have Revyl run the mint before every session
instead of asking someone to refresh launch vars by hand. There are two ways,
and a config uses one or the other: session.before_script with
session.auth_bypass, or a session profile, which also runs for web sessions
and for the Open preview link in pull request comments.
Add a session.before_script block so the CLI runs the mint script before
every iOS or Android session:
session:
before_script:
script_path: "./scripts/prepare-test-session.sh"
auth_bypass:
launch_vars: [E2E_AUTH_TOKEN]
deep_link: "myapp://auth?token=${E2E_AUTH_TOKEN}"
before_script and auth_bypass are siblings under session:
before_script produces values and auth_bypass consumes them. Rules that
matter when writing the script:
KEY=VALUE line on stdout. Those values
are scoped to the one session, so parallel runs cannot clobber each other.
Everything else the script prints is ignored.chmod +x). Paths
resolving outside the repo are rejected, and the run is bounded by
timeout_seconds (default 120).REVYL_API_KEY. A coding agent running revyl device start in a fresh
checkout has no other repo secrets.Values never appear in CLI output; revyl dev status reports the produced key
names and nothing else.
A session profile mints with one script. For an iOS or Android app (a web
profile writes browser storage state instead; see references/web.md):
session:
default_profile: signed-in
profiles:
signed-in:
script: scripts/revyl/signed-in.sh
#!/usr/bin/env bash
set -euo pipefail
token="$(curl -fsS --max-time 20 https://staging.example.com/test-tokens | jq -er .token)"
echo "REVYL_AUTH_BYPASS_ENABLED=true" >> "$REVYL_LAUNCH_ENV_FILE"
echo "REVYL_AUTH_BYPASS_TOKEN=$token" >> "$REVYL_SECRET_LAUNCH_ENV_FILE"
echo "myapp://revyl-auth?token=$token&redirect=%2Fhome" > "$REVYL_DEEP_LINK_FILE"
Rules that matter when writing the profile:
session.profiles can't set
session.auth_bypass or session.before_script.KEY=VALUE line to $REVYL_LAUNCH_ENV_FILE, or to
$REVYL_SECRET_LAUNCH_ENV_FILE for a secret, and the deep link to
$REVYL_DEEP_LINK_FILE. Values are scoped to the one session, so
parallel runs cannot clobber each other.${NAME} in a launch value or the deep link fills from the stored launch
variable NAME when the session starts. To keep an org-stored token, write
REVYL_AUTH_BYPASS_TOKEN=${REVYL_AUTH_BYPASS_TOKEN} with single quotes so
the shell leaves it as written.#! line and the executable bit (chmod +x). A
script with a / is a path from the project root and must stay inside the
repository.revyl dev auth refresh can't reopen it; start a new session instead.revyl config validate. If it reports
session.default_profile is not a supported field or
session.profiles is not a supported field, the CLI predates session
profiles: update it, or use session.before_script above.Full contract: Session profiles.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub revylai/revyl-cli --plugin revyl-cli17 skills in this plugin
/revyl-buildBuild this workspace's app on a Revyl cloud runner, or upload an artifact already built, and return the Revyl build ID, after one confirmation that it uses the organization's build minutes./revyl-build-ci-uploadAdd a Revyl upload step to the CI job that already builds the app (GitHub Actions, GitLab CI, Buildkite, or another runner) so each commit and pull request has a Revyl build tied to its exact commit, without building twice. Also covers uploading EAS or other hosted artifacts by URL and registering web preview deployments. Use when wiring CI builds into Revyl./revyl-build-configWrite or fix the build recipes in a Revyl project's .revyl/config.yaml - build profiles per platform, simulator and emulator artifacts, framework recipes for native iOS, native Android, Expo, React Native, Flutter, and web, secrets for private dependencies, and caches. Use when setting up Revyl builds, adding a platform or profile, or when a Revyl cloud build fails on its configuration.Other plugins' skills for the same job