Remote CLI Access
NoteCove offers a few ways to use the CLI on or with a remote machine:
| Mode | Best for |
|---|---|
notecove serve --ssh |
Occasional or short-lived access; simplest setup; requires Mac desktop running and connected |
notecove link |
A remote with its own full copy of your data; standalone CLI, no app required anywhere |
| Headless daemon | Permanent remote machines; optional convenience layer that can manage a link process for you |
notecove serve — SSH-forwarded tunnel
notecove serve projects your local NoteCove profile to a remote machine over SSH, so the CLI on
the remote works exactly as if the desktop app were running there.
How It Works
The command establishes an SSH Unix socket forward (-R) from the remote machine to your local
desktop app, then writes a registry entry on the remote. The remote CLI connects through the
forwarded socket — completely unaware it’s talking to a Mac across the network.
When you stop the tunnel (Ctrl+C), the registry entry is cleaned up automatically.
When to Use This
- You’re SSH’d into a server and want to use
notecovecommands there - You’re running an AI assistant (Claude Code, etc.) on a remote machine and want it to have NoteCove access
- You want to use the CLI from a Docker container or VM
Step-by-Step
Prerequisites: NoteCove desktop app running locally; notecove CLI installed on the remote;
SSH access (key-based auth recommended); OpenSSH 6.7+.
Step 1 — Start the tunnel (on your Mac):
notecove serve --ssh user@remotehost
NoteCove connects, establishes the socket forward, and prints the init command for the remote.
Step 2 — Initialize access on the remote:
notecove init --profile abc123 --project MYPROJ
Approve the request in your local NoteCove desktop app.
Step 3 — Use the CLI on the remote normally. All commands go through the forwarded socket.
Step 4 — Stop: Press Ctrl+C in the notecove serve terminal.
Extra SSH Options
notecove serve --ssh user@remotehost --ssh-opts "-i ~/.ssh/mykey -p 2222"
Command Reference
| Flag | Description |
|---|---|
--ssh <user@host> |
Remote host to connect to (enables automated SSH mode) |
--ssh-opts <opts> |
Extra SSH options passed through to the ssh command |
notecove link — standalone bidirectional sync
notecove link keeps a storage directory bidirectionally in sync with copies on remote hosts (or
elsewhere on disk) — permanently and automatically. Unlike notecove serve, it doesn’t require
any app process to be running anywhere: not a desktop app, not a headless app, nothing. Each side
just needs the notecove CLI and its own copy of the storage directory’s files on disk.
When to Use This
- The remote machine runs long-lived agent sessions (Claude Code, etc.) that need their own local copy of your notes/tasks and must keep working even when nothing else on your Mac is running
- You want a remote to stay synced with minimal delay, without installing or managing any daemon
- You want to replicate a storage directory to another location on the same machine (an external drive, a backup path) with no network involved at all
How It Works
notecove link runs as a long-lived process wherever you start it. For each --ssh target it
maintains one SSH connection, running notecove sync-agent on the other end, and pushes CRDT
changes — plus any media/attachment files, not just the logs that reference them — bidirectionally.
Changes propagate near-instantly: link watches for local file changes and pushes as soon as it
sees one, with a 30-second poll as a pure backstop. It reconnects automatically on drops (Mac
sleep, network blips, SSH timeouts) with exponential backoff.
Quick Start
notecove link --root /path/to/sd --sd-id <sd-id> --ssh user@remotehost --remote-root /path/to/remote/sd
Multiple remotes:
notecove link --root /path/to/sd --sd-id <sd-id> \
--ssh user@vm1 --remote-root /sd/on/vm1 \
--ssh user@mac-mini --remote-root /sd/on/mac-mini
Sync locally instead (no network):
notecove link --root /path/to/sd --sd-id <sd-id> --local /Volumes/Backup/sd-copy
For full details, see Sync Storage Directories via SSH or Locally.
Headless daemon — persistent, autonomous remote
notecove serve --install-headless installs a full NoteCove daemon on the remote that runs
independently, with its own local copy of your Space data, and can manage a notecove link
process for you so the remote stays in sync without you starting link by hand. This is purely a
convenience layer — everything it does, notecove link already does standalone (see above);
the daemon is only worth setting up if you’d rather not manage link yourself.
When to Use This
- You want the remote’s sync and startup managed by a systemd service / launchd agent instead of a
manually-started
notecove linkprocess - You have multiple remote machines and want a consistent, auto-starting setup on each
For full setup instructions, see Set Up a Headless Remote Daemon.
Related Documentation
- Sync Storage Directories via SSH or Locally —
notecove linkfull guide - Set Up a Headless Remote Daemon — the optional daemon convenience layer
- Access NoteCove Remotely —
notecove servestep-by-step - Agent Workflows — using NoteCove with Claude Code and other agents
- Command Line Interface (CLI) — full CLI reference