Command Line Interface

What is the Command Line Interface?

Owlfiles includes a built-in command line interface. It lets you list, search, copy, move, and delete files across local disks, SMB, FTP, SFTP, WebDAV, NFS, and supported cloud services directly from Terminal.

The CLI reuses the connections and saved logins already configured in Owlfiles, so there is nothing extra to configure.

Run the CLI

The CLI is the Owlfiles application binary. Run it from Terminal using its full path:

/Applications/Owlfiles.app/Contents/MacOS/Owlfiles connections

To save typing in the default zsh shell, add this alias to ~/.zshrc, then open a new Terminal window:

alias owlfiles="/Applications/Owlfiles.app/Contents/MacOS/Owlfiles"

You can then run:

owlfiles connections

The examples below assume the owlfiles alias is available.

Address files

Most commands use an address in the form <connection>:<path>. The connection name is the name shown by owlfiles connections.

  • my NAS:/Documents/report.pdf addresses a file on the connection named “my NAS”.
  • GoogleDrive:1zeRs1TUOYxMwVdYJdHF_ikAaRCMYMcwp addresses an item by its Google Drive file ID.
  • local:~/Desktop or ~/Desktop addresses files on your Mac. If no connection is specified, Owlfiles treats the path as local.

If a connection name contains a space, quote the whole address: "my NAS:/Documents".

Commands

List connections

Show the name and protocol of every configured connection:

owlfiles connections

List a folder

Use ls to list a folder with modified dates and sizes. Add -a to include hidden files.

owlfiles ls "my NAS:/Documents"
owlfiles ls -a MyGoogleDrive:'1WlBH4KpOcIWgNKVVBRmUd5'

Get file information

Use info to show the type, size, and modified date of a file or folder:

owlfiles info "my NAS:/Documents/report.pdf"

Search for files and folders by name. An optional final number controls how many folder levels to search; the default is five.

owlfiles search "my NAS:/Documents" invoice
owlfiles search Dropbox report.pdf

Create a folder

owlfiles mkdir "my NAS:/Documents/Archive"

Delete

rm deletes a file or folder without a confirmation prompt. Use it with care.

owlfiles rm "my NAS:/Documents/old.txt"

Copy

The source and destination can be on different connections.

owlfiles cp "my NAS:/Documents/report.pdf" GDrive:'1WlBH4KpOBl8WXj31pOcIWgNKVVBRmUd5'
owlfiles cp /Users/me/Desktop/photo.jpg "my NAS:/Photos"

Move

Move a file or folder within one connection or across two connections:

owlfiles mv "my NAS:/Documents/report.pdf" MyOneDrive:'CF8821A253295DA6!142'

Help

owlfiles --help

Notes and troubleshooting

  • Connection name not found? Run owlfiles connections and quote names that contain spaces.
  • A connection asks you to sign in. Open the connection once in Owlfiles and sign in. The CLI reuses the saved login.
  • Local files are unavailable. Open the folder once in Owlfiles to grant access through the macOS App Sandbox.
  • Scripting. Commands return status 0 on success and a non-zero status on failure. Errors are written to standard error.