Command line shell

Concert comes with a command line interface that is launched by typing concert into a shell. Several subcommands define the action of the tool.

Session commands

The concert tool is run from the command line. Without any arguments, its help is shown:

$ concert
usage: concert [-h] [--version]  ...

optional arguments:
  -h, --help  show this help message and exit
  --version   show program's version number and exit

Concert commands:

    start     Start a session
    init      Create a new session
    mv        Move session *source* to *target*
    log       Show session logs
    show      Show available sessions or details of a given *session*
    edit      Edit a session
    rm        Remove one or more sessions
    fetch     Import an existing *session*

The tool is command-driven, that means you call it with a command as its first argument. To read command-specific help, use:

$ concert [command] -h


When Concert is installed system-wide, a bash completion for the concert tool is installed too. This means, that commands and options will be completed when pressing the Tab key.


Create a new session with the given name:

concert init experiment

If such a session already exists, Concert will warn you.


Create the session even if one already exists with this name.


List of module names that are added to the import list.


The location of the session files depends on the chosen installation method. If you installed into a virtual environment venv, the files will be stored in /path/to/venv/share/concert. If you have installed Concert system-wide our without using a virtual environment, it is installed into $XDG_DATA_HOME/concert or $HOME/.local/share/concert if the former is not set. See the XDG Base Directory Specification for further information. It is probably a very good idea to put the session directory under version control.


Edit the session file by launching $EDITOR with the associated Python module file:

concert edit session-name

This file can contain any kind of Python code, but you will most likely just add device definitions and import processes that you want to use in a session. If the session-name doesn’t exist it is created.


Show log of session:

concert log session-name

If a session is not given, the log command shows entries from all sessions.


Instead of showing the past log, update as changes come in. This is the same operation as if the log file was viewed with tail -f.

By default, logs are gathered in $XDG_DATA_HOME/concert/concert.log. To change this, you can pass the --logto and --logfile options to the start command. For example, if you want to output log to stderr use

concert --logto=stderr start experiment

or if you want to get rid of any log data use

concert --logto=file --logfile=/dev/null start experiment


Show all available sessions or details of a given session:

concert show [session-name]


Rename a session:

concert mv old-session new-session


Copy a session:

concert cp session session-copy


Remove one or more sessions:

concert rm session-1 session-2


Be careful. The session file is unlinked from the file system and no backup is made.


Import an existing session from a Python file:

concert fetch

Concert will warn you if you try to import a session with a name that already exists.


Overwrite session if it already exists.


The URL denotes a Git repository from which the sessions are imported.


The server certificates are not verified when specifying an HTTPS connection!


Load the session file and launch an IPython shell:

concert start session-name

The quantities package is already loaded and named q.

--logto={stderr, file}

Specify a method for logging events. If this flag is not specified, file is used and assumed to be $XDG_DATA_HOME/concert/concert.log.


Specify a log file if --logto is set to file.

--loglevel={debug, info, warning, error, critical}

Specify lowest log level that is logged.


Run the session as a script and do not launch a shell.



If Spyder is installed, start the session within the Spyder GUI.