ts-animal is a sophisticated Command Line Interface (CLI) package designed to showcase captivating ASCII animation art within the animal category. We invite you to immerse yourself in our TypeScript-powered animal world, where creativity meets technology.
!GitHub 


ts-animal is a sophisticated Command Line Interface (CLI) package designed to showcase captivating ASCII animation art within the animal category. We invite you to immerse yourself in our TypeScript-powered animal world, where creativity meets technology. Welcome to a realm where animated artistry comes to life in the command line environment. ๐๐ฆ
- โญ๏ธ ASCII Animal
- โญ๏ธ Progress Bar
> If you want to try it out before installing globally, you can (1) start with npx (2) or check out codesandbox
``shell
$ npm i -g ts-animal
โญ๏ธ Getting started: ASCII Animal
`shell
$ ts-animal dance tiger
`๐ Options: ASCII Animal
`shell
$ ts-animal dance tiger --repeat=3 --speed=1800 --color=red
`
Option
Description
Default
--speed
Set the speed of frame of your animation.
1800
--repeat
Set how long to repeat the animation.
Infinity
--color
Set the color of the animation.
white
โญ๏ธ Getting started: Progress Bar
Below example is showing how to add progress feature with your cli.
`ts
const { makeProgress } = require("ts-animal/progress");const { update, done, show } = makeProgress({ animal: 'tiger', start: 30, displayBar: true });
show();
const something = () =>
new Promise((resolve) => {
setTimeout(() => {
resolve(Math.round(Math.random()));
}, 1000);
});
(async () => {
const items = Array.from({ length: 50 });
for (const _ of items) {
const res = await something();
update();
if (res) {
done();
return;
}
}
})();
`๐ Options: Progress
`javascript
const { makeProgress } = require("ts-animal/progress");const { update, done, show } = makeProgress({
animal: 'tiger',
start: 0,
end: 100,
displayBar: true
});
`
Option
Description
Default
animal
Set animal to be displayed among our zoo.
'tiger'
start
Set start point of progress bar.
0
end
Set end point of progress bar.
100
displayBar
Set whether progress bar will be displayed or not.
true
displayAnimal
Set whether animal animation will be displayed or not.
true
๐ฐ Run locally with repository
`shell
$ pnpm i
$ pnpm dance {animal}ex
$ pnpm dance tiger
$ pnpm dance rabbit
``- make animal named folder in src/zoo.
- make frames as text files in zoo folder. No matter txt files name, but make sure files name and frames are sorted.
- please check first npx run list, to prevent duplicated name.
- ๐ฏ tiger: https://asciiart.cc/view/12694
- ๐ฐ rabbit: https://bento.me/tolluset
- ๐ฑ cat
- ๐พ bear-sleeping, bunny-angry, cat-coffee, rabbit-blink, sheep-fire : ascii-animal-generator GPTs
E-mail - team.ts.animal@gmail.com
ts-animal with MIT licensed.