A simple command-line tool for automatically updating and managing scrcpy using PowerShell.
- Automatically checks for the latest version of scrcpy
- Downloads and installs scrcpy
- Provides easy-to-use command-line interface
- Clone the repository:
git clone https://github.com/theisoj/scrcpy-cli-tool.git
- Navigate to the project directory:
cd scrcpy-cli-tool
To update and manage scrcpy, place the scrcpy-cli.ps1
file in the following directory based on your operating system:
- Windows:
C:\scrcpy
- macOS:
/usr/local/bin/scrcpy
- Linux:
/usr/local/bin/scrcpy
Then, run the following command in PowerShell:
.\scrcpy-cli.ps1
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License.
Ensure that PowerShell is installed on your operating system. If it is not installed, follow the instructions below to install it.
PowerShell comes pre-installed on Windows 10 and later. For older versions, download and install it from the official PowerShell GitHub releases page.
- Open a terminal window.
- Install Homebrew if it is not already installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Use Homebrew to install PowerShell:
brew install --cask powershell
- Open a terminal window.
- Follow the instructions for your specific distribution from the official PowerShell GitHub releases page.
To make the scrcpy-cli.ps1
script globally available on your operating system, you need to add its directory to your system's environment variables.
- Run this script in PowerShell:
.\scrcpy-cli.ps1
- Choose the option 5 in the menu to add the directory to the path.
- Close and reopen the terminal or command prompt window.
- Open the Start Menu and search for "Environment Variables".
- Select "Edit the system environment variables".
- In the System Properties window, click on the "Environment Variables" button.
- In the Environment Variables window, find the
Path
variable in the "System variables" section and select it. - Click "Edit" and then "New" to add a new entry.
- Enter
C:\scrcpy
and click "OK" to save the changes.
- Open a terminal window.
- Edit your shell profile file (e.g.,
~/.bashrc
,~/.zshrc
, or~/.profile
) using a text editor. - Add the following line to the file:
export PATH=$PATH:/usr/local/bin/scrcpy
- Save the file and run the following command to apply the changes:
source ~/.bashrc # or the appropriate profile file
After completing these steps, you should be able to run the scrcpy-cli-tool.ps1
script from any terminal or command prompt window.
© 2024 theisoj. All rights reserved.