Skip to main content

emby-cli

PyPI License: CC BY-NC 4.0

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 version
emby-cli info
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
emby-cli play "Movie (2010)"
emby-cli play "Show S01E01" --pick-best-item

info reports libraries and totals from GET /Items/Counts (totals may include multiple versions of the same title).

Title resolution (play / batch) is strict by default (year mismatch or multiple matches fail that line). Pass --pick-best-item 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):

  • downloadGET /Items/{id}/Download
  • stream — DirectStreamUrl / original.* (Emby Web style)
  • hls — HLS segments remuxed to .mkv (needs static-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

CC BY-NC 4.0

Release files for emby-cli 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for emby-cli 0.2.2
File Size Uploaded
emby_cli-0.2.2.tar.gz 27.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for emby-cli 0.2.2
File Interpreter ABI Platform
emby_cli-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 83.3 kB

Release files / emby_cli-0.2.2.tar.gz

Download URL emby_cli-0.2.2.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
586a82aaa849b418217ec831a55b757b0e02db815349ba29f263cc6797b7afac
BLAKE2b-256 checksum
How to use checksums
931306dad69e6e3cca9054821f63067eca3be416d9ddac32c7978e4137b1073d
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.2-py3-none-any.whl

Download URL emby_cli-0.2.2-py3-none-any.whl
Size 56.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4c5c2380350534526b366e7f216e90d945eab3f4313165bf8ed07e21dd13e6c
BLAKE2b-256 checksum
How to use checksums
115d82d6220b8155ca959fa682c07d7c132e952478445cc29d131b0f33ac1369
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page