### dbxcli Help Output Source: https://github.com/dropbox/dbxcli/blob/master/README.md Example output of the dbxcli help command, showing available top-level commands and global flags. This provides an overview of the tool's capabilities. ```shell $ dbxcli --help Use dbxcli to quickly interact with your Dropbox, upload/download files, manage your team and more. It is easy, scriptable and works on all platforms! Usage: dbxcli [command] Available Commands: cp Copy files du Display usage information get Download a file ls List files mkdir Create a new directory mv Move files put Upload files restore Restore files revs List file revisions rm Remove files search Search team Team management commands version Print version information Flags: --as-member string Member ID to perform action as -v, --verbose Enable verbose logging Use "dbxcli [command] --help" for more information about a command. ``` -------------------------------- ### Install dbxcli Binary on macOS Source: https://github.com/dropbox/dbxcli/blob/master/README.md Instructions for downloading and setting up the pre-compiled dbxcli binary on macOS. This involves creating a bin directory, updating the PATH, downloading the binary, and making it executable. ```shell $ mkdir ~/bin $ cd ~/bin export PATH=$PATH:$HOME/bin $ wget https://github.com/dropbox/dbxcli/releases/download/v2.1.1/dbxcli-darwin-amd64 $ mv dbxcli-darwin-amd64 dbxcli $ chmod +x dbxcli ``` -------------------------------- ### Build dbxcli from Source Source: https://github.com/dropbox/dbxcli/blob/master/README.md Steps to build the dbxcli tool from its source code using Go. This includes ensuring necessary tools are installed, fetching the source, obtaining Dropbox API keys, and running the build command. ```shell go get github.com/dropbox/dbxcli cd ~/go/src/github.com/dropbox/dbxcli go build ``` -------------------------------- ### dbxcli Team Command Help Source: https://github.com/dropbox/dbxcli/blob/master/README.md Example output of the dbxcli team command help, detailing available subcommands for team management. This includes adding/removing members, listing groups, and retrieving team information. ```shell $ dbxcli team --help Team management commands Usage: dbxcli team [command] Available Commands: add-member Add a new member to a team info Get team information list-groups List groups list-members List team members remove-member Remove member from a team Global Flags: --as-member string Member ID to perform action as -v, --verbose Enable verbose logging Use "dbxcli team [command] --help" for more information about a command. ``` -------------------------------- ### OAuth Authentication Flow for Dropbox CLI Source: https://context7.com/dropbox/dbxcli/llms.txt Handles the initial authentication setup for accessing the Dropbox API. Users are guided to visit an OAuth URL, authorize the application, and then paste the authorization code back into the terminal. Tokens are stored in ~/.config/dbxcli/auth.json and support personal, teamAccess, and teamManage types. ```go // Authentication is handled automatically on first run // User workflow: // 1. Run any dbxcli command // 2. Visit the displayed OAuth URL // 3. Click "Allow" and copy authorization code // 4. Paste code into terminal // Token storage location: ~/.config/dbxcli/auth.json // Supports three token types: // - personal: Individual user operations // - teamAccess: Team member operations with --as-member flag // - teamManage: Team administration commands // Example first-time usage: // $ dbxcli ls / // 1. Go to https://www.dropbox.com/oauth2/authorize?... // 2. Click "Allow" (you might have to log in first). // 3. Copy the authorization code. // Enter the authorization code here: ``` -------------------------------- ### Advanced Team Operations with dbxcli Source: https://context7.com/dropbox/dbxcli/llms.txt Enables performing actions as a specific team member using delegation via the --as-member flag. This is useful for managing files or performing operations on behalf of other team members. Supported operations include listing, getting, and putting files. ```bash # List files as a specific team member dbxcli --as-member dbmid:AAH4f6MAaFEa ls / # Download file as team member dbxcli --as-member dbmid:AAH4f6MAaFEa get /Documents/team-file.pdf # Upload file as team member dbxcli --as-member dbmid:AAH4f6MAaFEa put local.txt /Shared/local.txt ``` -------------------------------- ### List Files and Folders in Dropbox Source: https://context7.com/dropbox/dbxcli/llms.txt Lists contents of Dropbox directories. Supports basic listing, specific folder listing, long format with metadata, recursive listing, and handling of deleted files. No external dependencies beyond dbxcli. ```bash # Basic directory listing dbxcli ls / # List specific folder dbxcli ls /Documents # Long format with metadata dbxcli ls -l /Photos # Recursive listing of all subfolders dbxcli ls -R /Projects # Include deleted files dbxcli ls -d /Archive # Show only deleted files dbxcli ls -D /Backup ``` -------------------------------- ### Download Files from Dropbox Source: https://context7.com/dropbox/dbxcli/llms.txt Downloads files from Dropbox to the local filesystem, supporting custom destinations and progress tracking. Requires dbxcli to be authenticated with Dropbox. ```bash # Download to current directory dbxcli get /Documents/report.pdf # Download with custom destination dbxcli get /Photos/vacation.jpg ~/Pictures/vacation.jpg # Download to specific directory dbxcli get /Projects/code.zip /tmp/ ``` -------------------------------- ### Display Dropbox Storage Usage Source: https://context7.com/dropbox/dbxcli/llms.txt Displays the current storage usage and allocation details for the authenticated Dropbox account. Shows used space, account type, and total allocated space. Requires login. ```bash # Show storage usage dbxcli du # Example output: # Used: 25 GB # Type: individual # Allocated: 2.0 TB ``` -------------------------------- ### Display dbxcli Version Information Source: https://context7.com/dropbox/dbxcli/llms.txt Retrieves and displays the version information for the dbxcli tool and the underlying Dropbox SDK. This command is useful for checking compatibility and troubleshooting issues. ```bash # Show version details dbxcli version # Example output: # dbxcli version: 2.1.1 # SDK version: 6.0.0 # Spec version: 2023-11-27 ``` -------------------------------- ### Create Directory in Dropbox Source: https://context7.com/dropbox/dbxcli/llms.txt Creates a new directory within Dropbox. Supports creating single directories and nested directory structures. Requires valid Dropbox credentials. ```bash # Create a new folder dbxcli mkdir /Projects/new-project # Create nested directory dbxcli mkdir /Documents/2024/Reports ``` -------------------------------- ### List File Revisions in Dropbox Source: https://context7.com/dropbox/dbxcli/llms.txt Lists all available revisions for a specific file in Dropbox. Supports short format and a long format displaying full metadata for each revision. Requires authenticated access. ```bash # List revisions (short format) dbxcli revs /Documents/important.docx # List revisions with full metadata dbxcli revs -l /Projects/code.py ``` -------------------------------- ### Search Files and Folders in Dropbox Source: https://context7.com/dropbox/dbxcli/llms.txt Searches for files and folders within Dropbox using a query string. Supports searching within a specific path and displaying results in a long format with metadata. Requires authentication. ```bash # Search entire Dropbox dbxcli search "quarterly report" # Search within specific path dbxcli search "invoice" /Documents/Finances # Long format with metadata dbxcli search -l "presentation" ``` -------------------------------- ### Upload Files to Dropbox Source: https://context7.com/dropbox/dbxcli/llms.txt Uploads local files to Dropbox, featuring automatic chunked uploads for large files and support for concurrent workers. Allows specifying chunk size and number of workers. Requires authentication. ```bash # Upload to root dbxcli put ~/Documents/presentation.pptx # Upload with specific destination dbxcli put ~/Videos/movie.mp4 /Videos/movie.mp4 # Upload large file with 8 workers and 16MB chunks dbxcli put --workers 8 --chunksize 16777216 ~/large-file.iso /Backups/large-file.iso # Upload with debug timing dbxcli put -d ~/data.zip /Archives/data.zip ``` -------------------------------- ### Add Team Member to Dropbox Business Source: https://context7.com/dropbox/dbxcli/llms.txt Adds a new member to a Dropbox team by providing their email address and full name. An invitation email is automatically sent to the new member. Requires team admin privileges. ```bash # Add team member dbxcli team add-member john.doe@company.com John Doe # Member is automatically sent invitation email ``` -------------------------------- ### Copy Files and Folders in Dropbox Source: https://context7.com/dropbox/dbxcli/llms.txt Copies files or folders within Dropbox. Can copy single items or multiple items to a destination. Folder copying preserves all contents. Requires authentication. ```bash # Copy single file dbxcli cp /Documents/file.txt /Backup/file.txt # Copy multiple files to destination dbxcli cp /Photos/img1.jpg /Photos/img2.jpg /Archive/ ``` -------------------------------- ### Verbose Logging with dbxcli Source: https://context7.com/dropbox/dbxcli/llms.txt Enables detailed logging for debugging and troubleshooting purposes by appending the -v flag to any dbxcli command. The -d flag can also be used for debug timing, particularly useful during uploads. ```bash # Any command with verbose output dbxcli -v ls / # Verbose upload with debug timing dbxcli -v put -d largefile.zip /Backups/ ``` -------------------------------- ### List Dropbox Team Members Source: https://context7.com/dropbox/dbxcli/llms.txt Lists all members of a Dropbox team, including their name, ID, status, email, and role. Displays information in a tabular format. Requires team admin privileges. ```bash # List all team members dbxcli team list-members # Example output (tabular format): # Name Id Status Email Role # John Doe dbmid:AAH... active john@company.com member_only # Jane Smith dbmid:AAB... active jane@company.com team_admin ``` -------------------------------- ### Delete Files and Folders in Dropbox Source: https://context7.com/dropbox/dbxcli/llms.txt Removes files or folders from Dropbox. Includes an option for forced removal of non-empty directories. Use with caution as deletions are permanent. Requires authentication. ```bash # Remove a file dbxcli rm /Documents/obsolete.txt # Force remove non-empty directory dbxcli rm -f /OldProjects # Remove multiple items dbxcli rm /temp/file1.txt /temp/file2.txt ``` -------------------------------- ### Move Files and Folders in Dropbox Source: https://context7.com/dropbox/dbxcli/llms.txt Moves or renames files and folders within Dropbox. Supports moving single or multiple items to a new location or renaming them. Requires valid credentials. ```bash # Move single file dbxcli mv /Documents/old.txt /Documents/new.txt # Move to different folder dbxcli mv /Photos/image.jpg /Archive/ # Move multiple files dbxcli mv /temp/file1.txt /temp/file2.txt /Documents/ ``` -------------------------------- ### Restore File to Previous Revision in Dropbox Source: https://context7.com/dropbox/dbxcli/llms.txt Restores a file in Dropbox to a specified previous revision using its revision ID. The revision ID can be obtained using the `revs` command. Requires authentication. ```bash # Restore file to specific revision dbxcli restore /Documents/report.pdf a1b2c3d4e5f6 # First get revision ID, then restore dbxcli revs /data.csv dbxcli restore /data.csv 4f5e6d7c8b9a ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.