Skip to content
Move the contents of the current directory tree to another machine and run a command there
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Aya: Run a command remotely with local data

Aya is used to sync a directory tree to a remote machine and run a command on the remote machine within the copied directory tree.


Create a file called .aya in the root of the directory tree you wish to copy to the remote machine. If the .aya file is nonempty, it should contain a list of filename globs, one per line, indicating which files should not be copied to the remote machine.

To execute a command remotely within a directory tree containing .aya file in its root, run

aya [username@]host:path command


Suppose we have a project rooted at /home/user/proj; we wish to copy /home/user/proj to beefymachine:/tmp/proj and run src/ on beefymachine. To make the data transfer go faster, we'll avoid copying any object files.

First, create the file /home/user/proj/.aya:


Then, in /home/user/proj/src/, execute

aya beefymachine:/tmp/proj ./

Aya will copy all the files in /home/user/proj, except any files ending in .o, to the directory /tmp/proj on beefymachine and execute /tmp/proj/src/ on beefymachine in the working directory /tmp/proj/src.

Aya uses rsync to do the copying so that repeated executions should be quite fast if little data have changed.

You can’t perform that action at this time.