Monitor active Plex streams in real-time from the command line with this simple, customizable script. πΊβ
- β Monitor active Plex streams in real-time
- π οΈ Displays user and stream information
- π Customizable refresh interval
- π Secure token handling using
.env
- Bash
- curl
- xmllint (
libxml2-utils)
-
Clone the repository:
git clone git@github.com:hunterbrewer04/plex-monitor-script.git cd plex-monitor-script
-
Install dependencies:
sudo apt update sudo apt install libxml2-utils curl
-
Create a
.envfile and add your Plex token and URL:echo "PLEX_TOKEN=your_plex_token_here" > .env echo "PLEX_URL=http://127.0.0.1:32400" >> .env
-
Make the script executable:
chmod +x plex_monitor.sh
Run the script:
./plex_monitor.sh
Checking Plex streams... Active Streams: 2
Title: The Matrix User: john_doe
Title: Breaking Bad - S02E01 User: jane_smith
No active streams currently.
- Token & URL: Modify the
.envfile to update the Plex token and URL. - Refresh Interval: Adjust the refresh interval by modifying the
sleepcommand in the script.
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Commit your changes:
git commit -m "Add new feature" - Push to the branch:
git push origin feature/new-feature - Open a Pull Request
This project is licensed under the MIT License.
See the LICENSE file for full details.