Story

Roadmap

Updates

Pricing

Resources

All guides

### Command line tool

Search, read and add to your library from Terminal or a script with the resurf command.

Install

Settings → MCP → Advanced

Command

resurf

On

Mac

### Install it

Open Settings → MCP and expand Advanced .

On Terminal command , click Copy .

Paste it in Terminal and press Return .

If it says ~/.local/bin isn't on your PATH, add the line it prints to your shell file. If it says your shell still runs a different resurf , remove that one as it tells you.

Open a new Terminal window and run resurf --version .

The copied command runs /Applications/Resurf.app/Contents/Helpers/resurf install cli , which links that program into ~/.local/bin . Add --dry-run to see what it would change first.

### How it works

resurf reads and writes the same library as the app, on this Mac, and the app picks up what it saves. It finds your library on its own. If it finds more than one, pass --vault with a vault ID or path, or set RESURF\_VAULT ; resurf vault list shows them.

In Terminal it prints readable text. Add --json for a versioned result a script can read, or --md for compact Markdown.

resurf --help lists the commands, and resurf help find , or resurf capture update --help , shows one command's flags. resurf capabilities --json describes every command, type and error code.

### Commands

| Command | What it does |
| --- | --- |
| resurf find | Search, filter and read captures. Start here. |
| resurf note | Save a Markdown note. |
| resurf link | Save a web address, with page details fetched. |
| resurf file | Save a file: an image, PDF, video, audio or any document. |
| resurf open | Open a capture in Resurf. |
| resurf read | Print a resurf:// link as Markdown. |
| resurf capture list | List captures with filters, newest first. |
| resurf capture get | Read one or more captures by ID. |
| resurf capture search | Plain ranked search. |
| resurf capture update | Change the title, description, source, pin, triage, tags and spaces. |
| resurf capture pin , unpin | Pin or unpin a capture. |
| resurf capture submit | Save up to 100 items from a JSON request. |
| resurf capture reveal | Show a capture's folder, or its file, in Finder. |
| resurf comment add | Add a comment to a capture. |
| resurf space list , space create | List spaces, or create one. |
| resurf tag list | List tags. |
| resurf vault list , current , stats | Show the libraries resurf can see, the one it uses, and counts. |
| resurf index status , rebuild | Check or rebuild the command line's search cache. |
| resurf install cli , completions | Put resurf on your PATH, or add tab completion. |
| resurf mcp serve | Run the MCP server for agents . |
| resurf capabilities | Describe every command, for scripts and agents. |

Short forms: list , get , search , edit (for capture update ), spaces , tags , stats and vaults .

### Search and filter

resurf find takes optional words and any of these flags.

| Flag | What it does |
| --- | --- |
| --type | A capture type. Repeat it to match any of several: note , quote , color , link , product , pdf , image , video , audio , voiceNote , file . |
| --tag | An exact tag name. Repeat it; every tag must match unless you add --tag-match any . |
| --space | A space name or ID. Repeat it; any space matches unless you add --space-match all . |
| --triage | inbox or later . |
| --pinned , --not-pinned | Only pinned, or only unpinned. |
| --deleted , --all-states | Only the Trash, or everything. |
| --sort | relevance , created , updated or opened . Relevance is the default with words, created without. |
| --order | asc or desc . |
| --limit | Results per page: 20 by default, up to 200, or 50 with context. |
| --cursor | The next page, from page.nextCursor . |
| --include context | Adds every capture's details and text. |
| --paths | Prints one file path per line. |
| --words-only | Matches words only, without meaning search. |
| --compact | Leaves out heavy fields. |

Terminal

resurf find "pricing pages" resurf find --space Research --tag todo --pinned resurf find "onboarding" --type link --type article --sort created --limit 50 --json resurf find --triage inbox --sort opened --order asc

### Save and change

note , link and file all take --title , --description , --tag and --space , each repeatable where it makes sense.

note takes its text from --body or, for more than a line, from --stdin , plus --source-url and --source-app . Its --space must already exist.

link and file can make missing spaces with --create-spaces , and --no-enrich saves without fetching page details. Saving a link you already have reuses that capture instead of making a second one.

Terminal

resurf note --title "Idea" --body "Try a weekly digest" resurf link https://example.com --space Reading --tag later resurf file ~/Desktop/shot.png --tag design --create-spaces --space "Mood boards"

capture update changes what's around a capture, never its text: --title , --description , --source-url , --source-app , --quote-attribution , --pin and --no-pin , --triage inbox\|later\|archived , --add-tag , --remove-tag , --add-space and --remove-space . An empty value clears a field. Later means tomorrow morning; archived puts it away with no date.

