A terminal welcome screen with animated ASCII art

Show an animated ASCII piece every time you open a terminal, or set a still one as your server's message of the day. Works with zsh, bash and fish.

Loading the builder…

/WHY

A terminal welcome is the first thing you see in every new tab, and a server message of the day is the first thing anyone sees after SSH. Both are plain text, which makes them a natural home for ASCII art.

The builder writes the exact lines for zsh, bash, fish or PowerShell. It can play a piece for a few seconds once a day, then greet you by name, and it makes a static message of the day for servers with nothing extra to install.

/EXAMPLES

Ready-made examples to copy

Each one is complete. Copy it as it is, or change the piece name to any piece in the library.

zsh: play for three seconds, once a day

Goes at the end of ~/.zshrc. Only runs in an interactive terminal, so scripts and scp are untouched.

if [ -t 1 ] && command -v npx >/dev/null; then
  if [ "$(cat ~/.cache/ascii-welcome 2>/dev/null)" != "$(date +%F)" ]; then
    mkdir -p ~/.cache && date +%F > ~/.cache/ascii-welcome
    npx --yes https://www.ascii-magic.com/ascii/cli.tgz spinning-torus --seconds=3 2>/dev/null
    echo "Welcome back, $USER"
  fi
fi

bash: a still frame every time, instantly

Printing one frame is instant, so it is fine on every new tab.

# ~/.bashrc
if [[ $- == *i* ]]; then
  npx --yes https://www.ascii-magic.com/ascii/cli.tgz starry-ridge --frame 2>/dev/null
fi

Fast start: cache the frame in a file

Save one frame once, then print the file with cat. No Node on every start, zero delay.

# run once
npx --yes https://www.ascii-magic.com/ascii/cli.tgz moonlit-sea --frame > ~/.welcome.txt

# in ~/.zshrc or ~/.bashrc
[ -t 1 ] && cat ~/.welcome.txt

fish

Goes in ~/.config/fish/config.fish.

if status is-interactive; and type -q npx
  npx --yes https://www.ascii-magic.com/ascii/cli.tgz matrix-rain --seconds=2 2>/dev/null
  echo "Welcome back, $USER"
end

PowerShell and Windows Terminal

Open your profile with notepad $PROFILE and paste this at the end.

if (Get-Command npx -ErrorAction SilentlyContinue) {
  npx --yes https://www.ascii-magic.com/ascii/cli.tgz rotating-cube --seconds=3 2>$null
  Write-Host "Welcome back, $env:USERNAME"
}

Ubuntu server MOTD

Save as /etc/update-motd.d/99-ascii and run chmod +x on it. Shows on every SSH login, with the hostname and uptime.

#!/bin/sh
cat <<'ART'
   ____
  / __ \
 / /_/ /
 \____/
ART
echo
echo "Welcome to $(hostname). $(uptime -p)"

A different piece every day

Rotates through a list by day of the year.

