Skip to content

1. Install the CLI

Terminal window
npm install -g swytchcode

Use swy as a shorter alias for swytchcode.

2. Initialize Swytchcode in your project

Run:

Terminal window
swy init

This 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:

Terminal window
swy search github
swy get github

swy 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

Terminal window
swy add github.issues.create

This 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:

Terminal window
swy auth connect github

A browser window will open. Authorize GitHub.

You can verify the connection with:

Terminal window
swy auth status

6. Execute the tool

Terminal window
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.

CommandWhat it does
swy list methodsList every method available from the integrations you’ve downloaded - useful for browsing what a bundle actually exposes before enabling anything.
swy list toolingList 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-runValidate inputs and preview a call without sending the actual API request.
swy audit statsSee your local execution history - total runs, success rate, last run.
swy doctorDiagnose 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.