PHPackages                             gipetto/cowsay - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gipetto/cowsay

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gipetto/cowsay
==============

An extensible PHP port of the Cowsay linux utility

2.1.0(1y ago)106.6k↓66.7%2[1 issues](https://github.com/Gipetto/CowSay/issues)[1 PRs](https://github.com/Gipetto/CowSay/pulls)MITPHPPHP &gt;=8.1CI passing

Since May 14Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Gipetto/CowSay)[ Packagist](https://packagist.org/packages/gipetto/cowsay)[ Docs](http://github.com/Gipetto/CowSay)[ RSS](/packages/gipetto-cowsay/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (2)Versions (11)Used By (0)

PHP CowSay
==========

[](#php-cowsay)

[![Release Version](https://camo.githubusercontent.com/bd132bab95305502c1d3a257f352fa18a442840a69d8ebbb94882e6a7bebed90/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f4769706574746f2f436f775361792e737667)](https://github.com/Gipetto/CowSay/releases)[![Packagist Version](https://camo.githubusercontent.com/455ca40c5c3dd6b87f5fdf3f1ce853b5a500c59fd7f8722e1cb8c80f5e54e7f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4769706574746f2f436f775361792e737667)](https://packagist.org/packages/gipetto/cowsay)[![Build Status](https://github.com/Gipetto/CowSay/actions/workflows/main.yml/badge.svg)](https://github.com/Gipetto/CowSay/actions/workflows/main.yml)[![Moo, Cow](https://camo.githubusercontent.com/b99a740c77f6aaf71117e1ddb2aa00f9397ac8355d9ecfbefa9e9eb19f322c14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6f6f2d436f772d6f72616e67652e737667)](https://camo.githubusercontent.com/b99a740c77f6aaf71117e1ddb2aa00f9397ac8355d9ecfbefa9e9eb19f322c14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6f6f2d436f772d6f72616e67652e737667)

An extensible PHP port of the [Linux Cowsay](http://en.wikipedia.org/wiki/Cowsay) utility.

Requirements
------------

[](#requirements)

- Minimum: PHP 8.1+
- Recommended: PHP 8.2+

CowSay will update to stay in step with the latest, actively supported PHP version. [See the Official PHP list of supported versions](https://www.php.net/supported-versions.php)

Install
-------

[](#install)

```
$ composer require Gipetto/CowSay

```

Quickstart
----------

[](#quickstart)

```
use CowSay\Cow;

$bessie = new Cow('Hello, Farm!');

// store the output in a variable
$output = $bessie->say();
echo $output;

// or just echo the object for direct output
echo $bessie;
```

Displays:

```
  ------------
< Hello, Farm! >
  ------------
          \   ^__^
           \  (oo)\_______
              (__)\       )\/\
                  ||----w |
                  ||     ||

```

Run `php demo.php` to see all the included cows and their traits.

Traits
------

[](#traits)

Cows support a few traits. You can specify the Eyes, Tongue, Udder and, yes, you can specify Poop.

```
$bessie = new Cow('Hello, Farm!');
$bessie->setEyes('oO')
    ->setTongue('U')
    ->setPoop('@@@')
    ->setUdder('W');
echo $bessie;
```

Displays:

```
  ------------
< Hello, Farm! >
  ------------
          \   ^__^
           \  (oO)\_______
              (__)\       )\/\
               U  ||----W |
                  ||     || @@@

```

Extending CowSay
----------------

[](#extending-cowsay)

### Adding New Carcases

[](#adding-new-carcases)

CowSay is easily extended to add new carcases for your custom needs. See the [Carcasses](docs/Carcasses.md) tutorial for more information.

### Adding New Traits

[](#adding-new-traits)

It is easy to add new Traits to CowSay. See the [Custom Traits](docs/CustomTraits.md) documentation for more information.

Known Issues
------------

[](#known-issues)

- Line length calculations are not fully understood for strings with longer byte length characters. ie: Chinese.

License
-------

[](#license)

CowSay is licensed under [The MIT License (MIT)](LICENSE.txt).

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance66

Regular maintenance activity

Popularity28

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~447 days

Recently: every ~845 days

Total

9

Last Release

437d ago

Major Versions

1.2.0 → 2.0.02024-07-19

PHP version history (5 changes)1.0PHP &gt;=5.4.0

1.1.0PHP &gt;=7.2.0

1.2.0PHP &gt;=7.4.0

2.0.0PHP &gt;=8.0.2

2.1.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/25234ab7a6e12618cce1ea9aff234ea539a10d1fbd02667d65dcf327f4e01068?d=identicon)[Gipetto](/maintainers/Gipetto)

---

Top Contributors

[![Gipetto](https://avatars.githubusercontent.com/u/71515?v=4)](https://github.com/Gipetto "Gipetto (46 commits)")

---

Tags

cowsayphpcowsaycowscow

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gipetto-cowsay/health.svg)

```
[![Health](https://phpackages.com/badges/gipetto-cowsay/health.svg)](https://phpackages.com/packages/gipetto-cowsay)
```

###  Alternatives

[phing/phing

PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.

1.2k21.7M868](/packages/phing-phing)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

374468.4k48](/packages/flow-php-etl)[alrik11es/cowsayphp

Cowsay port in PHP

72516.3k1](/packages/alrik11es-cowsayphp)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
