# Collections

> Workspaces hold collections; collections hold folders and requests. This page covers the sidebar — creating, moving, duplicating — and how Mariner keeps several projects apart.

## Workspaces

A workspace is the outer box: its own collections, its own environments, its own default auth, and its own cookie jar, so being logged in on one project never leaks into another. Mariner starts with one called **Personal**.

- Switch with <kbd>⌘⇧]</kbd> and <kbd>⌘⇧[</kbd>, from the switcher at the top of the sidebar, or with <kbd>⌘K</kbd> → *Switch Workspace › name*.
- The switcher also offers **New Workspace…**, **Rename…** and **Delete…**.
- Mariner remembers which workspace and environment were active and restores them on the next launch.

## The tree

A collection contains folders and requests, nested as deep as you like. New items get a name in your language — *New Collection*, *New Folder*, *New Request* — and open in rename mode.

- **Collection** (right-click): Add Request, Add Folder, Import from cURL…, Run Collection…, Edit Auth…, Export as Mariner…, Export as Postman…, Rename, Duplicate, Delete.
- **Folder**: Add Request, Add Folder, Import from cURL…, Rename, Duplicate, Move to…, Run Folder…, Edit Auth…, Delete.
- **Request**: Open in new tab, Rename, Duplicate, Move to…, Run request, Generate Code… (<kbd>⌘⇧C</kbd>), Copy as cURL (<kbd>⌘⌥C</kbd>), Delete.

Duplicates are named *X copy*, then *X copy 2*. Double-click any name to rename it; <kbd>↩</kbd> commits, <kbd>⎋</kbd> cancels. Deleting a collection or a non-empty folder asks first.

## Sorting and search

The header above the tree carries a sort control (`↑↓`) to the left of the **+**. It is always visible, and it takes the accent colour whenever the list is not in its resting order — so the icon itself answers "why are they in this order?".

- **Name** — Finder's order: case and accents ignored, digits compared as numbers, so `api-v9` sorts before `api-v10`.
- **Recently used** — most recently executed first. A collection whose last run has already dropped out of the history window counts as never used, and those go to the end alphabetically — also when you reverse the order, because "oldest first" does not mean "the ones I know nothing about first".
- **Number of requests** — counting the whole subtree, not just the root.
- **Manual** — the order you left them in, and the resting state. It is also the one to be in while you drag rows around: under any other criterion a dropped row springs straight back.

Each criterion can be reversed — *A→Z / Z→A*, *Newest first / Oldest first*, *Most requests first / Fewest requests first* — and the choice is **saved per workspace**, so moving to another project never inherits the previous one's order. While anything other than Manual is active, the sidebar footer names it next to the collection count, and doubles as the same menu.

The search field above the tree reaches **collections, folders and requests** — a request also matches on its URL and its method. Containers are listed first: typing the name of a collection should take you to that collection, not to everything inside it.

## Drag and drop

Every row is draggable. Each row has three drop zones: the top edge inserts **before**, the bottom edge inserts **after**, and the middle drops **into** a folder (or after a request). Dropping on a collection header moves the item to the root of that collection. **Move to…** does the same from a sheet when the target is far away.

## Auth and variables at collection level

A collection or folder can carry its own authentication that every request below it inherits, and a request can override it. The full chain is described in [Authentication](/docs/auth). Environments are per workspace, not per collection — see [Set up environments](/docs/environments).

## Running, exporting, importing

- **Run Collection…** (<kbd>⌘R</kbd>) or **Run Folder…** executes the subtree in order; see [Runner](/docs/runner).
- **Export as Mariner…** (<kbd>⌘⇧X</kbd>) writes a `.mariner` package you can commit or send to a teammate; **Export as Postman…** writes a v2.1 collection. Secrets are stripped from both. Formats are documented in [File format](/docs/file-format).
- Importing from cURL, Postman, OpenAPI or another Mariner export is covered in [Import from other clients](/docs/import).

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