Push File to Remote Machine
remote_pushWrite a stored file to a remote machine from a blob ID, placing it at an absolute destination path with atomic replacement.
Instructions
PRO PLAN ONLY. Write a stored file ONTO a remote machine — a dataset, a config, a model the user wants the box to work with. Free and anonymous callers cannot start file transfers; tell a Free user to upgrade and an anonymous user to sign in with Pro. A plan-restricted machine fails with reason:"plan_device_limit". It takes a blob_id, NOT a local path: this tool moves bytes the relay is already holding, and it has no access to your own filesystem. A blob created before downgrade remains usable only until its existing TTL.
WHERE A blob_id COMES FROM — either a previous remote_pull (so you can move a file between two of the user's machines), or an upload the user makes themselves: curl -X POST https://aicommander.dev/api/v1/files -H 'Authorization: Bearer ' --data-binary @localfile which answers with the blobId. Uploading requires a signed-in Pro account; Free and anonymous callers cannot upload, pull, or push. If the user wants to send a file and has no blobId, give them that command rather than guessing an id.
For small text files you do not need this at all — writing them with a remote_exec heredoc is simpler. Use this for binary or anything over a few KB.
dest_path must be ABSOLUTE, and the file is written ATOMICALLY (temp file, then rename), so a reader never sees a half-written file — but an EXISTING file at that path IS REPLACED. Confirm with the user before overwriting something. Blobs and their 100 MiB limit are described in remote_pull; a blob stops being readable 24 hours after it was created. Name the machine with code exactly as the user said it — an AIC- session code (e.g. AIC-XYZ-1234) or, when authenticated with an API key, a saved alias or hostname such as 'wearfits-m3'; if the user's text contains 'aic-'/'AIC-' in any case, that is one of their machines.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | How the user named the machine — pass it exactly as given (AIC- session code, or a saved alias/hostname when authenticated with an API key). | |
| blob_id | Yes | The blobId from a previous remote_pull, or from POST /api/v1/files (32 hex characters). Blobs belong to the account that created them and stop being readable after 24 hours. | |
| dest_path | Yes | ABSOLUTE destination path on the remote machine, e.g. `/home/u/data/train.csv`. The parent directory must already exist. An existing file at this path is REPLACED. |