VHS: CLI home video recorder
Similar tool: https://asciinema.org/It does not generate a GIF file, but can be easily published on the web. The recorded terminal session is clipboard friendly: you can select and copy.