Dropbox CLI dbxcli Installation and Initial Setup [macOS Edition]

Tadashi Shigeoka ·  Sat, May 28, 2022

I’ll introduce how I installed the Dropbox CLI client dbxcli, logged in for the first time, and tried using it a bit.

Installing dbxcli

Since Homebrew tap for Dropbox CLI idleberg/homebrew-dbxcli was available, I’ll use this to install via brew.

brew tap idleberg/dbxcli
brew install dbxcli

Login to dbxcli

Get the Dropbox authorization code via browser and login to Dropbox via dbxcli.

dbxcli account

1. Go to https://www.dropbox.com/1/oauth2/authorize?client_id=xxx&response_type=code&state=state
2. Click "Allow" (you might have to log in first).
3. Copy the authorization code.
Enter the authorization code here:

dbxcli version: v3.0.0
SDK version: 5.4.0
Spec version: 097e9ba

Upload Local Files to Dropbox with dbxcli

As practice with dbxcli, I tried uploading local files to Dropbox, checking their existence, and searching for them.

Direct Upload with dbxcli

touch ~/Downloads/example.txt

dbxcli put ~/Downloads/example.txt

dbxcli search example
/example.txt

Upload with Specified Directory and File Name using dbxcli

dbxcli mkdir tmp

dbxcli put ~/Downloads/example.txt tmp/target-example.txt

dbxcli ls -l tmp/
Revision              Size Last modified Path
5e13fdb6f008c00670acf 0 B  9 seconds ago /tmp/target-example.txt

dbxcli search example
/example.txt  /tmp/target-example.txt

Above, I want to use Dropbox via CLI.

That’s all from the Gemba.

Reference Information