/ism

Interactive Shell Monitor

Primary LanguageShell

ism

Interactive Shell Monitor

Features

  • Collect and display stats about sucessful and unsuccessful commands that are executed in interactive shell.
  • Display notifications when a command is failing too often (e.g. you type "sl" instead of "ls").

Requirements

Installation instructions

OS X (using homebrew)

$ brew install shpoont/tap/ism
$ echo "source \$(brew --prefix)/etc/profile.d/ism.sh" >> ~/.bashrc

Linux

  • Install jq and bash-preexec manually
  • Make sure you have python installed
$ curl https://raw.githubusercontent.com/shpoont/ism/master/ism.sh -o ~/.ism.sh
$ echo "source ~/.ism.sh" >> ~/.bashrc

Usage

Displaying usage stats

ism stats

Getting notifications about unsuccessful commands

ism alerts

Settings

You can add settings to your ~/.bashrc file, before ism.sh is sourced. See example below.

ISM_DATA_DIR - Directory where ism will store data. Default is "~/.ism".

ISM_DATA_TTL - Amount of days to keep information about inactive commands. Default is "30".

ISM_ALERT_FAILURES_COUNT - Amount of unsuccessful command executions, after which a notification will be triggerred. Default is "10". Setting to "0" will turn the alert off.

ISM_STATS_LIMIT - Limit of commands displayed when using "ism --stats". Default is "20".

Example of ~/.bashrc:

ISM_STATS_LIMIT=30
ISM_DATA_TTL=10
ISM_ALERT_FAILURES_COUNT=5
source $(brew --prefix)/etc/profile.d/ism.sh