Use the CLI
inseam is the command-line client: the same engine as the macOS app, for a terminal, a server or a script.
Install
Section titled “Install”One line installs it on macOS and Linux, into ~/.local/bin:
curl -fsSL https://app.inseam.io/install.sh | shThe builds, and the app for a Mac, are on app.inseam.io/downloads.
Connect this device
Section titled “Connect this device”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.
Index folders
Section titled “Index folders”inseam host add ~/Notesinseam host add /srv/shared --name "shared drive"inseam host lsinseam runrun 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.
Search and read
Section titled “Search and read”inseam search "quarterly report" --top 5inseam search "error 500" --host h1a2b3c4d5e6 --jsoninseam get inseam://net/host/Notes/plan.md # the catalog record: address, size, dates, titleinseam cat inseam://net/host/Notes/plan.md # the file's bytesSearch covers the whole network, not only this device. --json prints the same shape the
search API returns.
Status
Section titled “Status”inseam status # this device: connection, each folder's progress; and the network's viewinseam whoami # device id, network, data directoryHeld removals
Section titled “Held removals”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:
inseam host sweep <host id> --confirmRemove a folder
Section titled “Remove a folder”inseam host rm <host id>The host is removed from your network and its index is cleaned up later. Your files are not touched.
Commands
Section titled “Commands”| 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 sweep <id> --confirm |
release held removals |
search <query> [--host] [--top] [--json] |
search the network |
get <address> |
print a catalog record |
cat <address> |
print a file’s bytes |
status [--json] |
device and network state |
whoami |
identity and paths |
Global options: --data-dir PATH. Logs go to stderr.