odrive

The odrive Developer Hub

Welcome to the odrive developer hub. You'll find comprehensive guides and documentation to help you start working with odrive as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

odrive Sync Agent

SYNC AGENT OVERVIEW

The odrive Sync Agent provides advanced users with a flexible, scriptable interface to odrive’s powerful Progressive Sync engine. Use it to bring cloud access to almost any environment.

The odrive Sync Agent can be used on Windows (7+), OS X (10.7+), Linux (glibc 2.11+), Raspberry Pi/ARMv6 (glibc 2.13+) operating systems.

Sync Agent Service (odriveagent / odriveagent.exe)

This is the “engine” and runs persistently. It will react to filesystem and remote changes and listen for commands from the odrive CLI.

odrive CLI (odrive.py / odrive / odrive.exe)

This is the client interface to the Sync Agent server. The odrive CLI is used from the command-line or from shell scripts to control and enhance Sync Agent behavior. The client is written in python and can be extended and customized to add additional functionality and automation, as well.



INSTALL SYNC AGENT ON LINUX/RPi

Run the following command in your terminal to download and install the odrive Sync Agent to ~/.odrive-agent. This will download the odrive Agent service, the odrive Agent python client, and the odrive Agent binary client.

od="$HOME/.odrive-agent/bin" && curl -L "https://dl.odrive.com/odrive-py" --create-dirs -o "$od/odrive.py" && curl -L "https://dl.odrive.com/odriveagent-lnx-32" | tar -xvzf- -C "$od/" && curl -L "https://dl.odrive.com/odrivecli-lnx-32" | tar -xvzf- -C "$od/"
od="$HOME/.odrive-agent/bin" && curl -L "http://dl.odrive.com/odrive-py" --create-dirs -o "$od/odrive.py" && curl -L "http://dl.odrive.com/odriveagent-lnx-64" | tar -xvzf- -C "$od/" && curl -L "http://dl.odrive.com/odrivecli-lnx-64" | tar -xvzf- -C "$od/"
od="$HOME/.odrive-agent/bin" && curl -L "https://dl.odrive.com/odrive-py" --create-dirs -o "$od/odrive.py" && curl -L "https://dl.odrive.com/odriveagent-rpi" | tar -xvzf- -C "$od/" && curl -L "https://dl.odrive.com/odrivecli-rpi" | tar -xvzf- -C "$od/"

To run the odrive Sync Agent server in the background, use the following command in your terminal:

nohup "$HOME/.odrive-agent/bin/odriveagent" > /dev/null 2>&1 &

Now the odrive Sync Agent server is running and you can use the odrive CLI to control it. For example, the following command will display the available client commands:

python "$HOME/.odrive-agent/bin/odrive.py" -h
"$HOME/.odrive-agent/bin/odrive" -h

The following command will show the current status of the odrive Sync Agent:

python "$HOME/.odrive-agent/bin/odrive.py" status
"$HOME/.odrive-agent/bin/odrive" status

For detailed information and examples on using Agent, refer to the Using odrive Sync Agent section.



INSTALL SYNC AGENT ON WINDOWS

odrive Sync Agent headless install via command line:

Open up powershell and run the following command to download and install the odrive Sync Agent to .odrive-agent in your user home directory. This will download the odrive Agent service, the odrive Agent python client, and the odrive Agent binary client. The command doesn't give much feedback, so just give it some time

$o="$HOME\.odrive-agent\bin";mkdir "$o" -FORCE;(New-Object System.Net.WebClient).DownloadFile("https://dl.odrive.com/odrive-py","$o\odrive.py");(New-Object System.Net.WebClient).DownloadFile("https://dl.odrive.com/odriveagent-win", "$o\o.zip");$shl=new-object -com shell.application; $shl.namespace("$o").copyhere($shl.namespace("$o\o.zip").items(),0x10);del "$o\o.zip";(New-Object System.Net.WebClient).DownloadFile("https://dl.odrive.com/odrivecli-win", "$o\oc.zip");$shl=new-object -com shell.application; $shl.namespace("$o").copyhere($shl.namespace("$o\oc.zip").items(),0x10);del "$o\oc.zip";

To run the odrive Sync Agent server in the background, use the following command in powershell:

Start-Job { & "$HOME\.odrive-agent\bin\odriveagent.exe" }

Now the odrive Sync Agent server is running and you can use the odrive CLI to control it. For example, the following command will display the available client commands:

python "$HOME\.odrive-agent\bin\odrive.py" -h
& "$HOME\.odrive-agent\bin\odrive.exe" -h

The following command will show the current status of the odrive Sync Agent:

python "$HOME\.odrive-agent\bin\odrive.py" status
& "$HOME\.odrive-agent\bin\odrive.exe" status

For detailed information and examples on using Agent, refer to the Using odrive Sync Agent section.



INSTALL SYNC AGENT ON MAC

Run the following command in your terminal to download and install the odrive Sync Agent to ~/.odrive-agent. This will download the odrive Agent service, the odrive Agent python client, and the odrive Agent binary client.

od="$HOME/.odrive-agent/bin" && curl -L "https://dl.odrive.com/odrive-py" --create-dirs -o "$od/odrive.py" && curl -L "https://dl.odrive.com/odriveagent-osx" | tar -xvzf- -C "$od/" && curl -L "https://dl.odrive.com/odrivecli-osx" | tar -xvzf- -C "$od/"

To run the odrive Sync Agent server in the background, use the following command in your terminal:

nohup "$HOME/.odrive-agent/bin/odriveagent.app/Contents/MacOS/odriveagent" > /dev/null 2>&1 &

Now the odrive Sync Agent server is running and you can use the odrive CLI to control it. For example, the following command will display the available client commands:

python "$HOME/.odrive-agent/bin/odrive.py" -h
"$HOME/.odrive-agent/bin/odrive" -h

The following command will show the current status of the odrive Sync Agent

python "$HOME/.odrive-agent/bin/odrive.py" status
"$HOME/.odrive-agent/bin/odrive" status

For detailed information and examples on using Agent, refer to the Using odrive Sync Agent section.



USING ODRIVE SYNC AGENT

Now that you have the odrive Sync Agent installed and running, it is time to start playing with it!

1. Create an odrive account

If you don’t have an odrive account yet, get it here.

2. Create an auth key for odrive Agent

Once you have signed-in, navigate to your Authentication Codes and click on “Create Auth Key” to create an auth key that you can then use to authenticate your odrive Sync Agent install.

3. Authenticate odrive Agent

authenticate [auth key]

python "$HOME/.odrive-agent/bin/odrive.py" authenticate 00000000-0000-0000-0000-000000000000-00000000
"$HOME/.odrive-agent/bin/odrive" authenticate 00000000-0000-0000-0000-000000000000-00000000
& "$HOME\.odrive-agent\bin\odrive.exe" authenticate 00000000-0000-0000-0000-000000000000-00000000

4. Create an agent mount

This will mount the root of your odrive to the local folder “odrive-agent-mount”. Make sure the local folder exists before attempting to mount:

mkdir "$HOME/odrive-agent-mount"

You can then mount and see your odrive links listed in ./odrive-agent-mount:

mount [local path] [remote odrive path]

python "$HOME/.odrive-agent/bin/odrive.py" mount "$HOME/odrive-agent-mount" /
"$HOME/.odrive-agent/bin/odrive" mount "$HOME/odrive-agent-mount" /
& "$HOME\.odrive-agent\bin\odrive.exe" mount "$HOME\odrive-agent-mount" /

5. Sync an odrive folder

sync [local path to .cloudf placeholder file]

python "$HOME/.odrive-agent/bin/odrive.py" sync "$HOME/odrive-agent-mount/Dropbox.cloudf"
"$HOME/.odrive-agent/bin/odrive" sync "$HOME/odrive-agent-mount/Dropbox.cloudf"
& "$HOME\.odrive-agent\bin\odrive.exe" sync "$HOME\odrive-agent-mount\Dropbox.cloudf"

6. Sync a file

sync [local path to .cloud placeholder file]

python "$HOME/.odrive-agent/bin/odrive.py" sync "$HOME/odrive-agent-mount/Dropbox/myfile.txt.cloud"
"$HOME/.odrive-agent/bin/odrive" sync "$HOME/odrive-agent-mount/Dropbox/myfile.txt.cloud"
& "$HOME\.odrive-agent\bin\odrive.exe" sync "$HOME\odrive-agent-mount\Dropbox\myfile.txt.cloud"


DOWNLOAD SYNC AGENT

DOWNLOAD CLI SYNC CLIENT



ADDITIONAL RESOURCES

Check out our in-depth blog post on the odrive CLI, including script examples

Visit our forum for more information and join the discussion

odrive Sync Agent