$ plex-axi playlist --help
environment: default
exit: 0

usage: plex-axi playlist <list|show|create|add|remove> [<title>] [flags]
description: List, inspect and edit the audio playlists on this server
access[2]:
  list, show: read-only - this command cannot change anything on the server
  create, add, remove: mutating - needs PLEX_AXI_ALLOW_WRITES=true in the environment; without --write it previews the change and sends nothing
subcommands[5]:
  list, show <title-or-key>, create <title>, add <title-or-key>, remove <title-or-key>
flags{list}:
  --limit <n> (default 100), --fields <a,b,c> (replaces the default columns)
flags{show}:
  --limit <n> (default 50), --fields <a,b,c> (replaces the default columns)
flags{create}:
  --key <rating_key> (repeatable, a track's rating key or media_id, from `search` or `pick`; repeat for several), --write (apply it; without this the command shows what would change and sends nothing)
flags{add}:
  --key <rating_key> (repeatable, a track's rating key or media_id, from `search` or `pick`; repeat for several), --write (apply it; without this the command shows what would change and sends nothing)
flags{remove}:
  --key <rating_key> (repeatable, a track's rating key or media_id, from `search` or `pick`; repeat for several), --write (apply it; without this the command shows what would change and sends nothing)
note:
  only audio playlists are listed or edited; video and photo playlists on the same server are deliberately invisible here
note:
  a smart playlist's contents are a saved search and cannot be edited by adding items; the command says so rather than letting the server refuse
note:
  repeating one of these writes is safe: when the playlist already holds everything a `create` or `add` names, or none of what a `remove` names, the command answers `already: … (no-op)` and exits 0 rather than failing
note:
  a playlist is named by its `key` or `media_id` from `playlist list`, or by its exact case-folded title; on a miss the real keys and titles are handed back
note:
  `--key` takes tracks: an album's or an artist's key is refused with the search that lists its tracks, rather than added as one item that is not a song
note:
  `items` in a listing (`--fields key,title,items`) is the count the server declares, which for a smart playlist is cached; `playlist show` reports what it actually holds
note:
  listing columns: key, media_id, title, smart, items, updated
note:
  nothing here plays a playlist: both `list` and `show` print the playlist's own media_id, and `show` prints one per track as well
examples:
  plex-axi playlist
  plex-axi playlist show 'Example Playlist'
  plex-axi playlist show 501
  plex-axi playlist add 'Example Playlist' --key 12345 --key 12346
  plex-axi playlist create 'Example Playlist' --key 12345 --write
