Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including kmdr with all npm packages installed. Try it out:

var kmdr = require("kmdr")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

kmdr v0.3.4

A command-line interface for explaining commands in the terminal

kmdr-cli npmnpm

The ultimate CLI learning tool for explaining commands from your terminal

kmdr provides command explanations for hundreds of programs including git, docker, kubectl,npm, go and more straight forward programs such as those built into bash.



  • Node.js v8.x and above
  • A package manager like npm or yarn

With npm

npm install kmdr@latest --global

With yarn

yarn global add kmdr@latest

With Homebrew 🍺 (only macOS)

brew install kommandr/tap/kmdr

Check installation

Run the command kmdr to check if it was correctly installed on your system.

$ kmdr
Usage: kmdr [options] [command]

The ultimate CLI learning tool for explaining commands from your terminal

kmdr provides command explanations for hundreds of programs including git,
docker, kubectl, npm, go and more straight forward programs such as bash builtins.

  -v, --version        output the version number
  -h, --help           output usage information

  explain|e [options]  Explain a shell command
  upgrade|u            Check for new releases
  feedback|f           Send feedback :)

Troubleshooting installation

Command not found: kmdr

Add the line below to your .bashrc or .zshrc if using zsh

export PATH="$(yarn global bin):$PATH"

Running kmdr in a docker container

  1. Build the image

    docker build -t kmdr-cli .
  2. Run the docker container

    docker run -it --rm  kmdr-cli


Explain a command

Once kmdr-cli is installed on your system, enter kmdr explain to return a prompt for entering the command you would like explained.

When the Enter your command: prompt is returned, enter the command you would like explained and hit the Enter key.

kmdr will return syntax highlighting to assist you in differentiating parts of the command followed by the explanation of each of these parts.

An example explanation of git commit -am "Initial commit" can be seen below.

$ kmdr explain
? Enter your command: git commit -am "Initial commit"

    git commit -am "Initial commit"

      The stupid content tracker
      Record changes to the repository
    -a, --all
      Tell the command to automatically stage files that have been modified and deleted
    -m, --message Initial commit
      Use the given <msg> as the commit message

    git reset HEAD~1
      Undo the most recent commit, keeping its changes in the filesystem

    git commit -m "Initial commit"
      Commit staged files to the repository with message "Initial commit"

    git log -n 3 --oneline
      Show only the first line of the last three commit messages

    hg, lsof, systemctl, aria2c, dmesg, make


Explaining commands with subcommands

$ kmdr explain
? Enter your command: npm install kmdr@latest --global

    npm install kmdr@latest --global

      javascript package manager
      Install a package
      An operand
    -g, --global
      Argument will cause npm to install the package globally rather than locally.

    npm install kmdr@latest --global
      Install kmdr on your machine

    npm install
      Download all the packages listed as dependencies in package.json

    npm list -g --depth=0
      List all top-level globally installed modules on the system

    dpkg, pip, gem, node, cargo, install

Explanining commands with grouped options

$ kmdr explain
? Enter your command: rsync -anv file1 file2

    rsync -anv file1 file2

      A fast, versatile, remote (and local) file-copying tool
    -a, --archive
      This is equivalent to -rlptgoD.
    -n, --dry-run
      This makes rsync perform a trial run that doesn’t make any changes
      (and produces mostly the same output as a real run).
    -v, --verbose
      This option increases the amount of information you are given during
      the transfer.
      An operand
      An operand

    rsync -av --progress sourceDir user@host:remotedDir
      Synchronize the remote folder "remoteDir" with directory "sourceDir"
      including file permissions and ownership

    rsync -ru remoteHost:remoteDir localDir
      Synchronize only updated files from remote host

    ssh, ssh-copy-id, hostname, ansible-playbook, ansible, scp

Explaining commands with redireciton

$ kmdr explain
? Enter your command: ls -alh > contents.txt

    ls -alh > contents.txt

      List directory contents
    -a, --all
      Do not ignore entries starting with .
      Use a long listing format
    -h, --human-readable
      With -l and/or -s, print human readable sizes (e.g., 1K 234M 2G)
    > contents.txt
      Redirect stdout to contents.txt.

    ls -a
      List all files, including hidden files

    ls -lh
      Long format list with size displayed using human readable
      units (KB, MB, GB)

    ls -lS
      Long format list sorted by size (descending)

    dir, sort, pwd, tree, find, mkdir

