Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.argalabs.com/llms.txt

Use this file to discover all available pages before exploring further.

When your app integrates with services like Stripe, Slack, or Notion, testing locally means either hitting real APIs (risky, rate-limited, costs money) or maintaining hand-written mocks (fragile, always out of date). Arga’s digital twins give you a third option: spin up API-compatible replicas of these services and point your local app at them.

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 of api.stripe.com or api.slack.com — no code changes needed beyond swapping environment variables.
Your local app

    ├── SLACK_BOT_TOKEN → twin token
    ├── Slack API calls  → https://...--slack.sandbox.argalabs.com

    ├── STRIPE_SECRET_KEY → sk_test_...
    └── Stripe API calls  → https://...--stripe.sandbox.argalabs.com
Twins maintain realistic state (users, channels, files, payments), support webhooks, and behave like the real service — so you can test end-to-end flows without side effects. Twins start with minimal auth infrastructure and no content; use scenario seeding or API calls to populate the data your tests need.

Spin up twins

From your project directory:
npx arga-wizard
The wizard walks you through three steps:
  1. Select twins — pick the services your app uses (Slack, Stripe, Notion, etc.)
  2. Review .env changes — the wizard detects your environment variables and rewrites them to point at twins. Your original .env is backed up to .env.arga-backup.
  3. Wait for provisioning — twins spin up in under a minute
Once ready, start your app normally. All API calls to the selected services now route through twins.

Example: testing a Stripe checkout flow

# 1. Spin up a Stripe twin
npx arga-wizard
# → Select "Stripe", approve .env changes, wait for provisioning

# 2. Start your app as usual
npm run dev

# 3. Test checkout in your browser — payments go to the twin
#    Use Stripe test card numbers (4242 4242 4242 4242, etc.)

# 4. When you're done, tear down or let the session expire
arga-wizard teardown
The Stripe twin supports customers, payment intents, subscriptions, checkout sessions, webhooks, and more. Test card numbers trigger the same outcomes (declines, 3D Secure) as Stripe’s own test mode.

Example: testing a Slack bot

# 1. Spin up a Slack twin
npx arga-wizard
# → Select "Slack", approve .env changes

# 2. Start your bot
npm run dev

# 3. Open the twin dashboard to send messages and see your bot respond
#    Dashboard URL is printed after provisioning

# 4. Reset state and test again
arga-wizard reset
The Slack twin starts with a workspace and users but no channels — create them through scenario seeding or the 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:
CommandWhat it does
arga-wizard statusCheck if twins are still running and when they expire
arga-wizard extendAdd another 10 minutes
arga-wizard resetReset all twins to their initial empty state
arga-wizard teardownDestroy the session immediately
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

cp .env.arga-backup .env
Or just tear down the session — but remember to restore your .env manually since teardown doesn’t revert it.

Available twins

ServiceTypeWhat you can test
StripeUIPayments, subscriptions, checkout, webhooks, billing portal, billing meters, dashboard
SlackUIBot messaging, OAuth install flow, file uploads
DiscordUIBot interactions, channel management, file uploads
GitHubUIRepos, PRs, issues, branches, commits, check runs, webhooks, OAuth
Google DriveUIFile CRUD, sharing, permissions
Google CalendarUIEvent CRUD, calendar management
DropboxUIFile storage, uploads, downloads
NotionUIPages, databases, workspace management
BoxBackendFile storage, enterprise management
UnifiedBackendAggregated API across Slack, Drive, Calendar, Notion, Dropbox
UnstructuredBackendDocument parsing and partitioning
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 twins quickstart for full details on each twin’s quickstart state, supported endpoints, and environment variables.

Tips

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.
# Expose your local app
ngrok http 3000

# Validate with Arga
arga test-runner runs url --url https://your-ngrok-url.ngrok.io --prompt "complete a checkout with Stripe"
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.
Add these to your .gitignore:
.arga-session.json
.env.arga-backup