Connect the CLI directly
Instead of downloading and uploading files, the CLI talks to Secrets directly. Changes made in the web app then arrive on your machine by themselves. The server still sees only encrypted files.
Connect in three steps
secrets-tool remote login (for another address: secrets-tool remote login https://<this-address>). The browser opens the page Connect a device; type the code from the terminal there and confirm. The device gets a token "Device: …" for the active tenant.secrets-tool remote projects lists your projects, secrets-tool remote pull shop-backend fetches ./secrets.enc and remembers the project.get, list, load, export and set first checks whether the web has a newer version and fetches it (auto-pull, at most every 30 seconds). What you change with set, delete or in the recipients, the CLI uploads right afterwards (auto-push, from 0.9.1.44). Without network it continues with the local file.secrets-tool get DB_PASSWORD # fetches web changes first secrets-tool set DB_PASSWORD new # change and upload right away (auto-push) secrets-tool remote sync # by hand: fetch or upload, whichever is newer secrets-tool remote sync --all # the same for all linked files on this computer
Conflicts and local changes
Local changes are never lost. Auto-pull only overwrites the file if it is unchanged since the last sync. If you changed something locally and someone saved on the web, remote sync reports a conflict and puts the server version into secrets.enc.server for comparison. remote pull --force discards your local changes on purpose.
The same applies to auto-push: if someone saved on the web in the meantime, nothing is overwritten. Your change stays local, the server version goes into secrets.enc.server, and the message tells you how to continue: remote pull --force, then enter your change again with set. Without network the change also stays local and is uploaded on the next sync.
Sync all files in the background
The CLI remembers every linked file on your computer. secrets-tool remote sync --all syncs them all at once and writes one line per project. secrets-tool remote auto-sync on does that every 15 minutes in the background, as a scheduled task of your user (Windows Task Scheduler without a console window, macOS LaunchAgent, Linux systemd): changes from the web are already waiting for you, and what you changed offline goes up as soon as the network is back. No password is needed, only encrypted files go back and forth. Conflicts overwrite nothing here either; secrets-tool remote auto-sync status shows the last run and open conflicts. Deleted project folders are reported as missing and forgotten after 30 days. Turn it off: secrets-tool remote auto-sync off (remote logout turns it off as well).
Turn it off
Turn auto-pull off: secrets-tool remote config auto-pull off, for a single call SECRETS_TOOL_AUTO_PULL=0. Turn auto-push off: secrets-tool remote config auto-push off (then upload with remote push or remote sync), for a single call SECRETS_TOOL_AUTO_PUSH=0. The link is stored in secrets.enc.remote; it contains no secret but belongs in .gitignore.
For servers and CI
Without a browser: under My access → API tokens create a separate token per server or pipeline and run secrets-tool remote login https://<this-address> sat_…. In the deployment run secrets-tool remote pull <project> before load. With stages, set SECRETS_TOOL_STAGE=prod once in the pipeline and all commands apply to prod. If a server is no longer trusted, revoke its token. A token can only do what the account can do in the chosen tenant.
If the deployment runs on your own computer, secrets-tool unlock --device spares you the password prompt there for good (see Device unlock). The table under API tokens shows in the Device unlock column which device is unlocked and when it last unlocked.
Only enter a pairing code if you just started remote login yourself. The page shows device name and IP of the request so you can spot foreign codes.