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

cargo install yoto-cli

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.0

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.0
File Size Uploaded Provenance
yoto_cli-0.1.0.tar.gz 87.6 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for yoto-cli 0.1.0
File
yoto_cli-0.1.0-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.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
yoto_cli-0.1.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
yoto_cli-0.1.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 8.5 MB

Release files / yoto_cli-0.1.0.tar.gz

Download URL yoto_cli-0.1.0.tar.gz
Size 87.6 kB
Tags Source
SHA-256 checksum
How to use checksums
533544e179d640f4da2350e584dd81e5a4badc8db4d96e60b64c77b12557ecfb
BLAKE2b-256 checksum
How to use checksums
3e1dac721f19561601ad1360336a63104a9bd2d44f84bc5f292e391b04a693b6
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.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL yoto_cli-0.1.0-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
ff609264380f86d7eaf9413d255ba951fd16d8f2344d3411f1f9cd115a5c76bd
BLAKE2b-256 checksum
How to use checksums
fd27cb03e507bca0d7f8c447a14f6ba3f45bdde6b8711f62fa26684651a621f2
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.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL yoto_cli-0.1.0-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
7df19083f0639399956ae79f1b7e6ed833675e9a7754982c09492cd6a2492bb7
BLAKE2b-256 checksum
How to use checksums
10542ba4f0165e46c850f4054207800aa737e73e8833a41172042682926d2698
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.0-py3-none-macosx_11_0_arm64.whl

Download URL yoto_cli-0.1.0-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
955bd9fe92c29f6b96b513399008d6104b22acaa260ff6d90e6a54dc4174b3d6
BLAKE2b-256 checksum
How to use checksums
7a2cc9704ff8498cdfe0bc0d067caee95a282e5a9a889a6be9e4ed214a0eeece
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.0-py3-none-macosx_10_12_x86_64.whl

Download URL yoto_cli-0.1.0-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
e54276f284437b770b057b63be90260a71f80eb8edbdbeb0527989af59d334c6
BLAKE2b-256 checksum
How to use checksums
18c5f8c834d1be9853a2d5ed6fa0e2a2dcf7dacc9084fd2d7871fd9b245a2b32
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.0

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