How it works
Each twin is a full API emulator that runs on Arga’s infrastructure and is reachable via a public URL. Your app talks to the twin URL instead ofapi.stripe.com or api.slack.com — no code changes needed beyond swapping environment variables.
Spin up twins
From your project directory:- npx (no install needed)
- Arga CLI
- Select twins — pick the services your app uses (Slack, Stripe, Notion, etc.)
- Review
.envchanges — the wizard detects your environment variables and rewrites them to point at twins. Your original.envis backed up to.env.arga-backup. - Wait for provisioning — twins spin up in under a minute
Example: testing a Stripe checkout flow
Example: testing Slack messaging workflows
conversations.create API. It also supports OAuth flows if your app has an “Add to Slack” install step.
Managing your session
Twin sessions last 10 minutes by default. Use these commands from your project directory:
Session state is tracked in
.arga-session.json in your project root. Add it to your .gitignore.
From that same project directory, arga runs logs can read .arga-session.json automatically, so you can inspect the current logs snapshot for the active run without passing a run ID. Add --errors-only to focus on failed worker logs and warning/error runtime logs.
Restoring your original environment
.env manually since teardown doesn’t revert it.
Available twins
UI twins have an interactive dashboard where you can see and manipulate state in the browser. Backend-only twins respond to API calls but don’t have a visual interface.
See the twin reference for per-twin support, limitations, and MCP tool coverage. See the twins quickstart for quickstart state and environment variables.
Tips
Combine twins with Arga validation
Combine twins with Arga validation
After spinning up twins and starting your app, run an Arga validation against your local deployment (exposed via a tunnel like ngrok or Cloudflare Tunnel) to get automated browser-level testing with twins backing every integration.
Use twins in CI
Use twins in CI
You can provision twins in a CI pipeline by calling the API directly or running
npx arga-wizard non-interactively. Set ARGA_API_KEY as a secret and the wizard will skip the key prompt.Keep your .gitignore clean
Keep your .gitignore clean
Add these to your
.gitignore:
