CLI only
1. Install the CLI
npm install -g swytchcodeirm https://cli.swytchcode.com/install.ps1 | iexcurl -fsSL https://cli.swytchcode.com/install.sh | shUse swy as a shorter alias for swytchcode.
2. Initialize Swytchcode in your project
Run:
swy initThis creates .swytchcode/ and writes tooling.json, the file that tracks which integrations and tools your project trusts. It starts empty - the next steps fetch an integration and enable a tool from it.
3. Find and download an integration
To find and download an integration, run:
swy search githubswy get githubswy search looks up matching integrations in the remote registry, and swy get github downloads the GitHub integration bundle into .swytchcode/integrations/. This only fetches the bundle to disk - it doesn’t touch tooling.json or enable anything yet.
Browse the full, up-to-date list of supported APIs at swytchcode.com/apis.
4. Enable a tool
swy add github.issues.createThis is shorthand for swy add method github.issues.create: it resolves the method from the bundle you just fetched into a concrete input/output schema and writes it into tooling.json.tools - the trust boundary that determines which tools can actually be executed.
5. Connect GitHub
When you want the CLI to access GitHub, run:
swy auth connect githubA browser window will open. Authorize GitHub.
You can verify the connection with:
swy auth status6. Execute the tool
swy exec github.issues.create \ --repo my-org/my-repo \ --title "Login page bug"Swytchcode validates the inputs against the tool’s schema, then makes the request and returns a structured response. This is the same execution path used by MCP clients and runtime SDKs, so anything you exec here behaves identically wherever it’s called from.
Useful commands for working from the terminal
Since you’re driving everything from the CLI directly, these are the commands you’ll reach for most once the basics above are working - for exploring what’s available, inspecting a tool before you run it, and checking on a project’s health.
| Command | What it does |
|---|---|
swy list methods | List every method available from the integrations you’ve downloaded - useful for browsing what a bundle actually exposes before enabling anything. |
swy list tooling | List only the tools currently enabled in tooling.json - what your project can actually execute right now. |
swy info <canonical_id> | Show a tool’s full input/output schema before you call it, e.g. swy info github.issues.create. |
swy discover "<intent>" | Find a tool by describing what you want in plain English instead of guessing the canonical ID, e.g. swy discover "create a github issue". |
swy exec <canonical_id> --dry-run | Validate inputs and preview a call without sending the actual API request. |
swy audit stats | See your local execution history - total runs, success rate, last run. |
swy doctor | Diagnose your project - tooling, downloaded bundles, auth, and permissions. |
This is a small slice of the CLI surface. For every command, flag, and exit code, see the CLI Reference.
Where to go next
Browse all examples →GitHub Issue Integration
Dynamically raises GitHub issues using the Swytchcode CLI and Node SDK — ideal as an automation building block.
Stripe Subscriptions
Subscription lifecycle modules for Stripe's webhook edge cases — payment recovery, cancellations, and upgrades.
CLI Overview
Understand how the Swytchcode CLI works, its core concepts, and how it manages projects, integrations, authentication, and execution.
CLI Reference
Explore every CLI command, available flags, and usage examples.
MCP Setup
Connect Swytchcode to AI coding assistants like Cursor, Claude Code, VS Code, and OpenClaw using the built-in MCP server.