Skip to main content

🐠 Asciiquarium - Python Edition


🌐 Website • 📦 PyPI • 🚀 Quick Start • 💬 Support



An aquarium/sea animation in ASCII art for your terminal! This is a Python reimplementation of the classic Perl asciiquarium, designed to work cross-platform on Windows, Linux, and macOS.

Asciiquarium

✨ Features

  • 🐟 Multiple fish species with different sizes and colors
  • 🦈 Sharks that hunt small fish
  • 🐋 Whales with animated water spouts
  • 🚢 Ships sailing on the surface
  • 🐙 Sea monsters lurking in the depths
  • 🌊 Animated blue water lines and seaweed
  • 🏰 Castle decoration
  • 💙 Blue bubbles rising from fish
  • 🍤 Feed the fish with F and watch them chase the flakes down
  • 🎨 Full color support
  • ⌨️ Interactive controls
  • 🌍 Cross-platform (Windows, Linux, macOS)

🚀 Installation

Using pip (Standard)

pip install asciiquarium

Using pipx (Isolated)

pipx installs the package in an isolated environment:

pipx install asciiquarium

🎯 Usage

After installation, simply run:

asciiquarium

That's it! Enjoy your ASCII aquarium! 🐠

🎮 Controls

  • Q or q - Quit the aquarium
  • P or p - Pause/unpause the animation
  • R or r - Redraw and respawn all entities
  • F or f - Drop a flake of food (up to 10 at a time)
  • I or i - Show/hide info overlay

📋 Requirements

  • Python 3.8+ - Works with Python 3.8 through 3.14+
  • Terminal - Any terminal with color support (minimum 40x15, recommended 80x24)
  • Dependencies - Automatically handled:
    • windows-curses - Auto-installed on Windows (Python < 3.13)
    • curses - Built-in on Linux/macOS

Python 3.13+ Support

For Python 3.13+ on Windows, you may need to install windows-curses manually:

pip install windows-curses

If you encounter issues, consider using Python 3.12 or earlier for the most stable experience.

🌍 Platform Support

Platform Status Notes
🪟 Windows ✅ Fully Supported Auto-installs windows-curses
🐧 Linux ✅ Fully Supported Uses built-in curses
🍎 macOS ✅ Fully Supported Uses built-in curses

📦 What Gets Installed

The package includes:

  • Main application and animation engine
  • All entity types (fish, sharks, whales, ships, etc.)
  • ASCII art designs and color schemes
  • Cross-platform terminal handling

Size: ~50KB (minimal footprint!)

🛠️ Development Installation

If you want to contribute or modify the code:

# Clone the repository
git clone https://github.com/MKAbuMattar/asciiquarium-python.git
cd asciiquarium-python

# Install in editable mode with development dependencies
uv pip install -e ".[dev]"

# Run from source
python -m asciiquarium.main

Development Requirements

Before submitting any changes, run the same three commands CI does. All three are clean on main, so anything they report came from your change:

uvx ruff check asciiquarium tests
uvx mypy --ignore-missing-imports asciiquarium
uvx pytest -q

The tests need no terminal — they cover the geometry, the art invariants and the version arithmetic. They cannot tell you whether the aquarium looks right: for that, run it at 80×24 and at the 40×15 minimum, with and without --classic, and press r. See .github/CONTRIBUTING.md.

🌟 Features Details

Cross-Platform Support

This implementation uses Python's curses library and automatically installs windows-curses on Windows systems, making it truly cross-platform.

Entity Types

  • Fish: 12 designs with unique ASCII art and swimming patterns (8 ported from the Perl original, 4 new — --classic shows only the original 8)
  • Sharks: Predators that hunt and eat smaller fish with collision detection
  • Whales: Large creatures with animated water spout effects
  • Ships: Sail across the surface of the water
  • Sea Monsters: Mysterious creatures lurking in the depths
  • Big Fish: Large colorful fish with randomized color schemes
  • Environment: Seaweed, castle decorations, and blue water lines
  • Bubbles: Rise from fish in blue color

Animation Features

  • Animation: roughly 10 frames per second, paced by the 100 ms input timeout
  • Z-depth Layering: Proper entity overlapping
  • Color Masking: Detailed multi-color ASCII art
  • Frame Animation: Multi-frame animations for complex entities
  • Collision Detection: Sharks interact with small fish
  • Auto Cleanup: Off-screen entities are automatically removed

