Make your own avatar
-
Uses Adorable Avatars API
-
Call
ava
utility with parameters:-
get
to get a random avatar -
make
to get a customized one
-
-
ava
gives you an URL to a generated avatar -
Also
ava
saves pictures toface-on/
in the user home folder (seeconfig/
if you want to redefine it) -
Uses
meow
andinquirer
as CLI helpers -
Uses
terminal-image
to display an image after it was generated -
NOTE: Don't forget to create
.env
(see.env.example
)
- Install dependencies
npm i
- Run a CLI tool
# Help
ava --help
node cli.js --help
# Get a random image
ava get
node cli.js get
# Build an avatar from scratch
ava make
node cli.js make
- Make it a real CLI tool:
-
NOTE: Don't forget to add a shebang
#!/usr/bin/env node
tocli.js
and updatebin
section inpackage.js
-
Make it global
npm install -g
-
IMPORTANT: After any changes in
./cli.js
don't forget to runnpm link