Brick CLI
What is Brick CLI?
Brick CLI is the command-line client for Brick. brick keeps a local folder in two-way sync with your Brick storage: it uploads local-only files, downloads remote-only files, and propagates deletions in either direction — deleting a file or folder locally moves it to trash, and a file or folder trashed on Brick is removed locally. When both sides edit the same file, the server's copy wins. After the initial pass, brick watches the folder for filesystem changes and polls Brick periodically, so both sides stay in sync until you stop it.
brick also handles logging in and managing which account is active for sync.
Installation
Quick Install
Install the latest release on macOS or Linux like so:
curl -fsSL https://raw.githubusercontent.com/requestbite/brick/main/install.sh | bash
The binary will be installed to ~/.local/bin by default.
Custom Installation Directory
To install the latest release to a custom directory, do like so:
curl -fsSL https://raw.githubusercontent.com/requestbite/brick/main/install.sh | bash -s -- --prefix $HOME/bin
Install Older Version
To install a specific version (in this example, version 0.0.1), do like so:
curl -fsSL https://raw.githubusercontent.com/requestbite/brick/main/install.sh | bash -s -- --version 0.0.1
Manual Download
Download pre-built binaries from GitHub Releases.
Supported Platforms:
- macOS (amd64, arm64)
- Linux (amd64)
- Windows (amd64)
Usage
Account Mgmt
============
--login Log in via browser
--switch-accounts Switch the active account
--whoami Show logged-in user and account details
Storage Sync
============
Running brick with no other options syncs storageSyncFolder with Brick and watches for changes
-r, --remote-control Allow Brick to remotely list/browse/transfer files on this device
--agent-root PATH Additional directory to expose to remote clients when remote control is enabled (repeatable)
Other
=====
--no-upgrade-check Disable automatic upgrade check
--uninstall Uninstall brick
-h, --help Show help information
-v, --version Show version information
Log in, pick an account, then sync:
brick --login
brick --switch-accounts # only needed if your user has more than one account
brick
On first run, brick prompts for the local folder to sync and remembers it (storageSyncFolder in ~/.config/brick/config.yaml) for subsequent runs.
Pass -r/--remote-control to also allow Brick to remotely list, browse, and transfer files on this device while syncing. Without it, the local agent refuses any such request.
Excluding folders from sync
To exclude folders from sync (Dropbox-style selective sync), add an excludeDirs list to ~/.config/brick/config.yaml, with paths relative to storageSyncFolder:
excludeDirs:
- folder/subfolder
- other-folder
Files inside an excluded folder (or any folder below it) are never uploaded or downloaded; changes to them are detected and logged, but otherwise ignored.
Daemon mode
Pass -d/--daemon to run every interactive step (login, sync-folder selection, first-run onboarding) attached to the current terminal as usual, then detach into the background once brick is logged in and Brick is reachable, handing control back to the shell. Not supported on Windows.
Local Status/Control API
While syncing, brick runs a local, loopback-only control API so another local process on the same machine — for example the Desktop app — can read live sync status and issue commands, without touching the terminal brick is attached to.
It's on by default; disable it with --no-control-api if you don't want any local IPC surface (for example, running brick unattended on a server). The API is served over a Unix domain socket and is never bound to a network-reachable address.
Endpoints:
| Method | Path | Description |
|---|---|---|
| GET | /v1/health | Liveness check; no auth required. |
| GET | /v1/status | Current sync state, counters, in-flight transfer, last error. |
| GET | /v1/activity | Recent upload/download/delete events. |
| GET | /v1/account | The logged-in account/client ID. |
| GET | /v1/quota | Account storage quota and usage. |
| POST | /v1/pause | Stop reconciling until resumed (the filesystem watcher keeps running). |
| POST | /v1/resume | Resume reconciling immediately. |
| POST | /v1/quit | Gracefully shut down brick (same path as Ctrl+C). |
TIP
While the full documentation for Brick CLI lives here, you can find the full source-code of the app on GitHub. If you have any questions or issues, please file a GitHub issue.