To install Imap-CLI, you can use pip:

pip install imap-cli

Or install it from its source code:

git clone
cd imap-cli
python install --user

This installation will provide command line tools allowing you to do simple task an IMAP account:

* imap-api: Provide a simple REST API to access your mailbox information
* imap-cli-status: List directories and display count of mail *seen*, *unseen* and *recent*
* imap-cli-list: List mail in specified directory
* imap-cli-search: Search throug specified directory for tag or plain text
* imap-cli-read: Display a mail on standard output
* imap-cli-flag: Set or Unset flag on specified set of mail
* imap-shell: A little shell to query mailbox informations

Each one of these command has its own documentation with the –help options

You can also find in Imap-CLI source code 2 bash script. The first one is imapcli, it is a little wrapper to help user with mail command:

imapcli status
imapcli list
imapcli read 23

Is equivalent to:

imap-cli-read 23

You can also access to help message of the wanted command with:

imapcli help status

The last script included in source code is This script give autocompletion to imapcli script. To install it, you just have to do:

cp /etc/bash_completion.d/imapcli
source ~/.bashrc

And then, autocompletion will be available.