Skip to content
cyril-fl edited this page Nov 30, 2026 · 3 revisions

CLI

tide is the command-line client of a Tide server. It never opens the database: every command is a request to the API, for the account you are logged in as. Anything the web app does on notes, folders, tags and files, tide does too, and every command that reads has a --json output, so scripts and agents with a shell can batch over hundreds of notes in one pipeline.

Install

go install github.com/cyril-fl/tide/cmd/tide@latest

This puts tide in $(go env GOPATH)/bin. You need Go and a Tide server you can reach (Installation).

Log in

tide login https://notes.example.ts.net

tide login works like gh auth login: it prints a code and the page of the web app where your account allows it (opened in the browser when there is one), waits for your answer, then keeps the server and a token in ~/.config/tide/session.json, readable by you only. Every other command then acts for that account.

  • The address is the one of the web app (the server's WEB_ORIGIN), or http://127.0.0.1:8080 on the server itself. Without an address, tide login logs in again to the last server, which tide logout keeps. The code is typed on the /device page of the web app, in eight boxes.
  • The token lasts as long as the server's TIDE_CLI_TOKEN_LIFETIME says (90 days by default; Installation) and is listed, marked "CLI", with the API tokens in Settings > Applications, where you can revoke it. It acts as your account, but cannot change the password nor manage the accounts: that stays in the web app.
  • tide whoami shows the account and the server. tide logout revokes the token and removes it from the file.
  • TIDE_URL and TIDE_SESSION, when set, win over the file: this is how a script or an agent that cannot log in where it runs works, with an API token made in the web app's settings. Such a token opens the whole account; keep it like a password, out of any versioned file.

Running tide alone shows the account, its last changed notes and the commands to start with; tide --help lists them all, and tide <command> --help details one.

How the commands read

A command is a verb and, mostly, a noun: tide add note, tide show folder, tide edit tag, tide remove snippet.

Verb Does Nouns
add Creates note, folder, tag, file, snippet, search, token
show Reads note, folder, tag, file, snippet, search, token, links
edit Changes only what a flag asks for note, folder, tag, search
remove Deletes (to the trash for notes and folders) note, folder, tag, snippet, search, token

Also: move, search, replace, tag notes, recent, trash, restore, export, import, finder, graph, account purge, mcp.

  • A note or a folder is named by its path (/Projects/Ideas) or by its UUID. A path must match exactly, capitals included; if several items share it, the error lists their UUIDs.
  • A missing value opens a form. tide add note alone asks for what it needs. Without a terminal (cron, CI), pass everything through flags.
  • --content - reads the standard input.
  • Edit commands change only what you ask: tide edit note … --pin does not rewrite the text.
  • Output is plain text by default, --json for scripts. The JSON is a contract: fields are added, never renamed or removed, and a list stays an array.

A tour

Write

tide add note --content "# Ideas" --parent /Projects     # a missing value opens a form
cat ideas.md | tide edit note /Projects/Ideas --content -
tide edit note /Projects/Ideas --replace teh --with the   # or --title, --section <heading> --with
tide move /Projects/Ideas --parent /Archives
tide add file photo.jpg                  # prints the markdown that cites it; show file <uuid> --output copy.jpg gets it back

Read and find

tide show note /Projects/Ideas --json                     # by path or by UUID; tags, dates and lock
tide show note /Inbox/A /Inbox/B --max-chars 300 --json   # several notes in one request, only the start of each
tide show folder /Inbox --tags --length --preview 80 --limit 100 --json   # a page of a folder, the root without one
tide search recipe --limit 50 --offset 50 --json | jq -r '.[].id'
tide search --tag idea --any-tag cooking --not draft   # tags, --folder, --untagged, --empty-sections, --max-length, --updated-before
tide search --duplicates                               # notes sharing a title, grouped (--same-path: sharing a path), --json
tide recent                                            # the last changed notes

History

tide show note /Projects/Ideas --history     # its versions
tide show note /Projects/Ideas --version <uuid>
tide edit note /Projects/Ideas --restore-version <uuid>

See History and merge.

Tags and links

tide tag notes --folder /Archives --add old --remove todo --dry-run   # notes by path or the filters of search; --summary: counts only
tide show tag --similar                  # tags a typo, case, accent or plural apart, grouped with their note counts
tide show tag --list --prefix cui --min-notes 3   # some tags (also for --similar); show tag <tag> --limit --offset pages its notes
tide edit tag draft wip --merge --dry-run --summary   # how many notes the merge rewrites
tide remove tag inbox --dry-run --keep-empty   # the notes it changes; --keep-empty trashes none, --summary lists none
tide show links                          # the broken links: [[links]] to no note, trashed notes, missing files
tide show links /Projects/Plan --json   # a note's links, backlinks and the notes sharing its tags
tide replace teh the --folder /Projects --dry-run   # every note's occurrences, then without --dry-run replaces them all (Advanced plan)

--dry-run shows what a batch would change without writing. Renaming or deleting a tag rewrites the text of its notes, each keeping its previous text in its history (Titles and tags).

Snippets and saved searches

tide add snippet Recipe --content -      # also show snippet, remove snippet
tide add search Cooking --tag idea --folder /Recipes   # saved searches, the smart folders (Normal plan): show search [<name>], edit search, remove search

Screens in the terminal

tide finder               # browse, open and edit notes in the terminal
tide graph                # walk between notes that share tags

Import, export, trash

tide export ~/notes-md    # every note as markdown, into a new or empty folder
tide import ~/Obsidian/vault
tide trash && tide restore <uuid>

The rules of import and export are in Settings.

Tokens

tide add token "backup script" --expires 30d    # an API token for a script; --read-only for one that cannot change anything

From a script or an agent

  • Every reading command takes --json: pipe it into jq.
  • Pass every value by flag so no form opens.
  • Prefer one batched call to a loop: tide show note takes several notes, tide tag notes a whole group, and --dry-run --summary counts before writing.
  • An agent that can run a shell is better served by the CLI than by the MCP server: the CLI does everything the MCP does, and a loop over hundreds of notes costs one script instead of hundreds of tool calls.

Clone this wiki locally