nerdcuba/cliscrpy
About
A clean CLI on top of scrcpy to mirror and control a fleet of Android phones from Linux or macOS
Developer ToolsWhat you can do
- Named fleet: a tiny registry (~/.config/cliscrpy/devices.conf) maps hardware serials to names.
- One phone, one entry: phones are identified by hardware serial, the same over USB and Wi-Fi.
- Parallel fleet actions: install, uninstall, screenshot, deep link, clear and run on every phone at once.
- Smart stay-awake: if a phone refuses it, cliscrpy turns it off for that phone and reopens the mirror.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalcliscrpy
A clean CLI on top of scrcpy to mirror and control a whole fleet of Android phones from your Linux or macOS desktop.
Website: nerdcuba.github.io/cliscrpy
Why
scrcpy is great, but juggling several phones means remembering serials, retyping flags and hunting for the right window. cliscrpy wraps it in a single command:
- give each phone a name instead of a serial,
- open, close and restart mirrors for all phones or just one,
- install and uninstall apps, take screenshots, open deep links and run commands on every phone at once,
- go wireless (with or without a cable) and record without memorizing scrcpy options,
- keep your settings (bitrate, resolution, audio, extra flags) in one file.
Every window is titled Phone-<name>, so your window manager can place each phone
in the same spot every time.
Install
curl -fsSL https://raw.githubusercontent.com/nerdcuba/cliscrpy/main/install.sh | bash
This installs cliscrpy to ~/.local/bin, plus shell completions (bash, zsh, fish)
and a desktop launcher on Linux. Make sure ~/.local/bin is in your PATH.
Later, cliscrpy update gets the latest release and cliscrpy uninstall removes it.
If you installed with Homebrew, use brew upgrade / brew uninstall instead (cliscrpy tells you).
Or from a clone:
git clone https://github.com/nerdcuba/cliscrpy.git
cd cliscrpy && ./install.sh
Requirements: bash 4.4+, scrcpy and adb.
If they're missing, cliscrpy detects your package manager (pacman, apt, dnf, zypper,
xbps, Homebrew) and offers to install them. cliscrpy doctor checks everything.
macOS
With Homebrew:
brew install nerdcuba/tap/cliscrpy
brew install --cask android-platform-tools
Using the curl installer instead? Run brew install bash scrcpy first: macOS ships
bash 3.2, and cliscrpy switches to Homebrew's bash automatically.
Phones
On each phone, enable Developer options → USB debugging and accept the prompt the first time you plug it in.
Usage
cliscrpy # open a mirror for every connected phone
cliscrpy pixel7 # open only phones whose name matches "pixel7"
cliscrpy status # name, serial, link (usb/wifi), state, mirror
cliscrpy install app-debug.apk # install on every phone
cliscrpy url myapp://profiles # jump to a screen of your app everywhere
cliscrpy shot # screenshot every phone
cliscrpy close # close all mirrors (or: cliscrpy close pixel7)
Names match partially and ignore case. Most commands take an optional [name] to act
on some phones only. Run cliscrpy help <command> for details on any command.
Mirroring
| Command | Description |
|---|---|
open [name] |
Open all phones, or the ones matching name |
close [name] |
Close mirrors (a frozen one is force-closed after 3s) |
restart [name] |
Close and reopen mirrors |
status |
Every phone adb sees: name, serial, link, state, stay-awake, mirror |
record [name] |
Mirror and record to ~/Videos/cliscrpy/<name>-<date>.mp4 (~/Movies on macOS) |
logs <name> |
Last 40 lines of a phone's scrcpy log |
Wireless
| Command | Description |
|---|---|
wifi [name] |
Switch a USB phone to Wi-Fi, then unplug the cable |
pair <ip:port> <code> |
Pair over Wi-Fi without a cable (Android 11+ wireless debugging) |
reconnect |
Reconnect known phones over Wi-Fi (mDNS or last known IP) |
A phone keeps its name and settings on every link. Connected by USB and Wi-Fi at the same time, it still shows up once.
Fleet
| Command | Description |
|---|---|
install <apk> [name] |
Install or update an app on every phone, in parallel |
uninstall-app <package> [name] |
Uninstall an app from every phone, in parallel |
shot [name] |
Save a screenshot of every phone to ~/Pictures/cliscrpy |
url <url> [name] |
Open a URL or deep link everywhere |
clear <package> [name] |
Clear an app's data everywhere (fresh start) |
run "<cmd>" [name] |
Run an adb shell command everywhere and show each output |
Devices
| Command | Description |
|---|---|
scan |
Register connected phones by model name |
add <serial> <name> |
Register a phone with a custom name |
rename <name> <new> |
Rename a phone (an open mirror is reopened under the new name) |
remove <name> |
Unregister a phone |
awake <name> on|off |
Keep the screen on while mirroring |
devices |
List registered phones |
Setup
| Command | Description |
|---|---|
config |
Edit settings in $EDITOR |
doctor |
Check dependencies, phones, open mirrors and recent errors |
update |
Update to the latest release |
uninstall [--purge] |
Remove cliscrpy (--purge also deletes settings and logs) |
completion bash|zsh|fish |
Print the shell completion script |
Settings
cliscrpy config opens ~/.config/cliscrpy/settings.conf:
BITRATE=8M # video bitrate (e.g. 4M, 8M, 16M)
MAX_SIZE=0 # max resolution (0 = native, e.g. 1080)
AUDIO=off # forward phone audio to the PC (on/off)
EXTRA_ARGS="" # any extra scrcpy flags, quotes allowed
WINDOW_HEIGHT=900 # window height in px, width follows the phone (0 = scrcpy decides)
WINDOW_HEIGHT makes the window open at exactly the phone's shape, with no black bars
at the sides. It defaults to 900 on Linux and 0 on macOS.
Tiling window managers
Every mirror window is titled Phone-<name>. Send them all to one workspace, or give
each phone its own spot:
Hyprland (hyprland.conf):
windowrule = workspace 4 silent, title:^(Phone-.*)$
Older Hyprland versions use windowrulev2 with the same arguments.
sway / i3:
for_window [title="^Phone-"] move container to workspace 4
for_window [title="^Phone-Pixel7$"] move container to workspace 5
Features
- Named fleet: a tiny registry (
~/.config/cliscrpy/devices.conf) maps hardware serials to names. - One phone, one entry: phones are identified by hardware serial, the same over USB and Wi-Fi.
- Parallel fleet actions: install, uninstall, screenshot, deep link, clear and run on every phone at once.
- Smart stay-awake: if a phone refuses it, cliscrpy turns it off for that phone and reopens the mirror.
- Robust mirrors: tracked by PID; frozen ones are force-closed.
- Per-phone logs in
~/.local/state/cliscrpy/. - Helpful errors: unauthorized phones, typos and unknown names are reported clearly.
- Single bash script, no dependencies beyond scrcpy and adb.
Platform
- Linux: any distro with bash 4.4+.
- macOS: with Homebrew's bash (see above). Notifications go to Notification Center.
- Windows: not supported. If you'd like it, open an issue.
Development
tests/run.sh runs the test suite against fake adb and scrcpy, so it never needs a
real phone. CI runs it on Linux and macOS, plus shellcheck.
Packaging files for AUR and Homebrew live in packaging/. See CHANGELOG.md.
License
MIT © 2026 @nerdcuba
Explore related projects
Loading…