Plays a piece in the terminal, in colour, until you press q or Ctrl-C.
mix ascii.play donut
mix ascii.play night-coast --fps 10 --mode ansi256
mix ascii.play typewriter --option "prefix=we make " --option phrases=tools,sites
mix ascii.play big-text --ink ff5f6d,ffc371
mix ascii.play boot-log --parts
mix ascii.play file-tree --part folder=58a6ff --part file.md=d29922
mix ascii.play MyApp.Pieces.WaveThe piece is a slug or the name of a module implementing Ascii.Piece
in this project or its dependencies.
Options
--fps N- frames a second (default: the piece's own)--mono- draw a coloured piece in one ink--ink COLOURS- the colour of a piece drawn in one ink:rrggbb(a leading#is optional, but quote it in a shell), or several, comma-separated, for a gradient (seeAscii.Ink)--gradient horizontal|vertical|diagonal- which way several inks run (defaulthorizontal)--parts- colour the parts of a piece that knows them (seeAscii.Parts) as it suggests--part name=COLOUR- a colour for one part, over--partsif given; repeat for more--paper- dark ink on a light terminal: shaded pieces flip their ramps--mode truecolor|ansi256|mono- how colour is written (defaulttruecolor; useansi256where 24-bit colour is not supported)--option key=value- one of the piece's options; repeat for more. Keys must be the piece's own (seeAscii.meta/1); a list takes comma-separated values or JSON.--seconds S- stop after S seconds instead of waiting for a key--interactive- keys go to a piece that can be used (seeAscii.handle_event/2): arrows, enter, space, tab, typing. Ctrl-C stops it, asqwould be a key for the piece.mix ascii.play file-tree --option walk=false --interactive mix ascii.play calendar --option date=2026-10-08 --interactive
After the first frame only the cells that change are written, so it plays well over SSH or a serial console. The cursor is hidden while it plays and shown again below the picture, with the colours reset, when it stops.