jellyfin-sdk-kotlin/samples/kotlin-cli
2020-10-31 12:23:56 +01:00
..
src/main/kotlin/org/jellyfin/sample/cli Replace kotlinx.cli with Clikt 2020-10-31 12:23:56 +01:00
build.gradle.kts Replace kotlinx.cli with Clikt 2020-10-31 12:23:56 +01:00
README.md Replace kotlinx.cli with Clikt 2020-10-31 12:23:56 +01:00
test.sh Replace kotlinx.cli with Clikt 2020-10-31 12:23:56 +01:00

Kotlin CLI Example

This sample project uses the Clikt library to build a command line tool that uses the Jellyfin apiclient. It is used as a showcase the abilities of the apiclient and is not meant for general use.

Features include:

  • Server discovery
  • List public users
  • Authenticate
  • List libraries

Basic usage

Assuming the binary is called jellyfin the following sample will list all libraries in the demo instance:

JELLYFIN_SERVER="https://demo.jellyfin.org/stable"
JELLYFIN_TOKEN=`jellyfin login --username demo`

jellyfin libraries

This script is also provided as part of the test.sh script.