Dropbox Command Line, cli, dbxcli





Get / Installation Pre-built Command


  1. ( Make sure you download and place the binary in a folder that’s on your `$PATH`. If you are unsure what this means, go to *step 2*. Otherwise, skip to *step 3* )
  2. ( Create a `bin` directory under your home directory.  )
    $ mkdir ~/bin
    $ cd ~/bin
  3. ( Add the following line at the end of your `~/.bash_profile` file. [Link with instructions](https://natelandau.com/my-mac-osx-bash_profile/) on how to find this file
    export PATH=$PATH:$HOME/bin
  4. Download the `dbxcli` binary for OSX and rename it. *IMPORTANT:* Check that the tag `v2.1.1` on the URL below is the latest release tag on the [Releases](https://github.com/dropbox/dbxcli/releases) page.
    $ wget https://github.com/dropbox/dbxcli/releases/download/v2.1.1/dbxcli-darwin-amd64
    $ mv dbxcli-darwin-amd64 dbxcli
  5. Finally, make the binary an executable file and you are good to go!
    $ chmod +x dbxcliThe steps above are the steps in README.md file (dbxcli-3.0.0.zip, sources zip).
    The below are additional steps, partly required by later generations of macOS (e.g. macOS 12 ) due to the for each generation of macOS increasingly strengthened protection against malware (Gatekeeper, even section below for more).
  6. First time trying to run dbxcli:
    Must allow to run: System Preferences > Security & Privacy : General tab, select Allow Anyway.
  7. Second time trying to run dbxcli:
    Confirm to Open in dialog popping up: ‘macOS cannot verify the developer of “dbxcli”. Are you sure you want to open it?’
  8. Now command WILL finally run, at least with for basic options like showing help.
    For anything related to your Dropbox account, one more step is required- getting and setting an authorization code.
    $ dbxcli ls
    Will print something like this

    1. Go to https://www.dropbox.com/1/oauth2/authorize?client_id=….&…..
    2. Click “Allow” (you might have to log in first).
    3. Copy the authorization code.
      Enter the authorization code here: <paste code from web page here and press Enter>
    4. That’s It. Finally. Now dbxcli can be used w/o restrictions.


macOS Gatekeeper



Troubles / Not-Yet Implemented / Bugs / …

Smart Sync not yet handled by any known CLI

Ok, so far only know of dbxcli but also article says no: dropboxforum.com/t5/Dropbox-files-folders/Smart-Sync-and-aTerminal-Command-Line/td-p/318207

For more research – google.com/search?q=dropbox+smart+sync+via+terminal