Skip to content

Use the CLI

inseam is the command-line client: the same engine as the macOS app, for a terminal, a server or a script.

One line installs it on macOS and Linux, into ~/.local/bin:

Terminal window
curl -fsSL https://inseam.io/install.sh | sh

The builds, and the app for a Mac, are on the downloads page.

Terminal window
inseam enrol --name "work laptop"

It prints a code, opens the approval page in your browser, and waits until you approve. On a server, add --no-open and open the printed URL anywhere you are signed in.

The device’s key and settings are saved in its data directory (INSEAM_HOME, by default under your home folder). You do this once per device.

Then give the device your network key, so that it can index sealed hosts. Do one of these:

Terminal window
inseam keys share # on a device that has the key: give it to every device of yours that waits
inseam keys recover inseam-recovery-… # on this device, with your recovery key

Or, in the web app, open Nodes and select Give this device the key. See keep your data private.

Terminal window
inseam host add ~/Notes
inseam host add /srv/shared --name "shared drive"
inseam host ls
inseam run

run keeps the device connected: it walks every folder, watches for changes, sends the index and serves reads. Leave it running (a launch agent or a systemd unit works) and stop it with Ctrl-C. host add works while run is active in another terminal; the running process picks the new folder up.

Terminal window
inseam search "quarterly report" --top 5
inseam search "error 500" --host h1a2b3c4d5e6 --json
inseam get inseam://net/host/Notes/plan.md # the catalog record: address, size, dates, title
inseam cat inseam://net/host/Notes/plan.md # the file's bytes
inseam search walnut --type 'image/*' --modified-after 2026-11-01 # only images changed since 1 November
inseam browse "h1a2b3c4d5e6/Old (archive)/" # one folder: its folders, then its files with size, time and type
inseam browse h1a2b3c4d5e6 --recursive --ext pdf --min-size 1M # every PDF of 1 MiB or more on the host

Search covers the whole network, not only this device. --json prints the same shape the search API returns.

search and browse take the same filter flags. A file must match all of them:

flag keeps
--type <MIME> files of this media type, or a family such as image/*; give it again for more
--ext <EXT> files with this extension, without the dot; give it again for more
--modified-after <TIME>, --modified-before <TIME> files modified in this window: a date (2026-11-01) or an ISO 8601 time
--min-size <SIZE>, --max-size <SIZE> files of this size: bytes, or K, M or G (10M is 10 MiB)
--name <TEXT> files whose name or title contains the text; in browse, also folders
--under <PATH> search only: files whose path in the host starts with this, such as Projects/2026/

--host limits a search to a host; give it again for more hosts. browse takes a folder as a full address or as {host}/{path}/; a host id alone is its root. --recursive lists every file under the folder. When there is more, the last line says what to pass to --after. With --json it prints the page that the browse API returns.

Terminal window
inseam status # this device: connection, each folder's progress; and the network's view
inseam whoami # device id, network, data directory
Terminal window
inseam perf # the last 24 hours: median and p95 against the 500 ms budget, where the time goes, each folder
inseam perf --window 7d # 1h, 24h, 7d or 30d
inseam perf --json # the gateway's numbers, for scripts

The same numbers as the Performance page in the app. They cover every search on the network, from this device, the app and agents. inseam records how long each search took and how much it read, never what was searched for.

Terminal window
inseam keys status # is the network sealed, does this device hold the key, and who holds each host's key
inseam keys init # seal the network from this device; prints the recovery key once
inseam keys recover <key> # get the network key with the recovery key
inseam keys share [node] # give the key to one device of yours, or to every device that waits for it
Terminal window
inseam host pause <host id> # stop indexing a host: no walk, no watch, no crawl
inseam host pause --all # every folder this device indexes
inseam host resume <host id> # start again: a full pass finds what changed meanwhile
inseam host index <host id> # a full pass now; a folder whose indexer stopped starts again

A pause is kept by the network, so the app, the web app and every device see it. Search still finds what is already indexed, and a file written through inseam is still indexed. These commands work for any host of your network, a cloud account or a folder on another device too, and inseam run does not need to be running. inseam host index asks the device that indexes the folder; when that device is offline, it says so.

A folder takes no writes until you add a rule to its write policy. The first rule that matches a write decides it:

Terminal window
inseam host policy <host id> # show the policy
inseam host policy <host id> --add agent --to create,replace --prefix Notes/ # agents may write under Notes/
inseam host policy <host id> --add agent --refuse --prefix Notes/Private/ --at 1 # but not under Notes/Private/
inseam host policy <host id> --remove 2 # remove rule 2
inseam host policy <host id> --clear # take no writes again

An agent also needs the write scope in its grant. The web app’s host page has the same rules under Writes. See write policy.

When a walk finds that a large part of a folder is gone, the removals are held, the same as in the app. inseam status shows held-sweep on that folder. Release it only when the files are really gone:

Terminal window
inseam host sweep <host id> --confirm
Terminal window
inseam host rm <host id>

The host is removed from your network and its index is cleaned up later. Your files are not touched.

command does
enrol [--name] [--no-open] join a network with a device code
run run the device in the foreground
host add <path> [--name] index a folder
host ls list folders and their state
host rm <id> stop indexing a folder
host pause <id>… | --all pause indexing of hosts
host resume <id>… | --all resume indexing of hosts
host index <id> index a host now
host sweep <id> --confirm release held removals
host policy <id> [--add <who> --to <actions> | --refuse] [--prefix] [--mime]… [--at] | --remove <n> | --clear show or change which writes a host takes
search <query> [--host]… [--top] [--under] [filter flags] [--json] search the network
get <address> print a catalog record
cat <address> print a file’s bytes
browse <folder> [--recursive] [--limit] [--after] [filter flags] [--json] list one folder: its folders, and its files with type, size and modified time
status [--json] device and network state
perf [--window] [--json] how fast searches on the network are, and where the time goes
whoami identity and paths
keys status [--json] whether the network is sealed, and who holds each key
keys init seal the network and print the recovery key once
keys recover <recovery key> get the network key on this device
keys share [node] give the network key to your other devices

Global options: --data-dir PATH (or INSEAM_HOME). Logs go to stderr.