It works with public and private repositories, including those of organisations that allow the app, and needs no install: everything happens in the web app.
Set it up in four steps
- Connect GitHub. In the app, open New → API docs from a GitHub repository (or Account settings → GitHub) and click Connect GitHub. GitHub asks you to allow repository access. You can do this even if you signed up with email.
- Pick a repository. Your repositories are listed, most recently pushed first, with a search box. Type
owner/repoto use any public repository that is not in the list. - Pick a branch. Every branch is listed with the default branch first and marked. Type to filter. Repositories with hundreds of branches are searched on GitHub as you type, so any branch can be found. Optionally name the folder that holds the backend (such as
backendorservices/api) and choose whether to create a new collection or update one you already have. - Scan and keep in sync. The first scan runs at once and opens the new collection.
What you get
For each route the collection gets:
- a request in a folder named after its router, controller or tag, with a readable name;
{{baseUrl}}plus the path, with path variables such as:idready to fill in;- the query parameters the code reads, and a JSON, form or multipart body with the fields it expects;
- collection-level Bearer auth for routes that need a login.
The collection description links to the repository, the branch and the exact commit it was built from.
Frameworks it reads
| Language | Frameworks |
|---|---|
| Python | FastAPI, Flask, Django and Django REST Framework |
| JavaScript / TypeScript | Express, Fastify, Koa, Hono, NestJS, Next.js API routes, Elysia |
| PHP | Laravel, Symfony, Slim |
| Java / Kotlin | Spring, JAX-RS, Micronaut |
| Go | net/http, Gin, Echo, Fiber, chi, gorilla/mux |
| Rust | Axum, Actix Web, Rocket |
| Ruby | Rails, Sinatra |
| C# | ASP.NET Core (controllers and minimal APIs) |
It is the same scanner as swc scan, so a collection from GitHub and one from your laptop match.
How it stays in sync
- On every push. When you have admin rights on the repository, the sync adds a push webhook, so the collection updates seconds after a push to the branch.
- Without admin rights it checks the branch for new commits every 10 minutes. With a webhook it still checks once an hour, in case a delivery was missed.
- Your edits are kept. Requests are matched by method and path. A request whose route still exists gets the method, URL, parameters and body fields from the code, and keeps your tests, scripts, examples, auth and settings, and its name and description if you edited them.
- Removed routes. With Remove requests for endpoints deleted from the code switched on, those requests are removed (earlier versions stay in the collection's history). Otherwise they are kept and reported.
- Switch branches any time. Click Branch next to a synced repository to point it at another branch or folder. It rescans right away.
- Sync now rescans the latest commit on demand, and each sync shows its last commit, when it last ran and what changed.
Your code and your token
- The code is downloaded, read and deleted right after the scan. Nothing in it is run.
- Your GitHub token is stored encrypted on our server and never sent to your browser. Disconnect in Account settings revokes it on GitHub too.
- Signing in with GitHub never reads your repositories. Repository access is a separate step that you only take when you connect GitHub here.
- Collections made from a repository live in your workspace like any other: share them with your team, run them in CI with the
swcCLI, and publish them as API documentation that follows the code.
Just one scan, no sync
To build a collection once, open Import → GitHub repo. With GitHub connected you pick the repository and branch from lists, and you see every request before you import it. Without a connection, paste the URL of any public repository.
From your terminal
Prefer to scan the folder on your machine? Install the CLI and run swc init in your project:
curl -fsSL https://swastik.codes/install.sh | sh # macOS and Linux
swc initOn Windows, run irm https://swastik.codes/install.ps1 | iex in PowerShell. See the CLI for swc sync, swc diff and running collections in CI.