skip to navigation
skip to content

compare-with-remote 0.10.0

Compare local script output with remote script output

Latest Version: 0.12.0


Compare local files with remote files


This is a generic file comparing tool. I wrote it to help the transition from “pet to cattle”. With other words I am switching from linux server managed with vi and ssh to configuration management.

It helps you to compare files on a remote host with files on your local file system.


pip install -e git+


===> compare-with-remote -h
usage: compare-with-remote [-h]
                           [--only-files-containing-pattern ONLY_FILES_CONTAINING_PATTERN]
                           directory_url_one directory_url_two

compare two directories. Directories can get fetched via ssh first, then
"meld" get called to copmare the directories. See

positional arguments:
  directory_url_one     [[user@]remote-host:]dir
  directory_url_two     [[user@]remote-host:]dir

optional arguments:
  -h, --help            show this help message and exit
  --only-files-containing-pattern ONLY_FILES_CONTAINING_PATTERN


You want to compare all files in the /etc directory which contain the word “rsyslog”:

root@local-server> compare-with-remote --only-files-containing-pattern rsyslog \
                                          root@server-with-cute-name-1:/etc \

You can compare the output of scripts like this:

root@local-server> compare-with-remote \
    'postgres@server-with-cute-name-1:psql -c "select app, name from django_migrations order by id"' \

If you don’t provide a remote-command for the second host, then the command from the first host will get called. In this case all rows of a database table get compared.


After fetching the files, the script calls the tool “meld” to show the actual diff:

Here is a screenshot of meld showing the difference between two files:

Don’t be shy

I want to know what you think and feel. Please leave a comment via the github issue tracker. I love feedback.

File Type Py Version Uploaded on Size
compare-with-remote-0.10.0.tar.gz (md5) Source 2017-04-21 4KB