# Import from other clients

> Paste a curl command, bring a Postman collection or an OpenAPI document, or open a package another Mariner exported. And the ways out — Postman, cURL, code, HAR.

## From a curl command

<kbd>⌘⇧I</kbd>, or right-click a collection or folder → **Import from cURL…**, then paste. <kbd>⌘↵</kbd> parses and shows a preview; <kbd>⌘⇧↵</kbd> imports.

Mariner understands multi-line commands with `\` continuations, and the flags that matter: `-X`, `-H`, `-d` / `--data-raw` / `--data-binary`, `--data-urlencode`, `-F` (files included), `-G`, `-u`, `-b`, `-A`, `-e`, `--url`. Flags with no equivalent — `-k`, `-L`, `--compressed`, `-o` — are ignored. A body without `-X` becomes a `POST`; the body kind is detected from the content type and shape.

An `Authorization` header or `-u user:pass` is promoted to the request's **Auth** tab, and the credential goes straight to the Keychain rather than into a header row.

## From Postman

<kbd>⌘⇧O</kbd> → paste the JSON or pick the file. Mariner reads **Collection v2.1** (v2.0 on a best-effort basis) and creates a new collection in the current workspace with:

- folders, recursively;
- each request's method, URL, headers, query, path variables and body, including multipart file parts;
- collection-level auth and per-folder overrides, with secrets sent to the Keychain.

Postman **environment** files are not imported — recreate them as workspace environments; it is usually a handful of keys. See [Set up environments](/docs/environments).

<figure class="shot">
<img src="/docs/en/import.webp" alt="The sidebar after importing a Postman collection: Acme Store API with its Auth, Products and Orders folders, and one request open with {{baseUrl}} and :id resolved to https://api.example.com/v1/products/42" width="1600" height="1000" loading="lazy">
<figcaption>POSTMAN → MARINER · folders, methods and {{baseUrl}} arrive as they were</figcaption>
</figure>

## From an OpenAPI document

**File → Import OpenAPI Spec…** accepts OpenAPI **3.0 / 3.1 in JSON** (YAML is not supported). You get a collection named after the API, one folder per tag (untagged operations land in *Uncategorized*), and a request per operation with the first JSON body example. Security schemes become collection-level auth.

Every URL is built as `{{baseUrl}}` + path, with `{braces}` turned into path variables. Add a `baseUrl` variable to your workspace environment with the server URL from the document, and the whole collection points at it.

## From another Mariner

**File → Import Mariner Collection…** and pick the `.mariner` package (a folder). The preview shows the counts of requests, folders and environments before you confirm. Secrets are never inside a package — re-enter auth tokens after importing. The legacy `.nvapi` extension still works.

## Ways out

- **Export as Mariner…** (<kbd>⌘⇧X</kbd>) — the package format described in [File format](/docs/file-format). Secrets excluded.
- **Export as Postman…** — a v2.1 collection file. Secrets excluded, including OAuth client secrets.
- **Copy as cURL** (<kbd>⌘⌥C</kbd>) — one request to the clipboard, with inherited auth resolved. **This includes real credentials**, so paste it with care.
- **Generate Code…** (<kbd>⌘⇧C</kbd>) — cURL, JavaScript (fetch or axios), Python requests, Swift URLSession, Go net/http. Variables are resolved by default; secrets stay masked unless you flip **Include secrets**.
- **Export HAR** — from [History](/docs/system#history), a HAR 1.2 archive of the executions currently filtered.

---
Source: https://marinerhttp.dev/docs/import · Mariner docs
