Skip to main content

yoto-cli

CI crates.io clispec compliant

Manage Yoto Make Your Own playlists from the command line: sign in, upload audio with a cover and chapter icons, and list, inspect, replace or delete your playlists.

yoto-cli is an independent tool built on the public Yoto Developer API. It is not made or endorsed by Yoto.

Install

brew install rvben/tap/yoto-cli   # macOS, Linux
uv tool install yoto-cli          # or: pipx install yoto-cli
cargo install yoto-cli

Prebuilt binaries for macOS, Linux and Windows, each with a SHA-256 checksum, are attached to every GitHub release.

Sign in

The Yoto API needs a client ID of your own:

  1. Create a public client at https://dashboard.yoto.dev/.
  2. Add http://127.0.0.1:8787/callback as an allowed callback URL.
  3. Under Scopes, tick user:content:manage (which brings in user:content:view and user:icons:manage) and offline_access. Without offline_access the sign-in page fails with "scopes that have not been pre-approved".
  4. Sign in once:
yoto-cli auth login --client-id <CLIENT_ID>

The browser opens the Yoto sign-in page (OAuth with PKCE; no client secret is involved). The tokens go into the OS keychain (the macOS Keychain, the Windows Credential Manager, or the Secret Service on Linux) and the client ID into the config file, so later commands need neither. On a host without one, such as a headless Linux server, set YOTO_CLI_TOKEN_FILE instead. Access tokens are refreshed automatically, also in the middle of a long upload; yoto-cli auth status shows the state without a network request, and yoto-cli auth logout forgets the tokens.

Upload a playlist

Point upload at a folder of MP3 or M4A files. Tracks are taken in file-name order and a numeric prefix such as 01 - is dropped from the title. A cover.jpg or cover.png in the folder (or its parent) becomes the cover; --cover FILE picks another and --no-cover sends none. The title defaults to the folder name (--title overrides it).

yoto-cli upload --dry-run "Boer Boris/Kaart"   # check everything, send nothing
yoto-cli upload --yes "Boer Boris/Kaart"

Before anything is sent, the Yoto limits are checked: at most 100 tracks, 100 MB and 60 minutes per track, and 500 MB per playlist. Yoto keeps files by SHA-256, so a file it already has is not uploaded again and an interrupted run can simply be repeated.

Each track becomes its own chapter, so the skip buttons on the player move between them. Linking the playlist to a physical card is done in the Yoto app.

To change a playlist later (new art, a corrected title) without breaking the card linked to it, replace it in place:

yoto-cli content list
yoto-cli upload --yes --replace <CARD_ID> "Boer Boris/Kaart"

Chapter icons

The player shows a 16x16 pixel icon while a chapter plays. Put an icons.json beside the audio (or in the book folder) mapping track numbers to icons:

{
  "default": "yoto:#aUm9i3ex3qqAMYBv-i-O-pYMKuMJGICtR3Vhf289u2Q",
  "1": "icons/tractor.png",
  "2": "yoto:#7Wt--qhx9t7PCSC8WBmGKJvlG53Z1uk7bN1dE9wGWJ0"
}

A value is either an image path relative to the JSON file, uploaded as your own icon, or a yoto:#<mediaId> reference to an icon Yoto already has. A 16x16 RGBA PNG or a 16x16 GIF is kept exactly as drawn; any other PNG, GIF or JPEG is resized by Yoto. Tracks without an entry get "default", or Yoto's standard icon when there is none.

Find public icons by title or tag:

yoto-cli icons list -q tractor
yoto-cli icons list --mine

--icons FILE uses another icons.json, --icon ICON sets the default from the command line, and --no-icons ignores any icons.json.

From a manifest

A prepared manifest.json can supply titles, order, cover and the expected SHA-256 of every file:

yoto-cli upload --dry-run --manifest manifest.json --book boerboris

Other commands

yoto-cli content list                 # your playlists
yoto-cli content show <CARD_ID>       # chapters and durations
yoto-cli content delete <CARD_ID> --yes
yoto-cli completions zsh > _yoto-cli

Environment

