The "shell" in your sense, I think, is considered the interface by which you interact with your machine, whether it be a terminal, a graphical interface, or some direct brain-to-machine link. More accurately, one could say that the "shell" is the program (sh
, bash
, X11, Gnome, KDE, BrainLink 3.2, whatever) that interfaces with the hardware in order to allow you to interact with your machine.
Meanwhile, the CLI (or the Command Line Interface) is a type of shell that allows you to access the system's command line (hence the word interface).
As you've discovered, not all shells are built the same. Some offer graphics (like X11/Unity), while some are only terminal access, like your average TTY. Even within this, these shells can differ because of the program running them. For example, the /bin/sh
shell is relatively simple and offers a basic CLI, while /bin/bash
offers far more capability. Both are still technically shells, as is some very simple program that just calls exec()
on whatever you pass it.
Even without a CLI, your system can still be 100% useful. Take Windows or macOS for example. Neither of these really demand a CLI (and I'm sure they would remove it completely if they could), but the system is still very much usable.
Keeping this in mind, though, every system has a command line available, but not every system has a command line interface open for you to use. On the flip side, a shell (graphical or console) is necessary for you to be able to interface with your machine in order to run arbitrary programs. For example, your Linux-based smart TV is technically a "shell" as it can launch arbitrary apps, but your parking meter also running embedded Linux has no such need for a publicly-facing (or even private-facing) shell.