Need help with tchaik?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

332 Stars 28 Forks BSD 2-Clause "Simplified" License 1.0K Commits 19 Opened issues


Music organisation and streaming system in Go

Services available


Need anything else?

Contributors list

Music organisation and streaming system

Tchaik is an open source music organisation and streaming system. The backend is written in Go, the frontend is built using React, Flux and PostCSS.

Tchaik UI Tchaik UI (Classical Music)


  • Automatic prefix grouping and enumeration detection (ideal for classical music: properly groups big works together).
  • Multiplatform web-based UI and REST-like API for controlling player.
  • Multiple storage and caching options: Amazon S3, Google Cloud Storage, local and remote file stores.
  • Import music library from iTunes or build from directory-tree of audio tracks.


  • Go 1.4+ (recent changes have only been tested on 1.5).
  • NodeJS, NPM and Gulp installed globally (for building the UI).
  • Recent version of Chrome (Firefox may also work, though hasn't been fully tested).


If you haven't setup Go before, you need to first set a


To fetch and build the code for Tchaik:

$ go get

This will fetch the code and build the command line tools into

(assumed to be in your

Building the UI:

$ cd $GOPATH/src/
$ npm install
$ gulp

Alternatively, if you want the JS and CSS to be recompiled and have the browser refreshed as you change the source files:

$ WS_URL="ws://localhost:8080/socket" gulp serve

Then browse to

to use tchaik.

Starting the UI

To start Tchaik you first need to move into the

$ cd $GOPATH/src/

Importing an iTunes Library

The easiest way to begin is to build a Tchaik library on-the-fly and start the UI in one command:

$ tchaik -itlXML ~/path/to/iTunesLibrary.xml

You can also convert the iTunes Library into a Tchaik library using the

$ tchimport -itlXML ~/path/to/iTunesLibrary.xml -out lib.tch
$ tchaik -lib lib.tch

NB: A Tchaik library will generally be smaller than its corresponding iTunes Library. Tchaik libraries are stored as gzipped-JSON (rather than Apple plist) and contain a subset of the metadata used by iTunes.

Importing Audio Files

Alternatively you can build a Tchaik library on-the-fly from a directory-tree of audio files. Only files with supported metadata (see will be included in the index:

$ tchaik -path /all/my/music

To avoid rescanning your entire collection every time you restart, you can build a Tchaik library using the

$ tchimport -path /all/my/music -out lib.tch
$ tchaik -lib lib.tch

More Advanced Options

A full list of command line options is available from the

$ tchaik --help
Usage of tchaik:
  -add-path-prefix prefix
        add prefix to every path
  -artwork-cache path
        path to local artwork cache (content addressable)
  -auth-password password
        password to use for HTTP authentication
  -auth-user user
        user to use for HTTP authentication (set to enable)
  -checklist file
        checklist file (default "checklist.json")
  -cursors file
        cursors file (default "cursors.json")
        print debugging information
  -favourites file
        favourites file (default "favourites.json")
  -itlXML file
        iTunes Library XML file
  -lib file
        Tchaik library file
  -listen address
        bind address for main HTTP server (default "localhost:8080")
  -local-store path
        path to local media store (prefixes all paths) (default "/")
  -media-cache path
        path to local media cache
  -path directory
        directory containing music files
  -play-history file
        play history file (default "history.json")
  -playlists file
        playlists file (default "playlists.json")
  -remote-store address
        address for remote media store: tchstore server :, s3://:/path/to/root for S3, or gs:///path/to/root for Google Cloud Storage
  -tls-cert file
        certificate file, must also specify -tls-key
  -tls-key file
        certificate key file, must also specify -tls-cert
  -trace-listen address
        bind address for trace HTTP server
  -trim-path-prefix prefix
        remove prefix from every path
  -ui-dir directory
        UI asset directory (default "ui")



to the local path that contains your media files. You can use
to rewrite paths used in the Tchaik library so that file locations can still be correctly resolved.



to the URI of a running tchstore server (
). Instead, S3 paths can be used:
(set the environment variables
to pass credentials to the S3 client), or Google Cloud Storage paths:
(set environment variable
to point to the JSON credentials file).



to cache all files loaded from
if set).



to create/use a content addressable filesystem for track artwork. An index file will be created in the path on first use. The folder should initially be empty to ensure that no other files interfere with the system.



to a suitable bind address (i.e.
) to start an HTTP server which defines the
endpoint used to inspect server requests. Currently we only support tracing for media (track/artwork/icon) requests. See for more details.

Windows Support

The default value for parameter

which does not work on Windows. When all library music is organised under a common path you can set
to get around this (for instance
-local-store C:\Path\To\Music -trim-path-prefix C:\Path\To\Music

Get Involved!

Development is on-going and the codebase is changing very quickly. If you're interested in contributing then it's safest to jump into our gitter room and chat to people before getting started!

Join the chat at

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.