variable effect
YOTO_CLIENT_ID client ID for auth login when --client-id is not given
YOTO_CLI_TOKEN_FILE keep tokens in this file (mode 0600) instead of the OS keychain, e.g. on a headless host
YOTO_CLI_CONFIG_DIR directory of the config file
YOTO_CLI_API_URL, YOTO_CLI_AUTH_URL other API and sign-in base URLs

Exit codes

code kind meaning
0 success
1 invalid_input a local file, folder, manifest, cover or icon is unusable
3 usage invalid arguments or a missing client ID
4 not_authenticated not signed in, or the sign-in can no longer be refreshed
5 confirmation_required a mutating command needs --yes; nothing changed
6 limit_exceeded the playlist breaks a Yoto limit
7 not_found the playlist does not exist or is not yours
8 api_error the Yoto API returned an error
9 network no HTTP answer (retryable)
10 transcode_timeout Yoto did not finish transcoding in time (retryable)
11 auth_failed the browser sign-in did not complete
12 token_store the keychain, token file or config could not be read or written

For agents (clispec)

yoto-cli follows The CLI Spec: text on a TTY and JSON when piped (-o json / -o text to choose), progress on stderr, a structured error envelope on the last line of stderr, and a schema subcommand whose output validates against clispec.dev/schema/v0.3.json (checked by the test suite).

yoto-cli schema

License

MIT

Metadata

Release files for yoto-cli 0.1.1

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

Source distribution (sdist)

Source distribution for yoto-cli 0.1.1
File Size Uploaded Provenance
yoto_cli-0.1.1.tar.gz 95.3 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for yoto-cli 0.1.1
File
yoto_cli-0.1.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
yoto_cli-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
yoto_cli-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
yoto_cli-0.1.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
yoto_cli-0.1.1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 10.7 MB

Release files / yoto_cli-0.1.1.tar.gz

Download URL yoto_cli-0.1.1.tar.gz
Size 95.3 kB
Tags Source
SHA-256 checksum
How to use checksums
84a5c8dacdb68c253a2e107bd6034dee5e23f3c064991c88802c2e177b252ae4
BLAKE2b-256 checksum
How to use checksums
fb6d7b34d8f4f7c145b40c865cd5e2c0d45e868ff81851eae90db7b8fa9bbbbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / yoto_cli-0.1.1-py3-none-win_amd64.whl

Download URL yoto_cli-0.1.1-py3-none-win_amd64.whl
Size 2.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
30a2b1ce03473a6e999fa321edda8832fbcff629c79ec9075c4eea0c3020296f
BLAKE2b-256 checksum
How to use checksums
12a065c1936034acae86830220302331b7f85a01e92b54adf961f7fb8066332c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / yoto_cli-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL yoto_cli-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.4 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3e525442540bb57b32bafcafdc761c02966a20fdf37da13d61b34789d4185ff0
BLAKE2b-256 checksum
How to use checksums
b76a80d3f05c490f43f6cf1409670e138d65ffe70246822f1bae091ea82c1e77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / yoto_cli-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL yoto_cli-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.3 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
189bb54b1835724419272e2471921f2b7ce65c570dc191b4c529c597caef5259
BLAKE2b-256 checksum
How to use checksums
b38213328fe91e6c812cb5d4c308b3f5110bf747ac603640a6db3744ef09a952
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / yoto_cli-0.1.1-py3-none-macosx_11_0_arm64.whl

Download URL yoto_cli-0.1.1-py3-none-macosx_11_0_arm64.whl
Size 1.9 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
180636450cb8e2cf191a2c43d7c79c5d61d3675075128ef808dad13deafc5c1f
BLAKE2b-256 checksum
How to use checksums
3c413a00ed12ca6f3e1ea37ad28b1c0f570f0076410d8ba7a5101539e4ece472
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / yoto_cli-0.1.1-py3-none-macosx_10_12_x86_64.whl

Download URL yoto_cli-0.1.1-py3-none-macosx_10_12_x86_64.whl
Size 2.0 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c86024294fdda6874ddc2598dc881747d3623df1dd1646b570dcbf6c774ebbce
BLAKE2b-256 checksum
How to use checksums
b64a8319688eda6ce2541496dabd3de043e52e04ccf6d44608890ee1f20123ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for yoto-cli 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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