# kosa8 migrate scan

Find E2B, Daytona, Modal and Vercel Sandbox code, and what changes on kosa8

> Available from the next release (after v0.22.1). The current release, v0.22.1, does not have `kosa8 migrate scan`: run `kosa8 version` to see which one you have.

## Usage

```
kosa8 migrate scan [PATH]
```

Reads PATH (a folder, default the current one, or a file) and changes nothing:
for each file that imports e2b, e2b_code_interpreter, daytona, daytona_sdk or modal
(Python), or e2b, @e2b/code-interpreter, @daytonaio/sdk or @vercel/sandbox (JS/TS),
it lists the import and what it becomes, the calls the kosa8 shim answers with
Unsupported (and what to use instead), the environment variables to set and the
ones no longer read, and the dependency to add.

--diff prints the import rewrite as a diff. --apply makes it: the diff is shown
(and, at a terminal, confirmed), each changed file is copied to .kosa8-migrate/
first, and kosa8 migrate undo puts them back. Only import lines change.

## Flags

| Flag | Type | What it does | Default |
|---|---|---|---|
| `--apply` | bool | rewrite the imports to the kosa8 shim (backup kept, diff shown) |  |
| `--diff` | bool | print the import rewrite as a diff; nothing is written |  |
| `--yes, -y` | bool | with --apply: do not ask at a terminal |  |

## Example

```
  kosa8 migrate scan
  kosa8 migrate scan ./agent --diff
  kosa8 migrate scan --apply
  kosa8 migrate scan --json | jq '.providers[].files[].unsupported'
```

---
Source: https://docs.kosa8.com/reference/migrate-scan/
