shift-cli test
Local testing helpers for delegated agent-driven app development.
Usage
shift-cli test <subcommand> [arguments] [flags]
Commands
Bootstrap delegated browser auth
shift-cli test bootstrap \
--session <session-id> \
--redirect /s/<session-id> \
--output .shift/e2e-auth.json \
--json
Key flags:
--session <id>bind the bootstrap artifact to a Stage session--app <sid>bind the bootstrap artifact to a published Stage app--redirect <path>relative path to open after the one-time bootstrap--output <path>write the artifact to disk--provider-mode <mode>attach provider mode metadata--no-include-tokenomit the raw delegated token from the artifact
The command creates a short-lived delegated grant, exchanges it for a one-time bootstrap code, and returns a machine-friendly artifact:
{
"baseUrl": "https://app.the-shift.dev",
"grantId": "agt_...",
"bootstrapUrl": "https://app.the-shift.dev/auth/agent/bootstrap?code=...",
"sessionId": "k77abc123def",
"capabilities": ["api", "browser", "stage.google.proxy"],
"expiresAt": "2026-03-06T12:34:56.000Z"
}
Playwright Example
SHIFT_E2E_AUTH=delegated bunx playwright test
Or use the SDK helper:
import { authenticatedPage } from "@the-shift/sdk/testing";
const { page, goto } = await authenticatedPage({ browser });
await goto("/s/<session-id>");
Notes
- For Google-backed Stage apps, set scopes first with
shift-cli stage scopes:set. shift-cli test bootstrapis the supported browser path. Do not put rawsat_...tokens in query strings.