comment add takes --text . space create takes --color and --icon , and returns the existing space when the name is taken.

Terminal

resurf capture update cap\_… --add-tag todo --add-space Projects resurf capture update cap\_… --triage later resurf capture update cap\_… --title "A better title" resurf capture pin cap\_… resurf comment add cap\_… --text "Check the pricing table" resurf space create Reading --color "\#7a63ff" --icon "📚"

### Output for scripts

With --json , every command prints one JSON object. ok says whether it worked, data holds the result, and page , on lists, has total , returned , hasMore and nextCursor .

resurf find example --limit 1 --json, shortened

\{

"ok"

:

true

,

"command"

:

"capture.find"

,

"data"

:

\{

"items"

:

\[

\{

"capture"

:

\{

"id"

:

"cap\_348F70C565F749ACAFF1"

,

"type"

:

"link"

,

"title"

:

"example.org"

,

"tags"

:

\[

"todo"

\]

,

"uri"

:

"resurf://open/cap\_348F70C565F749ACAFF1"

,

…

\}

,

"rank"

:

1

\}

\]

,

"refinements"

:

\{

…

\}

\}

,

"page"

:

\{

"hasMore"

:

true

,

"nextCursor"

:

"eyJvZmZzZXQi…"

,

"returned"

:

1

,

"total"

:

3

\}

,

"warnings"

:

\[

\]

,

"meta"

:

\{

"cliVersion"

:

"2.0.0"

,

"durationMs"

:

4

\}

,

"schemaVersion"

:

"resurf.cli/v1"

\}

When ok is false, error has a code, a message, whether it's worth retrying, and sometimes suggestions.

resurf get cap\_nope --json, shortened

\{

"ok"

:

false

,

"command"

:

"capture.get"

,

"error"

:

\{

"code"

:

"not\_found"

,

"message"

:

"No capture with the ID “cap\_nope” exists in this vault."

,

"retryable"

:

false

\}

,

…

\}

Other flags every command takes: --md , --compact , --no-color (also applied when the output is piped or NO\_COLOR is set), --non-interactive to forbid prompts and windows, --request-id to tag a call in the result, and --verbose for detail on stderr.

| Exit code | Means |
| --- | --- |
| 0 | It worked. |
| 1 | An internal error, or the library or content isn't readable. |
| 2 | The command or a value is wrong. |
| 3 | Not found, or a name or ID matches more than one. |
| 4 | Not allowed, or it needs you to confirm. |
| 5 | A conflict, such as a request ID used before for different content. |
| 6 | Some items failed. |
| 7 | The network, a timeout, or the library being busy or unavailable. |
| 130 | Cancelled. |

### Recipes

These use jq to read JSON. It comes with recent versions of macOS; on older ones, install it with Homebrew.

Save every web address in a text file , one per line. Blank lines and lines starting with \# are skipped, and links you already have are reused, so it's safe to run again.

Terminal

while IFS= read -r url; do case "$url" in ""\|\\\#\*) continue ;; esac resurf link "$url" --space Reading --tag imported --json --compact \| jq -r 'if .ok then "saved \\(.data.capture.title)" else "failed \\(.error.message)" end' done &lt; urls.txt

Dump a space to a JSON file , a page of 200 at a time.

Terminal

space="Reading" cursor="" : &gt; reading.jsonl while true; do if \[ -n "$cursor" \]; then page=$(resurf find --space "$space" --limit 200 --json --cursor "$cursor") else page=$(resurf find --space "$space" --limit 200 --json) fi printf '%s\\n' "$page" \| jq -c '.data.items\[\].capture' &gt;&gt; reading.jsonl cursor=$(printf '%s\\n' "$page" \| jq -r '.page.nextCursor // empty') \[ -z "$cursor" \] &amp;&amp; break done jq -s '.' reading.jsonl &gt; reading.json

Save a note from the clipboard or a file.

Terminal

pbpaste \| resurf note --title "From the clipboard" --stdin --tag inbox cat meeting.md \| resurf note --title "Design sync" --stdin --space Projects

File everything with a tag into a space.

Terminal

resurf find --tag todo --limit 200 --json \| jq -r '.data.items\[\].capture.id' \| while IFS= read -r id; do resurf capture update "$id" --add-space Projects done

Copy the files behind a search into a folder.

Terminal

