emby-cli
CLI to list, search, play, and download/backup original media files from an Emby server via its REST API. Only HTTP access is required (default port 8096) — no SSH or rsync.
Install
pip install emby-cli
Development (from a clone of this repo):
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
Configuration
Set environment variables (or pass CLI flags):
| Variable | Description |
|---|---|
EMBY_SERVER |
Server URL (required) |
EMBY_API_KEY |
API key (or use username/password) |
EMBY_USERNAME / EMBY_PASSWORD |
Name/password auth |
EMBY_OUTPUT |
Download directory (default ./downloads) |
EMBY_METHOD |
download, stream, or hls |
EMBY_PLAYER |
External player for play |
See .env.example. The app does not load .env itself — source it or export vars.
Usage
emby-cli list
emby-cli search "Title"
emby-cli search "Title" --count 50
emby-cli download -i <itemId> -o ./downloads
emby-cli sync -l "Movies"
emby-cli batch -F titles.txt -n
emby-cli batch -F titles.txt --pick-best-item 1
emby-cli play "Movie (2010)"
emby-cli play "Show S01E01" --pick-best-item 1
Title resolution (play / batch) is strict by default (year mismatch or multiple matches fail that line). Pass --pick-best-item 1 to auto-select the best ≤1080p version. In batch, a season line like Show S01 downloads the whole season (with the same pick-best rule per episode version).
Download methods (-m / EMBY_METHOD):
download—GET /Items/{id}/Downloadstream— DirectStreamUrl /original.*(Emby Web style)hls— HLS segments remuxed to.mkv(needsstatic-ffmpeg)
Development
pip install -e ".[dev]"
pytest -q
python -m build && twine check dist/*
To publish a release, tag vX.Y.Z and push it (or create a GitHub Release). CI builds the package and publishes to PyPI via Trusted Publisher.
License
Release files for emby-cli 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| emby_cli-0.2.0.tar.gz | 22.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| emby_cli-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 71.4 kB
Release files / emby_cli-0.2.0.tar.gz
| Download URL | emby_cli-0.2.0.tar.gz |
|---|---|
| Size | 22.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c3becb198de5c9165920e15413b52a3bb27f9d1c6e3f7f261ea581033a865e1
|
|
BLAKE2b-256 checksum How to use checksums |
d9851a2ee8815b870a80b58bca45af77f4f58af7451e4eea06e5e8655e2adc63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / emby_cli-0.2.0-py3-none-any.whl
| Download URL | emby_cli-0.2.0-py3-none-any.whl |
|---|---|
| Size | 48.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb5f758daee8b1623e662b3bdbbbee70310b4f2596ace8ffebf30c4eb8726273
|
|
BLAKE2b-256 checksum How to use checksums |
7145feabe4a12e479018755babdda968e4ac5f688122374e1363f0de91789211
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|