Skip to main content

Interactive CLI pets with animated emoji characters for your terminal

Project description

CLI Pets

PyPI version Python 3.12+ License: MIT

Interactive CLI pets with animated emoji characters for your terminal. Watch cute pets walk, race, and greet you right in your command line!

CLI Pets Demo

Features

  • Walking Animations: Watch your favorite emoji pets walk across the terminal
  • Pet Racing: Race multiple pets against each other with live updates
  • Random Greetings: Get friendly greetings from random pets
  • Rich Terminal Output: Colorful and smooth animations using Rich library
  • Customizable: Choose your pet, adjust speed, and control animation parameters

Installation

Install from PyPI using pip:

pip install cli-pets

Or using uv:

uv pip install cli-pets

Quick Start

Walk a Pet

from cli_pets import walk

# Walk a cat across the terminal
walk(steps=30, speed=0.1)

# Walk with more steps
walk(steps=50, speed=0.05)

Race Pets

from cli_pets import race

# Race 3 random pets
race(distance=50, racers=3)

# Race with custom settings
race(distance=40, racers=2, speed=0.1)

Greet

from cli_pets import greet

# Get a friendly greeting from a random pet
greet()

Available Pets

The package includes 10 adorable animal emoji pets that are randomly selected for racing and greetings.

API Reference

walk(pet, steps, speed)

Animate a pet walking across the terminal.

Parameters:

  • pet (str): Emoji character to display (default: cat emoji)
  • steps (int): Number of steps to take (default: 30)
  • speed (float): Seconds between steps (default: 0.1)

race(distance, racers, pets, speed, show_winner)

Race multiple pets across the terminal.

Parameters:

  • distance (int): Length of the race track (default: 50)
  • racers (int): Number of racing pets (default: 3)
  • pets (list[str] | None): Specific pets to race; if None, random pets are chosen (default: None)
  • speed (float): Seconds between updates (default: 0.1)
  • show_winner (bool): Whether to announce the winner (default: True)

greet()

Print a friendly greeting with a random pet.

Returns: None (prints directly to console)

Examples

Custom Walking Animation

from cli_pets import walk

# Slow walking
walk(steps=20, speed=0.2)

# Fast walking
walk(steps=60, speed=0.03)

Epic Pet Race

from cli_pets import race

# Long distance race with 5 pets
race(distance=100, racers=5, speed=0.05)

# Quick sprint
race(distance=20, racers=2, speed=0.05)

Requirements

  • Python 3.12+
  • rich >= 14.2.0

Development

Clone the repository:

git clone https://github.com/ran-codes/cli-pets.git
cd cli-pets

Install dependencies with uv:

uv sync

Run examples:

uv run python -c "from cli_pets import walk; walk(steps=20, speed=0.05)"

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests on GitHub.

Author

Created by rl627

Changelog

v0.0.1 (2025-10-15)

Initial release of CLI Pets!

Features:

  • Walk animation for pets across the terminal
  • Racing functionality with multiple pets
  • Random pet greetings
  • Rich terminal output with smooth animations
  • Support for 10 different animal emoji pets
  • Customizable speed and distance parameters

Made with love and code

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cli_pets-0.0.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cli_pets-0.0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file cli_pets-0.0.1.tar.gz.

File metadata

  • Download URL: cli_pets-0.0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for cli_pets-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bfb2cd6e76f7cd610db98c498ea51537a809d8c0ee6c5bf987adb8d8509a54f8
MD5 ae864a177861617ca8ec499fba64b8fe
BLAKE2b-256 cbae2457da14b1724aa8a38534a5dbe72c9e609e997faf91ff000dcbd84f1265

See more details on using hashes here.

File details

Details for the file cli_pets-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: cli_pets-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for cli_pets-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1c921571614ee3b8f34be1aa320c4412b13ceb1f74573682af9a1501600a54fd
MD5 d131568b0fbb7b6bf0814fdec36e5482
BLAKE2b-256 bde2aa5e667af06f0b85fd3058159ac354f21a0d8f9a37596df201ca6ebd4747

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page