1vcian
v4.1.1
Published
Lucian Medrihan's business card for the terminal: npx 1vcian. No dependencies, a menu, a game.
Maintainers
Readme
1vcian
My business card. It lives in your terminal:
npx 1vcianNothing to install, and nothing to download but the card itself: it has zero dependencies. It makes no network requests either. A link opens only when you pick it.
What's in it
- The card. Who I am and where to find me. It wipes in, a comet keeps running around its frame and the logo catches the light now and then.
- A menu. Website, projects, résumé, GitHub, LinkedIn, and an email entry that also copies the address. Move with the arrows, choose with enter.
- A game. ORBIT RUN, right there in the menu.
- Good manners. Colours adapt to the terminal (true colour, 256, 16, or none),
NO_COLORis respected, piped output is plain text, narrow windows get a compact layout, and--stillturns the animations off.
The game
ORBIT RUN. You fly a satellite along seven orbit lanes. Debris comes in waves, every packet + you catch is worth 25 km, and the whole thing speeds up as you go. Pick it from the menu, or go straight in with npx 1vcian --play.
It is fair: every wave leaves at least two lanes open, and one of them is never more than one step away from a lane the previous wave left open. There is a test for that, and an autopilot that flies 5,000 ticks at full speed without a scratch.
--seed 42 gives you the same debris field every time, if you want to race a friend. And if you know the Konami code, the menu knows it too.
Options
| command | what you get |
| --- | --- |
| npx 1vcian | the card, with the menu |
| npx 1vcian --play | straight to the game |
| npx 1vcian --static | the card and nothing else |
| npx 1vcian --still | the menu, without the animations |
| npx 1vcian --json | the same facts, for scripts |
| npx 1vcian --plain | no colours |
| npx 1vcian --ascii | no box-drawing or block characters |
| npx 1vcian --help | all of the above |
Needs Node.js 18 or newer.
Make it yours
It is MIT licensed and everything personal sits in one file, so take it.
- Fork or clone this repo.
- Edit
lib/profile.js: name, links, menu, even the logo. - In
package.json, changename(it is what people will type afternpx),bin,authorand the URLs, and resetversion. - Try it with
node card.js, check it withnpm test. - Redraw the pictures in this README with
npm run preview. npm login, thennpm publish.
How it is made
| file | what it does |
| --- | --- |
| card.js | the command: options, the menu, the way into the game |
| lib/profile.js | the content |
| lib/render.js | lays out the card and the menu, and animates them |
| lib/term.js | what the terminal can do: colour depth, the box, keys, links, the clipboard |
| lib/game.js | the game: the rules as plain functions, then the part that draws them |
| scripts/preview.mjs | turns the real output into the SVG pictures above |
| test/ | node --test, no test framework either |