pieces=(moonlit-sea spinning-torus starry-ridge matrix-rain plasma tesseract)
today=$(( $(date +%j) % ${#pieces[@]} ))
[ -t 1 ] && npx --yes https://www.ascii-magic.com/ascii/cli.tgz "${pieces[$today]}" --seconds=3 2>/dev/null

How to do it

  1. Try a piece first: run the command below and press any key to stop.
  2. To run it on every new shell, add the line to your ~/.zshrc or ~/.bashrc. Wrap it in timeout so it stops on its own.
  3. For a server MOTD, copy a single frame as text from the piece page and paste it into /etc/motd.

/GUIDE

Keep your shell fast

Starting Node takes a moment. Playing an animation on every single tab adds that moment every time, which gets old quickly. The "Once a day" option plays it for the first tab of the day only; the cached frame example prints instantly with cat and never starts Node at all.

The guard [ -t 1 ] means the welcome only runs when the output is a real terminal. Scripts, scp, rsync and editors that start a shell in the background are unaffected.

Colours in the terminal

Pieces print in full 24-bit colour. That works in iTerm2, the macOS Terminal on recent versions, Windows Terminal, Alacritty, Kitty, WezTerm, GNOME Terminal and VS Code. Set NO_COLOR=1, or pipe the output to a file, to get plain characters.

Photo pieces made of dots use half blocks in the terminal, two pixels per character, so they stay in proportion.

Server message of the day

On a server you usually do not want Node at all. Copy a still frame as text from the builder and save it as /etc/motd, or use the Ubuntu script tab, which keeps the art in the script and adds the hostname and uptime.

Keep a MOTD under 80 columns wide so it does not wrap on small SSH windows. Pick a narrow piece or one of the Type pieces.

Turning it off

Delete the block from your shell's startup file, or comment it out with # at the start of each line. For the daily version you can also delete ~/.cache/ascii-welcome to see it again today.

Pieces that work well for this

Open any of them to copy the code or export.

/FAQS

A terminal welcome screen with animated ASCII art: frequently asked questions

Q. What is a MOTD and how do I add ASCII art to it?
A MOTD, or message of the day, is text a Unix server prints after every SSH login. To add ASCII art, copy a still frame from the builder's Server MOTD (static) tab and save it as /etc/motd with sudo. It is plain text, so the server needs no Node and nothing extra installed.
Q. How do I make a custom MOTD on an Ubuntu server?
Use the builder's Ubuntu script tab: save it as /etc/update-motd.d/99-ascii and run chmod +x on it. Ubuntu builds the MOTD from the scripts in that folder, so your ASCII art shows on every SSH login, followed by the hostname and uptime. The art lives inside the script, so nothing is downloaded.
Q. How do I set a terminal welcome message with ASCII art?
Add the builder's block to the end of your shell startup file: ~/.zshrc for zsh, ~/.bashrc for bash, config.fish for fish, or your PowerShell profile. It plays a piece for a few seconds, then prints your greeting with $USER replaced by your name, plus the date and time if you like. The One command install tab adds it for you.
Q. Which shells does the terminal welcome work with?
It works with zsh, bash, fish and PowerShell, and the builder writes the right syntax for each. You can play it on every new tab, once a day, or only in login shells. Every version uses npx from Node.js to play the piece, including the PowerShell one for Windows Terminal.
Q. How do I show the ASCII welcome only once a day?
Choose Once a day in the builder. The block writes today's date to ~/.cacheASCII library-welcome after it plays and skips the animation until the date changes. Delete that file if you want to see the welcome again today. Every tab after the first one opens instantly.
Q. How long does the welcome animation play, and can I stop it?
It plays for the number of seconds you choose, from 1 to 10, with 3 as the default, and any key stops it early. For a server or a script, the --frame flag prints a single still frame and exits straight away, so nothing animates at all.
Q. Why does my terminal say npx: command not found?
The animated welcome uses npx, which comes with Node.js, so install Node to use it. The block checks for npx first and stays silent if it is missing. If you do not want Node at all, save one frame to a text file once and print it with cat in your startup file instead.
Q. Will an ASCII welcome screen slow down opening a terminal?
Only while the animation plays, because starting Node takes a moment. Choose Once a day so only the first tab waits, or print a cached text frame with cat, which adds no noticeable delay. A static MOTD on a server is plain text and costs nothing.
Q. Will a terminal welcome break scp, rsync or git over SSH?
No. The block checks that it is running in an interactive terminal before printing anything, using the [ -t 1 ] test in zsh and bash and status is-interactive in fish. Scripts, scp, rsync, git and editors that start a shell in the background see no output.
Q. How wide should ASCII art be for a MOTD?
Keep it under 80 columns so it does not wrap in small SSH windows. Narrow pieces such as Spinning Torus, Rotating Cube and Tesseract fit well, as do many lettering pieces. Check the builder's preview, which shows an 80 by 24 terminal, before you copy the frame.
Q. Why do the colors look wrong or the art look squashed in my terminal?
Use a terminal with 24-bit color and a monospace font. Pieces print in full color where the terminal supports it, and very old terminals show approximate colors. To get plain characters with no color codes, set NO_COLOR=1 or send the output to a file.
Q. How do I turn off the terminal welcome screen?
Delete the block from your shell startup file, or put a # at the start of each of its lines. For PowerShell, open your profile and remove the block the same way. A static MOTD is removed by deleting /etc/motd or the 99-ascii script in /etc/update-motd.d.

Other ways to use it

Each one has its own builder.