@adrianlynch/clingon
v0.1.9
Published
Generate tiny deterministic terminal characters.
Readme
@adrianlynch/clingon
Generate tiny deterministic terminal characters.
100% created by AI. Use at your own risk. Obviously.
Each clingon is created from a readable name. Save the name and you can render the same character again later, or keep the same shape and generate a new set of colors.
##
[][][]
[][]. []. [][]
[][][][][][][]
[]# [] #[]
. . . . Screenshots
Sizes
Terminal dimensions are large 22x8, normal 14x6, small 10x5, and tiny 8x4.
Option Examples
Install
npm install @adrianlynch/clingonRun it without installing:
npx @adrianlynch/clingon --smallUse In zsh
Install it globally so shell startup does not need to run npx:
npm install -g @adrianlynch/clingonAdd this to ~/.zshrc to show a random tiny clingon in each terminal:
clingon --tiny --pad=1Use a saved name for the same startup clingon every time:
clingon --with-name orlando-reginald-morris-junior --tiny --pad=1Show welcome text and local context beside it:
clingon --with-name orlando-reginald-morris-junior --tiny --welcome --date --cwd --git --pad=1--welcome picks a time-aware greeting from English, Spanish, or romanized Japanese.
Clingon names are hidden by default. Add --name where you want the name to appear beside it.
--pad=1 adds a blank line above and below the character plus one space of left padding.
CLI
Generate a random clingon:
clingonGenerate a compact clingon:
clingon --smallGenerate a tiny four-line clingon:
clingon --tinyRegenerate a specific clingon:
clingon --with-name orlando-reginald-morris-juniorShow the clingon name beside the art:
clingon --name
clingon --with-name orlando-reginald-morris-junior --nameKeep the same shape, but choose a new random palette:
clingon --with-name orlando-reginald-morris-junior --recolorPrint the JavaScript needed to recreate the same clingon:
clingon --with-name orlando-reginald-morris-junior --small --scriptPrint structured output:
clingon --small --jsonPrint only the character art, useful in shell startup files:
clingon --tinyShow up to five lines of text beside the clingon:
clingon --tiny --name
clingon --tiny --welcome
clingon --tiny --message "Ready"
clingon --tiny --date --cwd --git
clingon --tiny --git --message "Ready" --name--cwd is shown as ~ directory-name, and --git is shown as * branch-name.
Label flags are shown in the order you pass them.
Add space around terminal output:
clingon --tiny --pad=1
clingon --tiny --pad-h=2 --pad-v=1Options
clingon [options]
Options:
--with-name <name>
Regenerate a specific clingon name
-n, --name Show the clingon name beside the art
-r, --recolor Keep the shape from --with-name but choose new colors
--large Render the largest clingon
--small Render a smaller clingon
--tiny Render the tiniest clingon
--size <size> Render size: tiny, small, normal, or large
-s, --script Print the JavaScript needed to recreate the clingon
-j, --json Print JSON data instead of terminal art
--welcome Show a time-aware greeting beside the clingon
--message <msg> Show a custom message beside the clingon
--date Show today's date beside the clingon
--cwd Show the current directory beside the clingon
--git Show the current git branch beside the clingon
--pad <n> Add padding around terminal output
--pad-h <n> Add spaces before each terminal output line
--pad-v <n> Add blank lines before and after terminal output
--no-color Render without ANSI color
-h, --help Show help
-v, --version Show versionJavaScript API
import { generateClingon } from '@adrianlynch/clingon';
const clingon = generateClingon({
name: 'orlando-reginald-morris-junior',
size: 'tiny'
});
console.log(clingon.ansi);
console.log(clingon.name);Random clingon:
import { generateClingon } from '@adrianlynch/clingon';
const clingon = generateClingon();
console.log(clingon.ansi);Render-only helper:
import { renderClingon } from '@adrianlynch/clingon';
console.log(renderClingon({
name: 'orlando-reginald-morris-junior',
size: 'tiny'
}));Returned Data
generateClingon() returns:
{
name: 'orlando-reginald-morris-junior',
code: 'orlando-reginald-morris-junior',
size: 'tiny',
shapeSeed: 0,
paletteSeed: 0,
palette: {
body: '#f06a0d',
accent: '#2bce67',
dark: '#7c2d12'
},
pixels: [[0, 0, 0]],
ansi: '...',
text: '...'
}The first and third words control the shape. The second and fourth words control the palette.
Older clg-... seed codes are still accepted through --with-name:
clingon --with-name clg-00000rs-00000rtDevelopment
npm test
npm start -- --small
npm run docs:assets
npm pack --dry-run