Skip to content

York CLI

Use York to manage files and access. Read and write data directly in your local file.

Command reference

York CLI commands
CommandBehavior
york login [--server URL]Connect this machine to your account. Opens the browser once and stores an account-wide token. Other commands do this automatically when not logged in.
york logoutRevoke the stored token and forget it.
york whoamiShow the account, and the file and role if the token is scoped.
york listList your files, invitations and files shared with you (as <person>/<name>, with the stable <owner-id>:<name>).
york usage [--json]Plan, files used and your invite link.
york create <name> [-d DESCRIPTION]Create an empty database. The description is shown to future agents by describe.
york describe <name> [--json]Purpose, notes, schema (with SQL comments) and row counts. Run this before reading or writing a file.
york connect <name> [path]Download a file (yours, or shared with you, accepting the invitation) to a new local path, default ./<name> for folders, ./<name>.db for SQLite or ./<name> with the original extension for text files, and sync it.
york link <path> [--name NAME] [-d DESCRIPTION]Adopt an existing folder, UTF-8 text file or SQLite database and sync it where it is. SQLite files bring their schema and rows.
york share <name> <@username|email|name> [--read]Invite someone with write access, or read-only with --read. Sharing with someone new waits for the owner's browser approval.
york share <name>List who has access to a file you own, with the handle to pass to york unshare.
york unshare <name> <@username|email|name>Revoke someone's access to a file you own, or cancel an invitation they haven't accepted.
york invitesList every invitation waiting for you, including from people you haven’t shared with yet and ones sent to your email.
york invites accept|decline <name>Decide an invitation. The first from someone new waits for browser approval unless approvals are off. york connect <name> accepts and downloads in one step.
york approvals [on|off]Show or change whether drops, destructive migrations, sharing with someone new and first invitations from someone new wait for browser approval.
york peopleList people you've shared with, ranked by sharing frequency and recency, with usernames and private nicknames.
york people rename <who> <nickname>Set a private nickname using a contact id, name, nickname or username.
york sync statusWhether the sync daemon runs, and each local file's state and number of unsent changes.
york sync installRun the sync daemon as a launchd or systemd user service. connect and link do this when no daemon runs.
york sync runRun the sync daemon in the foreground (what the service runs).
york sync reset <name>Save a drifted file beside itself as <file>.york-drift, then replace it from the shared copy.
york migrate <name> "<sql>"|-Run a schema change script ("-" reads stdin). Destructive changes wait for browser approval.
york export <name> > backup.sqlDump schema and all rows as SQLite SQL. Restore with sqlite3 restored.db < backup.sql.
york token <name> [--role read|write]Mint a token that can only access one file. Default role: write.
york updateInstall the newest release over this binary and restart the sync service. Beta builds follow beta releases.
york drop <name>Delete a file. Waits for you to approve in the browser.