It’s Easter, so here’s a tour of the easter eggs hiding inside package managers.
The very first known easter egg in software dates back to 1967-68 on the PDP-6/PDP-10, where typing make love at the TOPS-10 operating system’s COMPIL program would pause and respond “not war?” before creating the file.
apt and friends
A cow-shaped thread runs through the history of system package managers, starting with apt-get moo:
$ apt-get moo
(__)
(oo)
/------\/
/ | ||
* /\---/\
~~ ~~
..."Have you mooed today?"...
Running apt-get help reveals the line “This APT has Super Cow Powers.” The moo subcommand has been there for decades and doesn’t need root.
Aptitude’s response is more elaborate. It lies to you, then gradually caves under pressure:
$ aptitude moo
There are no Easter Eggs in this program.
$ aptitude -v moo
There really are no Easter Eggs in this program.
$ aptitude -vv moo
Didn't I already tell you that there are no Easter Eggs in this program?
$ aptitude -vvv moo
Stop it!
$ aptitude -vvvv moo
Okay, okay, if I give you an Easter Egg, will you go away?
$ aptitude -vvvvv moo
All right, you win.
/----\
-------/ \
/ \
/ |
-----------------/ --------\
----------------------------------------------
Adding one more -v reveals the explanation: “What is it? It’s an elephant being eaten by a snake, of course.” A reference to The Little Prince by Antoine de Saint-Exupéry. And aptitude --help declares “This aptitude does not have Super Cow Powers,” which is a dirty, filthy lie.
The tradition spread to openSUSE’s package manager too. zypper moo draws an ASCII hedgehog by default, and the source code invites translators to draw a different animal for their locale. Gentoo got in on it as well: emerge --moo displays ASCII art of Larry the Cow with “Have you mooed today?”
pacman and Portage
Adding ILoveCandy to the [options] section of Arch Linux’s /etc/pacman.conf turns the progress bar into a Pac-Man character eating pellets as it installs packages, because Pac-Man loves candy. Completely independently, Gentoo landed on the same word: adding candy to FEATURES in /etc/make.conf replaces the default emerge spinner with a livelier animation.
npm
npm xmas showed a Christmas-themed display. npm visnup displayed terminal art of npm contributor Visnu Pitiyanuvath, and npm substack honoured the prolific module author James Halliday. There was also a ham-it-up config option that printed “I Have the Honour to Be Your Obedient Servant” after successful commands, in a PR titled “Talk less, complete more,” both Hamilton references. All gone as of npm v9.
And npm rum dev works identically to npm run dev. Turns out rum and urn are documented aliases for run-script, so it’s less of an easter egg and more of a happy accident that npm rum sounds like a pirate order.
Someone going through npm’s codebase found an undocumented birthday command backed by completely obfuscated JavaScript that executed code from a separate npm package. Running it returned “Please try again in 26632152294ms,” a countdown to npm’s birthday.
The community was alarmed. Obfuscated, undocumented code in a tool installed on every CI server on earth was indistinguishable from a supply chain attack. The package was eventually rewritten to be human-readable “to make our users more comfortable,” then the command was removed entirely in npm 9.
Pipenv
Pipenv swaps its install label to a pumpkin on Halloween and Santa on Christmas. When the community asked to remove them, Kenneth Reitz said “The easter eggs stay” and closed the issue.
Python
import this prints The Zen of Python by Tim Peters, 19 guiding principles for Python’s design, and the source code of the this module uses ROT13 encoding so that the code printing Python’s design philosophy deliberately violates those same principles by being ugly and obfuscated.
import antigravity opens your browser to xkcd comic #353 and has been in the standard library since Python 2.6. A second egg is nested inside: the module also contains a geohash function implementing xkcd’s geohashing algorithm.
The __future__ module has two. from __future__ import braces raises SyntaxError: not a chance. from __future__ import barry_as_FLUFL is an April Fools’ joke (PEP 401) honouring Barry Warsaw as the “Friendly Language Uncle For Life” that makes != a syntax error and forces you to use <> instead.
hash(float('inf')) returns 314159, the first digits of pi hiding in the numeric internals.
Leiningen
In the early Clojure ecosystem, there was a plague of projects with names ending in “jure.” The maintainer of Leiningen had enough:
Sorry, names such as clojure or *jure are not allowed.
If you intend to use this name ironically, please set the
LEIN_IRONIC_JURE environment variable and try again.
As one commenter quipped: “I’d say I’ve never seen this error message, but I don’t want to perjure myself.”
Ruby
rvm seppuku was an alias for rvm implode, which removes the entire Ruby Version Manager installation. The commit message read: “Added ‘rvm seppuku’ in honor of tsykoduk who can’t spell so it saved his life.” The uninstall log message was "Hai! Removing $rvm_path". RVM also had rvm answer, with a notable bugfix in its changelog: “rvm answer now uses perl, since the universe is written in Perl.”
The Pry debugger gem shipped a dedicated easter eggs file with a nyan cat command, and text snippets from Jermaine Stewart, T.S. Eliot, Leonard Cohen, and Fernando Pessoa (some of which remain in current versions). Installing the HTTParty gem greets you with “When you HTTParty, you must party hard!” which annoyed enough people that Tim Pope published a gem called gem-shut-the-fuck-up to suppress all post-install messages.
Go
In Go’s net package, a variable called aLongTimeAgo was originally set to time.Unix(233431200, 0), which converts to May 25, 1977, the day Star Wars: Episode IV opened in theatres. It’s used to force-cancel connections by setting a deadline far in the past. The value was later changed to time.Unix(1, 0) back in 2017 because Raspberry Pi boards sometimes boot with their clock reset to 1970, making 1977 no longer safely “in the past.”
Homebrew
Homebrew once had a brew beer command, removed from the main codebase but preserved in homebrew-vintage, a dedicated tap for anyone who misses it. The entire tool is already an easter egg of sorts, with its formulae, taps, casks, kegs, bottles, cellars, and pouring.
Know of more package manager easter eggs I’ve missed? Let me know.