Welcome to Swytchcode v2
Swytchcode is an execution layer for API integrations — designed for both developers and AI agents.
Instead of letting your code directly call external APIs, Swytchcode acts as a controlled execution authority. It ensures integrations are deterministic, policy-compliant, and resilient to failures — eliminating the unreliability of traditional API calls and AI-generated integrations.
With Swytchcode, integrations are no longer scattered across your codebase. They are versioned, validated, and executed through a single, reliable interface.
Try it now — no install, no account, no setup
npx swytchcode exec stripe.create_paymentThat’s it. Swytchcode downloads, runs a simulated payment, and shows you the response in seconds. No API keys, no project init, nothing to configure.
Don’t know the canonical ID? Search by intent:
npx swytchcode exec "charge a customer"# Swytchcode finds matching integrations and lets you pick oneWhat’s new in Version 2
Version 2 expands Swytchcode into a complete integration workflow system — combining execution, AI context, and resilience.
One command, three modes
swytchcode exec now handles everything automatically:
| Situation | What happens |
|---|---|
| Fresh machine, no setup | Auto-demo: simulated response instantly |
| First real run | Auto-scaffold: init + fetch + register, then live execution |
| Credentials available | Live mode: 🔐 Running live — stripe (sandbox) |
--demo flag | Always demo, no credentials needed |
Intent-based execution
You no longer need to know canonical IDs:
swytchcode exec "send a welcome email"# → Found 5 capabilities. Select (1-5):# 1. resend.send_email — Send a transactional email via Resend# 2. sendgrid.send_email — Send email via SendGrid# ...For agents and pipelines, the same command returns a structured options[] JSON response instead of an interactive picker.
Auto-credential injection
Set STRIPE_API_KEY in your environment or .env — it’s injected automatically. No --header flag needed.
export STRIPE_API_KEY=sk_live_xxxswytchcode exec stripe.create_payment --body '{"amount":5000,"currency":"usd"}'# Authorization: Bearer sk_live_xxx is injected automaticallyDegrade, don’t crash
Every failure has a next step — the CLI never leaves you stuck:
# Network down during setup⚡ Could not fetch stripe integration — running in demo mode → Retry: swytchcode get stripe
# Demo API temporarily unavailable (auto-retried 3×)⚡ Demo service temporarily unavailable. Try again or set up your own integration.
# Internal error→ Details saved to .swytchcode/logs/error.logStructured errors for agents
All errors are JSON with category and retryable fields — agents know exactly what to do next:
{"error": "connection timeout", "category": "network", "retryable": true}Model Context Protocol (MCP)
Structured API context that enables AI to discover, configure, and execute integrations — not just generate code suggestions. Cursor and Claude Code connect automatically after swytchcode init.
Deterministic execution
Same inputs → same behavior. tooling.json is the allow-list; only registered tools run. No hidden paths, no prompt-based branching.
Built-in testing and inspection
swytchcode exec stripe.create_payment --explain # see what would run, no HTTP callswytchcode exec stripe.create_payment --dry-run # see the planned requestswytchcode exec stripe.create_payment --demo # simulated run, no credentialsswytchcode doctor # diagnose your local setupExecution analytics and visibility
Track how integrations run, fail, and evolve across versions through the Swytchcode web application.