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 CLI

CLI OVERVIEW

The odrive CLI provides users with an expressive, scriptable interface to the odrive Desktop Client.

The odrive Agent can be used on any system capable of running the odrive Desktop Client.

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

This is the CLI client and is used from the OS shell directly, or through shell scripts to control and enhance odrive Desktop Client behavior. The client is written in python and can be extended and customized to add additional functionality and automation.



INSTALL CLI ON WINDOWS

odrive.py is included with the odrive Desktop Client. You can find it in

$HOME\.odrive\bin\[version#]\cli\odrive.py

We also offer binary versions of the CLI client for download, for those that do not have/want to install python. You can find those here - Download CLI

Running the following command inside a powershell prompt will install the python and binary versions of the CLI to $HOME\.odrive-agent\bin automatically:

$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/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";


The following command will display the available client commands:

python odrive.py -h
odrive.exe -h

As long as you have the odrive Desktop Client running, you can use the CLI to control its underlying Progressive Sync Engine. For example, the following command will show the current status of the odrive desktop client sync engine:

python odrive.py status
odrive.exe status


INSTALL CLI ON MAC

odrive.py is included with the odrive Desktop Client. You can find it in

$HOME/.odrive/bin/[version#]/odrive.py

We also offer binary versions of the CLI client for download, for those that do not have/want to install python. You can find those here - Download CLI

Running the following command inside a terminal session will install the python and binary versions of the CLI to $HOME/.odrive-agent/bin automatically:

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/odrivecli-osx" | tar -xvzf- -C "$od/"


The following command will display the available client commands:

python odrive.py -h
odrive -h

As long as you have the odrive Desktop Client running, you can use the CLI to control its underlying Progressive Sync Engine. For example, the following command will show the current status of the odrive desktop client sync engine:

python odrive.py status
odrive status


USING ODRIVE CLI

Since the odrive CLI client interfaces with the odrive Desktop Client, everything is already setup if you have the desktop client running and logged into odrive. Simply run the available CLI commands to perform your desired actions.

For example:

Sync a folder

sync [local path to .cloudf placeholder file]

python odrive.py" sync "$HOME/odrive/Dropbox.cloudf"
odrive sync "$HOME/odrive/Dropbox.cloudf"
odrive.exe sync "$HOME\odrive\Dropbox.cloudf"

Sync a file

sync [local path to .cloud placeholder file]

python odrive.py sync "$HOME/odrive/Dropbox/myfile.txt.cloud"
odrive.exe sync "$HOME\odrive\Dropbox\myfile.txt.cloud"
odrive sync "$HOME/odrive/Dropbox/myfile.txt.cloud"


DOWNLOAD CLI



ADDITIONAL RESOURCES AND INFORMATION

For a detailed walkthrough of the odrive CLI with detailed examples, check out this blog post!