mkdir -p ~/Desktop/design resurf find --type image --tag design --paths \| while IFS= read -r file; do cp "$file" ~/Desktop/design/; done

Save many things in one go with capture submit . Write a request with up to 100 items. Each item has an id and content : a link with a url , text with "intent": "quote" for a quote or "format": "markdown" for a note, or an asset whose file you list in a separate attachments file. Optional metadata and organization carry the title, quote attribution, tags, space IDs from resurf space list --json , and your Note.

request.json

\{

"requestID"

:

"import-2026-10-19"

,

"items"

:

\[

\{

"id"

:

"1"

,

"content"

:

\{

"kind"

:

"link"

,

"url"

:

"https://example.com"

\}

\}

,

\{

"id"

:

"2"

,

"intent"

:

"quote"

,

"content"

:

\{

"kind"

:

"text"

,

"text"

:

"Simplicity is prerequisite for reliability."

\}

,

"metadata"

:

\{

"quoteAttribution"

:

"Edsger W. Dijkstra"

\}

,

"organization"

:

\{

"tags"

:

\[

"quotes"

\]

\}

\}

,

\{

"id"

:

"3"

,

"content"

:

\{

"kind"

:

"text"

,

"text"

:

"\# Reading list\\n\\n- Finish chapter 3"

,

"format"

:

"markdown"

\}

,

"organization"

:

\{

"spaceIDs"

:

\[

"space\_reading\_f4a149"

\]

,

"userNote"

:

"From my old notes app"

\}

\}

,

\{

"id"

:

"4"

,

"content"

:

\{

"kind"

:

"asset"

,

"asset"

:

\{

"attachmentID"

:

"shot"

,

"filename"

:

"shot.png"

,

"mimeType"

:

"image/png"

\}

\}

\}

\]

\}

Terminal

echo '\{ "shot": "/Users/you/Desktop/shot.png" \}' &gt; attachments.json resurf capture submit --request request.json --attachment-paths attachments.json --json \| jq '.data.counts'

The result reports saved , reused or failed for each item. Submitting the same request again adds nothing; reusing its requestID with different items is refused.

### Completions and the search cache

resurf install completions adds tab completion for zsh, bash or fish, for your current shell unless you pass --shell . For zsh it writes ~/.zsh/completions/\_resurf and, if your .zshrc doesn't load that folder yet, prints the fpath line to add before compinit . bash needs the bash-completion@2 package from Homebrew.

The command line keeps its own search cache, separate from the app's. If results look out of date, resurf index status compares it with your library, and resurf index rebuild builds it again. Rebuilding only rereads your library.

### What it doesn't do

The Access switches in Settings → MCP don't apply to it. Anything that can run resurf can add, organize and comment whatever the switches say.

It can't move captures to the Trash, edit a note's text, edit or delete comments, or export your library.

### If something goes wrong

| You see | What to do |
| --- | --- |
| Something you saved or changed doesn't show in Resurf | Quit and reopen Resurf. The app doesn't always notice changes made from Terminal while it's open. |
| resurf: command not found | Run the Terminal command from Settings → MCP → Advanced , add ~/.local/bin to your PATH as it says, and open a new Terminal window. |
| More than one vault is available. Select one explicitly. | Pass --vault with an ID or path from resurf vault list , or set RESURF\_VAULT . |
| No Space named “…” exists in this vault. | Check the name with resurf space list , or, for link and file , add --create-spaces . |
| This request ID was already used for different content. | Give the changed request a new requestID . |
| jq: command not found | Install jq with Homebrew, or leave out the jq part. |
| An old resurf still runs | Run the Terminal command again. It names the old resurf and the command that removes it, such as npm uninstall -g resurf . |

### Questions

resurf says command not found.

Copy the Terminal command from Settings → MCP → Advanced and run it, then add ~/.local/bin to your PATH as it tells you. Open a new Terminal window afterwards.

Can I export my library with it?

Not as an export. resurf find --json gives you every capture's details as JSON, a page at a time; Export to CSV in Settings → Data writes the whole library with its files.

Can I set a capture's date from the command line?

No. Captures saved with resurf are dated when you save them. To keep old dates, use a CSV import with a created\_at column.

[Home](https://resurf.so/)

[agents](https://resurf.so/guides/connect-agents)

[Story](https://resurf.so/about)

[Roadmap](https://resurf.so/roadmap)

[Updates](https://resurf.so/changelogs)

[Pricing](https://resurf.so/license)

[Resources](https://resurf.so/guides/command-line#)

[Access switches](https://resurf.so/guides/agent-access)