📁 Project Structure

asciiquarium-python/
├── asciiquarium/
│   ├── __init__.py
│   ├── __version__.py       # Single source of truth for the version
│   ├── main.py              # CLI entry point, argparse, --info
│   ├── entity.py            # Base entity class
│   ├── animation.py         # Animation engine, depth map, draw loop
│   ├── version_checker.py   # PyPI update poll
│   └── entities/
│       ├── __init__.py
│       ├── fish.py          # Fish designs, bubbles, feeding behaviour
│       ├── food.py          # Food flakes
│       ├── environment.py   # Waterlines, castle, seaweed
│       └── special.py       # Sharks, whales, ships, monsters, ducks, ...
├── tests/                   # No terminal required
├── scripts/release_version.py
├── .github/workflows/       # validate.yml, release.yml
├── AGENTS.md                # How to work in this repo
├── ROADMAP.md               # What is queued next
├── CHANGELOG.md
├── pyproject.toml
├── uv.lock
└── README.md

🎨 Customization

You can easily add new entities by creating them in the appropriate module:

from asciiquarium.entity import Entity

def add_my_entity(old_ent, anim):
    anim.new_entity(
        entity_type='my_type',
        shape=my_ascii_art,
        color=my_color_mask,
        position=[x, y, z],
        callback_args=[dx, dy, dz, frame_speed],
        die_offscreen=True,
        death_cb=add_my_entity,
    )

🐛 Troubleshooting

Command Not Found

If asciiquarium command is not found after installation:

On Windows:

# Add Python Scripts to PATH
python -m asciiquarium.main

On Linux/macOS:

# Make sure ~/.local/bin is in PATH
export PATH="$HOME/.local/bin:$PATH"
asciiquarium

Windows Issues

The windows-curses package is automatically installed on Windows. If you encounter issues:

pip install --upgrade windows-curses

Terminal Size

Minimum terminal size: 80 columns × 24 rows

Check your terminal size and resize if needed.

Color Support

Most modern terminals support colors. If colors don't appear:

  • Ensure your terminal emulator supports ANSI colors
  • Try a different terminal (Windows Terminal, iTerm2, GNOME Terminal, etc.)

Python Version

Make sure you're using Python 3.8 or higher:

python --version

💡 Tips

  • Full Screen: Press F11 in most terminals for fullscreen mode
  • Better Experience: Use a larger terminal window for more entities
  • Dark Theme: Works best with dark terminal backgrounds
  • Font: Use a monospace font for best ASCII art rendering

📜 License

GPL-3.0-or-later

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

🙏 Credits

Original Asciiquarium

Python Port

All ASCII art designs and animation concepts are credited to the original author, Kirk Baucom. This Python port maintains the spirit and fun of the original while providing modern cross-platform compatibility.

🔗 Links

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Made with ❤️ by Mohammad Abu Mattar
Based on the original Perl ASCIIQuarium by Kirk Baucom

Release files for asciiquarium 2.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asciiquarium 2.4.1
File Size Uploaded
asciiquarium-2.4.1.tar.gz 38.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asciiquarium 2.4.1
File Interpreter ABI Platform
asciiquarium-2.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 80.9 kB

Release files / asciiquarium-2.4.1.tar.gz

Download URL asciiquarium-2.4.1.tar.gz
Size 38.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6489da1bb94211233d93b450724c50a43ac7ec7027adb1ed86bdc7402f50f6a0
BLAKE2b-256 checksum
How to use checksums
c570ff426b19f7efa9571b1f3b94ee19f5f6f9d00bf6e921c260e15ceba0d462
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / asciiquarium-2.4.1-py3-none-any.whl

Download URL asciiquarium-2.4.1-py3-none-any.whl
Size 42.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
febc4ffa51e3f5cf2a56ae37b58f2285dce3aff8f982c7e19442d0ebeab0ba9b
BLAKE2b-256 checksum
How to use checksums
312efbbd85c169092835c9f09769de70b791c604d5533a1244fc922a8351ec5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

2.4.2

2 release files

This release

2.4.1 This release

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page