Explaining list of commands

$ kmdr explain
? Enter your command: dmesg | grep 'usb' > output.log 2>error.log

    dmesg | grep 'usb' > output.log 2> error.log

      Print or control the kernel ring buffer
      A pipe serves the sdout of the previous command as input (stdin) to the next one
      Print lines matching a pattern
      An operand
    > output.log
      Redirect stdout to output.log.
    2> error.log
      Redirect stderr to error.log.

    Could not find any example

    ifconfig, systemctl, iptables, ssh, nl, uniq, paste, sort,

Sending feedback

$ kmdr feedback                                                                                                                                                   README*
? How can we help? Support for printing explanantions with different colors :)
? Email address:
✔ Your feedback was saved. Thank you!

Checking for updates

$ kmdr upgrade                                                                                                                                                    README*
  You have the latest version of kmdr-cli

Supported programs

We add new programs every day!

Bash/Bourne Shell Builtins

  • bg
  • cd
  • clear
  • command
  • disown
  • echo
  • eval
  • export
  • false
  • fg
  • history
  • jobs
  • kill
  • logout
  • printf
  • pwd
  • read
  • readonly
  • sleep
  • true
  • umask


  • docker
  • docker-compose
  • dmesg
  • kubectl
  • singularity

Database server and clients

  • mongod
  • mongodump
  • mysql
  • mysqldump
  • pg_ctl
  • pg_dump
  • pg_restore
  • sqlite3

Deployment / Cloud

  • now
  • ansible
  • ansible-playbook

File and Archiving

  • basename
  • chgrp
  • chown
  • chmod
  • cmp
  • cp
  • dd
  • df
  • du
  • file
  • find
  • gunzip
  • gzip
  • ln
  • ls
  • mkdir
  • mktemp
  • more
  • mv
  • openssl
  • realpath
  • rm
  • rmdir
  • rsync
  • scp
  • split
  • stat
  • tar
  • touch
  • tree
  • unmask
  • watch

Media (audio/video)

  • ffmpeg
  • youtube-dl


  • curl
  • dig
  • host
  • iptables
  • ifconfig
  • hostname
  • nc
  • ncat
  • netstat
  • nmcli
  • nmap
  • nslookup
  • ping
  • ssh
  • ssh-add
  • ssh-copy-id
  • ssh-keygen
  • tcpdump
  • telnet
  • traceroute
  • wget

Package managers

  • apt
  • apt-key
  • apt-get
  • cargo
  • dpkg
  • dpkg-query
  • gem
  • npm
  • pip
  • yarn

Programming Languages / Run time environments / Compilers

  • gcc
  • go
  • node
  • perl
  • python
  • ruby
  • virtualenv

Sysadmin / Monitoring

  • adduser
  • chroot
  • chsh
  • crontab
  • df
  • free
  • fusermount
  • groupadd
  • halt
  • htop
  • install
  • iperf
  • iperf3
  • journalctl
  • killall
  • lsof
  • lsb_release
  • lsmod
  • mount
  • nice
  • nohup
  • nproc
  • ps
  • parted
  • shutdown
  • sudo
  • systemctl
  • top
  • uname
  • useradd
  • visudo
  • which
  • who
  • whois
  • whoami


  • cal
  • date
  • time

Text Processing

  • awk
  • cat
  • column
  • cut
  • diff
  • egrep
  • grep
  • head
  • less
  • nl
  • od
  • sed
  • sort
  • tail
  • tr
  • uniq
  • wc

Text editors

  • code
  • nano
  • vi
  • vim

Task Runner

  • gulp


  • autossh
  • base64
  • env
  • gofmt
  • id
  • jq
  • kmdr
  • md5sum
  • openssl
  • pandoc
  • screen
  • seq
  • sha1sum
  • sha256sum
  • strings
  • timeout
  • uptime
  • whereis


  • vagrant

Version Control

  • git
  • hg


  • bash
  • bash/sh
  • conda
  • dh
  • gpart
  • gpg
  • header
  • lsblk
  • tty

Stay tuned for more updates


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free