{"name":"shellfie","version":"2.4.3","keywords":["terminal","svg","screenshot","ansi","tty","cli"],"author":{"name":"tool3"},"license":"MIT","_id":"shellfie@2.4.3","maintainers":[{"name":"tool3","email":"talhayut.dev@gmail.com"}],"homepage":"https://github.com/tool3/shellfie#readme","bugs":{"url":"https://github.com/tool3/shellfie/issues"},"dist":{"shasum":"16386d6cc668a64a83a4b5148e27937895c49220","tarball":"http://registry-npm.ywwl.com/shellfie/download/shellfie-2.4.3.tgz","fileCount":351,"integrity":"sha512-uBWt60F71IvQqQ7BI7pXGnvq+MIGrdupyZalnotk0YVoYmLvRPsltC8upzzL5v2+umMkOSeHFmRROCksJDJeng==","signatures":[{"sig":"MEUCIQDD1lDrXNiUn7XZfQtkvljHcMLEsb8o5l6zKOaL+LrLxwIgQjBQZdW0cXEZkxZCHBGZBtjnA5IlXWa/nmguOGPyDAA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/shellfie@2.4.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":584042,"size":117732,"noattachment":false,"key":"/shellfie/-/shellfie-2.4.3.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","module":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"288d5234960167701dff88e2a5b44690808983f8","scripts":{"test":"vitest run","build":"tsc","example":"npx tsx example.ts","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f8c00179-2d5b-4c91-84cf-9ddc556253e4"}},"repository":{"url":"git+https://github.com/tool3/shellfie.git","type":"git"},"_npmVersion":"11.11.0","description":"Convert terminal output to crystal-clear SVG images","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^4.0.18","chartscii":"^3.2.0","typescript":"^5.3.0","@types/node":"^20.10.0","gradient-string":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/shellfie_2.4.3_1777581808641_0.5520478866948866","host":"s3://npm-registry-packages-npm-production"},"readme":"# shellfie\n\nTake a shell selfie.  \nYour terminal output deserves better than a blurry screenshot.\n\n![shellfie](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/logo-2.svg)\n\n```typescript\nimport shellfie, { themes } from \"shellfie\";\nimport { writeFileSync } from \"node:fs\";\n\nconst script = `\n#!/bin/bash\n\necho \"Hello World!\"\n`;\n\nconst svg = shellfie(script, {\n  template: \"macos\",\n  theme: themes.draculaPro,\n  title: \"Syntax highlighting\",\n  watermark: \"\\x1b[38;5;242mGenerated by shellfie\\x1b[0m\",\n});\n\nwriteFileSync(\"highlight.svg\", svg);\n```\n\n![Syntax Highlight](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/highlight.svg)\n\n| Feature                     | shellfie | carbon-now-cli | svg-term | termtosvg |\n| --------------------------- | -------- | -------------- | -------- | --------- |\n| Zero dependencies           | ✅       | ❌             | ❌       | ❌        |\n| No native bindings          | ✅       | ❌             | ❌       | ❌        |\n| No headless browser         | ✅       | ❌             | ✅       | ✅        |\n| Full ANSI support           | ✅       | ✅             | ✅       | ✅        |\n| 24-bit true color           | ✅       | ✅             | ❌       | ✅        |\n| Runs in browser             | ✅       | ❌             | ❌       | ❌        |\n| Synchronous API             | ✅       | ❌             | ❌       | ❌        |\n| Built-in Syntax hightligher | ✅       | ❌             | ❌       | ❌        |\n\n## Why SVG?\n\n✅ **Infinitely scalable** — pixel-perfect at any zoom level, retina-ready by default.  \n✅ **Selectable text** — copy code directly from the image.  \n✅ **Embeddable everywhere** — high quality embedding in READMEs, docs, blogs, everywhere.  \n✅ **Tiny files** — 2-10KB vs blurry 500KB+ PNGs.  \n✅ **No rendering pipeline** — runs anywhere JavaScript runs.\n\n## Install\n\n```bash\nnpm install shellfie\n```\n\n## Usage\n\n```typescript\nimport shellfie from \"shellfie\";\n\nconst svg = shellfie(terminalOutput, {\n  template: \"macos\",\n  title: \"npm test\",\n});\n```\n\n## Browser\n\n```html\n<script type=\"module\">\n  import shellfie from \"https://esm.sh/shellfie\";\n\n  const svg = shellfie(\"\\x1b[32m$ npm test\\x1b[0m\\nAll tests passed!\", {\n    template: \"macos\",\n    title: \"terminal\",\n  });\n\n  document.body.innerHTML = svg;\n</script>\n```\n\n## Templates\n\n| macOS                                                                                                | Windows                                                                                                  | Minimal                                                                                                  |\n| ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |\n| ![macos](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/macos.svg) | ![windows](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/windows.svg) | ![minimal](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/minimal.svg) |\n\n```typescript\nshellfie(output, { template: \"macos\" }); // default\nshellfie(output, { template: \"windows\" });\nshellfie(output, { template: \"minimal\" });\n```\n\n## Custom Templates\n\nCreate your own templates with `createTemplate`:\n\n```typescript\nimport shellfie, { createTemplate } from \"shellfie\";\n\nconst myTemplate = createTemplate(\"my-template\", {\n  titleBar: true,\n  titleBarHeight: 40,\n  borderRadius: 10,\n  controls: true,\n  controlsPosition: \"left\",\n  controlStyle: {\n    close: \"#ff5f56\",\n    minimize: \"#ffbd2e\",\n    maximize: \"#27c93f\",\n    radius: 6,\n    spacing: 20,\n    size: 12,\n  },\n  padding: 16,\n  shadow: true,\n  border: false,\n  borderColor: \"#333333\",\n  borderWidth: 0,\n  header: {\n    backgroundColor: \"rgb(36, 37, 38)\",\n    border: false,\n  },\n});\n\nshellfie(output, { template: myTemplate });\n```\n\nTemplates can include default `header` and `footer` configurations. User options always override template defaults:\n\n```typescript\n// Template has header.backgroundColor set, but user can override it\nshellfie(output, {\n  template: myTemplate,\n  header: { backgroundColor: \"#000000\" }, // overrides template default\n});\n```\n\n## Options\n\n```typescript\nshellfie(input, {\n  template?: \"macos\",                             // 'macos' | 'windows' | 'minimal' | Template\n  title?: \"my-terminal\",                          // window title\n  width?: 80,                                     // SVG width in pixels (auto-detected if not set)\n  height?: 400,                                   // SVG height in pixels (auto-detected if not set)\n  padding?: 16,                                   // number | [v, h] | [top, right, bottom, left]\n  controls?: true,                                // show window control buttons\n  controlsPosition?: \"left\",                      // 'left' (macOS) or 'right' (Windows)\n  fontSize?: 14,                                  // font size in pixels\n  lineHeight?: 1.4,                               // line height multiplier\n  fontFamily?: \"'SF Mono', Monaco, monospace\",    // font stack\n  customGlyphs?: true,                            // pixel-perfect box drawing characters\n  embedFont?: true,                               // embed default font as base64 (async only)\n  customFont?: {                                  // use your own font\n    data: base64FontData,                         //   base64-encoded font data\n    format: \"woff2\",                              //   'woff2' | 'woff' | 'ttf'\n  },\n  theme?: customTheme,                            // custom color theme or see themes below\n  language?: \"typescript\",                        // syntax highlighting: 'auto' | language | false\n  watermark?: \"Generated by shellfie\",            // string or WatermarkConfig (see Watermarks below)\n  header?: {                                      // header configuration\n    backgroundColor?: \"#2d2d2d\",                  //   title bar background color\n    height?: 40,                                  //   title bar height in pixels\n    border?: true,                                //   show bottom border\n    borderColor?: \"#1a1a1a\",                      //   border color\n    borderWidth?: 1,                              //   border width in pixels\n  },\n  footer?: {                                      // footer configuration\n    backgroundColor?: \"#2d2d2d\",                  //   footer background color\n    height?: 30,                                  //   footer height in pixels\n    border?: true,                                //   show top border\n    borderColor?: \"#1a1a1a\",                      //   border color\n    borderWidth?: 1,                              //   border width in pixels\n  },\n  background?: \"#1a1a2e\",                         // outer background (see Background section below)\n  effects?: \"crt\",                                // post-processing (see Effects section below)\n});\n```\n\n## Background\n\nAdd a background container around the terminal with solid colors or gradients:\n\n```typescript\n// Simple hex color\nshellfie(output, {\n  background: \"#1a1a2e\",\n});\n\n// Gradient string with direction\nshellfie(output, {\n  background: \"gradient(hotpink, cyan:diagonal)\",\n});\n\n// Full configuration with padding and border radius\nshellfie(output, {\n  background: {\n    color: \"gradient(#ff0000, #0000ff:vertical)\",\n    padding: 50,\n    borderRadius: 20,\n  },\n});\n```\n\n![Gradient Background](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/gradient.svg)\n\n### Background Options\n\n| Option         | Type               | Default | Description                                   |\n| -------------- | ------------------ | ------- | --------------------------------------------- |\n| `color`        | `string \\| Gradient` | -       | Hex color or gradient string                  |\n| `padding`      | `number`           | `20`    | Space between terminal and background edge    |\n| `borderRadius` | `number`           | `12`    | Border radius of background container         |\n\n### Gradient Syntax\n\nGradients use the format `gradient(color1, color2:direction:reverse)`:\n\n```typescript\n\"gradient(#ff0000, #0000ff)\"           // horizontal (default)\n\"gradient(hotpink, cyan:vertical)\"     // vertical\n\"gradient(#ff6b6b, #4ecdc4:diagonal)\"  // diagonal (top-left to bottom-right)\n\"gradient(pink, purple:horizontal:reverse)\"  // reversed direction\n```\n\n| Direction    | Description                        |\n| ------------ | ---------------------------------- |\n| `horizontal` | Left to right (default)            |\n| `vertical`   | Top to bottom                      |\n| `diagonal`   | Top-left to bottom-right           |\n\nAdd `:reverse` to reverse the gradient direction.\n\n## Effects\n\nPost-processing for the finished SVG, powered by\n[vctrfx](https://github.com/tool3/vctrfx). Still vector, still editable — no\nrasterizing.\n\n```typescript\nshellfie(input, { effects: \"crt\" });\nshellfie(input, { effects: \"scanlines(gap:3,opacity:.35) grain(amount:.4)\" });\n```\n\n27 effects and 8 presets are reachable by name. `crt`, `vhs`, `riso`, `xerox`,\n`neon`, `film`, `newsprint` and `cyberpunk` are the presets; the effects behind\nthem are listed in the [vctrfx README](https://github.com/tool3/vctrfx#effects).\n\n### Writing a stack\n\nEffects apply left to right, exactly as you would stack them in an editor.\n\n```typescript\nshellfie(input, { effects: \"grayscale scanlines vignette\" });\n```\n\nArguments go in parentheses as `key: value`. A dotted key reaches inside a preset,\nso the rest of the recipe stays put:\n\n```typescript\nshellfie(input, { effects: \"crt(scanlines.gap:3, animate:true)\" });\n```\n\nArrays mix names, option objects and vctrfx effects freely:\n\n```typescript\nimport { crt, grain } from \"vctrfx\";\n\nshellfie(input, { effects: [\"crt\", { grain: { amount: 0.4 } }] });\nshellfie(input, { effects: [crt(), grain({ amount: 0.4 })] });\n```\n\n### Effect Options\n\nThe object form adds vctrfx's own settings, plus `target`:\n\n```typescript\nshellfie(input, {\n  effects: {\n    use: \"crt\",                // the stack — any of the forms above\n    target: \"terminal\",        // 'all' (default) or 'terminal'\n    seed: \"hero\",              // seeds grain, glitch and friends; same seed, same output\n    animate: false,            // strip self-animating effects, for print or snapshots\n    clip: \"shape\",             // 'shape' (default) trims to the artwork's own frame\n    format: \"preserve\",        // 'preserve' | 'pretty' | 'minify'\n  },\n});\n```\n\n| Option | Default | What it does |\n| ------ | ------- | ------------ |\n| `use` | — | The effect stack |\n| `target` | `'all'` | `'all'` post-processes the whole image, outer background included. `'terminal'` confines the effects to the window, leaving the background, padding, shadow and glow untouched |\n| `seed` | `'vctrfx'` | Seeds every random decision. Change it to reroll a glitch or a grain field |\n| `animate` | `true` | `false` strips animation from every effect that asked for it |\n| `clip` | `'shape'` | `'none'` lets effects spill past the artwork's frame |\n| `format` | `'preserve'` | `'pretty'` re-indents, `'minify'` drops comments and layout whitespace |\n\nAn unknown name is an error with a suggestion, not a silently missing effect:\n\n```\nUnknown effect \"scanline\". Did you mean \"scanlines\"?\n```\n\n## Watermarks\n\nAdd a watermark to the bottom-right corner of your SVG:\n\n```typescript\n// Simple string (supports ANSI codes)\nshellfie(output, {\n  watermark: \"\\x1b[90mGenerated by shellfie\\x1b[0m\",\n});\n\n// Full configuration\nshellfie(output, {\n  watermark: {\n    content: \"powered by shellfie\",\n    style: {\n      padding: 16, // number | [v, h] | [top, right, bottom, left]\n      margin: [0, 8],\n      opacity: 0.8,\n    },\n  },\n});\n```\n\n### Watermark Options\n\n| Option    | Type                | Description                                      |\n| --------- | ------------------- | ------------------------------------------------ |\n| `content` | `string`            | Text (with ANSI) or SVG markup                   |\n| `type`    | `'text' \\| 'markup'` | Auto-detected: markup if starts with SVG element |\n| `style`   | `WatermarkStyle`    | CSS-like positioning and appearance              |\n\n### WatermarkStyle\n\nSupports CSS shorthand notation for `padding` and `margin`:\n\n```typescript\nstyle: {\n  padding: 16,              // all sides\n  padding: [8, 16],         // [vertical, horizontal]\n  padding: [8, 16, 8, 16],  // [top, right, bottom, left]\n  paddingTop: 8,            // individual sides\n  margin: 0,\n  marginRight: 8,\n}\n```\n\nAdditional SVG-compatible style properties are passed through:\n\n```typescript\nstyle: {\n  opacity: 0.5,\n  filter: \"blur(1px)\",\n  transform: \"rotate(-5deg)\",\n}\n```\n\n> **Note:** Standard CSS properties like `border` don't work in SVG. Use SVG-specific properties (`stroke`, `stroke-width`) or markup watermarks for complex styling.\n\n### SVG Markup Watermarks\n\nFor advanced watermarks, use raw SVG markup:\n\n```typescript\nshellfie(output, {\n  watermark: {\n    content: `\n      <a href=\"https://github.com/tool3/shellfie\">\n        <rect width=\"100\" height=\"20\" rx=\"3\" fill=\"#333\"/>\n        <text x=\"50\" y=\"14\" text-anchor=\"middle\" fill=\"#fff\">shellfie</text>\n      </a>\n    `,\n    // type auto-detected as 'markup' since content starts with '<a'\n  },\n});\n```\n\nThe markup is wrapped in a `<g>` element positioned at the bottom-right, with `font-family`, `font-size`, and `fill` inherited from the theme.\n\n## Font Embedding\n\nFor portable SVGs that render identically everywhere:\n\n```typescript\nimport { shellfieAsync } from \"shellfie\";\n\nconst svg = await shellfieAsync(input, { embedFont: true });\n```\n\nThe font gets base64-encoded directly into the SVG. No external requests, no CORS issues, no \"why does this look different on their machine\" debugging sessions.\n\n## Themes\n\nshellfie comes with 35 built-in themes:\n\n```typescript\nimport shellfie, { dracula, nord, tokyoNight } from \"shellfie\";\n\nshellfie(output, { theme: dracula });\n```\n\n| Dracula                                                                                                         | Dracula PRO                                                                                                             | Nord                                                                                                      |\n| --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |\n| ![Dracula](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/dracula.svg) | ![Dracula PRO](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/dracula-pro.svg) | ![Nord](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/nord.svg) |\n\n| Tokyo Night                                                                                                             | One Dark                                                                                                          | One Light                                                                                                           |\n| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |\n| ![Tokyo Night](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/tokyo-night.svg) | ![One Dark](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/one-dark.svg) | ![One Light](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/one-light.svg) |\n\n| Monokai                                                                                                         | Catppuccin Mocha                                                                                                                  | Material                                                                                                          |\n| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |\n| ![Monokai](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/monokai.svg) | ![Catppuccin Mocha](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/catppuccin-mocha.svg) | ![Material](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/material.svg) |\n\n| GitHub Dark                                                                                                             | GitHub Light                                                                                                              | VS Code                                                                                                        |\n| ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |\n| ![GitHub Dark](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/github-dark.svg) | ![GitHub Light](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/github-light.svg) | ![VS Code](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/vscode.svg) |\n\n| Gruvbox Dark                                                                                                              | Gruvbox Light                                                                                                               | Solarized Dark                                                                                                                |\n| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |\n| ![Gruvbox Dark](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/gruvbox-dark.svg) | ![Gruvbox Light](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/gruvbox-light.svg) | ![Solarized Dark](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/solarized-dark.svg) |\n\n| Solarized Light                                                                                                                 | SynthWave '84                                                                                                              | Shades of Purple                                                                                                                  |\n| ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |\n| ![Solarized Light](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/solarized-light.svg) | ![SynthWave '84](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/synthwave-84.svg) | ![Shades of Purple](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/shades-of-purple.svg) |\n\n| Cobalt                                                                                                        | Oceanic Next                                                                                                              | Lucario                                                                                                         |\n| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |\n| ![Cobalt](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/cobalt.svg) | ![Oceanic Next](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/oceanic-next.svg) | ![Lucario](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/lucario.svg) |\n\n| Panda Syntax                                                                                                              | Hopscotch                                                                                                           | Paraiso Dark                                                                                                              |\n| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |\n| ![Panda Syntax](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/panda-syntax.svg) | ![Hopscotch](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/hopscotch.svg) | ![Paraiso Dark](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/paraiso-dark.svg) |\n\n| Base16 Dark                                                                                                             | Base16 Light                                                                                                              | Duotone Dark                                                                                                              |\n| ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |\n| ![Base16 Dark](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/base16-dark.svg) | ![Base16 Light](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/base16-light.svg) | ![Duotone Dark](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/duotone-dark.svg) |\n\n| 3024 Night                                                                                                            | A11y Dark                                                                                                           | Blackboard                                                                                                            |\n| --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |\n| ![3024 Night](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/3024-night.svg) | ![A11y Dark](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/a11y-dark.svg) | ![Blackboard](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/blackboard.svg) |\n\n| Seti                                                                                                      | Twilight                                                                                                          | Verminal                                                                                                          |\n| --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |\n| ![Seti](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/seti.svg) | ![Twilight](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/twilight.svg) | ![Verminal](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/verminal.svg) |\n\n| Yeti                                                                                                      | Zenburn                                                                                                         |\n| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |\n| ![Yeti](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/yeti.svg) | ![Zenburn](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/themes/zenburn.svg) |\n\n## Custom Themes\n\n```typescript\nimport shellfie, { createTheme } from \"shellfie\";\n\nconst theme = createTheme({\n  name: \"ocean\",\n  background: \"#0a2540\",\n  foreground: \"#e6f1ff\",\n  red: \"#ff6b6b\",\n  green: \"#69db7c\",\n  // ... all 16 ANSI colors\n});\n\nshellfie(output, { theme });\n```\n\n## Presets\n\nshellfie comes with 15 built-in presets:\n\n```typescript\nimport shellfie from \"shellfie\";\n\nshellfie(output, { preset: 'vercel' });\n```\n\n| Browserbase                                                                                                                   | Clerk                                                                                                               | Cloudflare                                                                                                                  |\n| ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |\n| ![Browserbase](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/browserbase.svg)      | ![Clerk](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/clerk.svg)         | ![Cloudflare](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/cloudflare.svg)       |\n\n| ElevenLabs                                                                                                                    | Firecrawl                                                                                                                   | Gemini                                                                                                              |\n| ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |\n| ![ElevenLabs](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/elevenlabs.svg)        | ![Firecrawl](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/firecrawl.svg)         | ![Gemini](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/gemini.svg)       |\n\n| Mintlify                                                                                                                      | Nuxt                                                                                                                | OpenAI                                                                                                              |\n| ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |\n| ![Mintlify](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/mintlify.svg)            | ![Nuxt](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/nuxt.svg)           | ![OpenAI](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/openai.svg)       |\n\n| Prisma                                                                                                                        | Resend                                                                                                              | Supabase                                                                                                            |\n| ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |\n| ![Prisma](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/prisma.svg)                | ![Resend](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/resend.svg)       | ![Supabase](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/supabase.svg)   |\n\n| Tailwind                                                                                                                      | Trigger.dev                                                                                                                 | Vercel                                                                                                              |\n| ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |\n| ![Tailwind](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/tailwind.svg)            | ![Trigger.dev](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/triggerdev.svg)      | ![Vercel](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/presets/vercel.svg)       |\n\n## Full Color Support\n\n### 24-bit True Color & 256-color palette\n\n```typescript\nimport gradient from \"gradient-string\";\nimport shellfie from \"shellfie\";\n\nconst svg = shellfie(gradient.rainbow(\"Hello World\"), {\n  template: \"macos\",\n  title: \"gradient string\",\n});\n```\n\n![Gradient String](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/gradient-string.svg)\n\n### Works with any ANSI output\n\n```typescript\nimport Chartscii from \"chartscii\";\nimport shellfie from \"shellfie\";\n\nconst chart = new Chartscii(data, {\n  barSize: 2,\n  fill: \"▒\",\n  colorLabels: true,\n  orientation: \"vertical\",\n  valueLabels: true,\n});\n\nconst svg = shellfie(chart.create(), {\n  template: \"macos\",\n  title: \"Chartscii\",\n  padding: 50,\n});\n```\n\n![Chartscii](https://raw.githubusercontent.com/tool3/shellfie/refs/heads/master/examples/svgs/chartscii.svg)\n\n### CLI tools, test runners, anything\n\n```typescript\nshellfie(execSync(\"git diff --color=always\").toString());\nshellfie(execSync(\"npm test 2>&1\").toString());\nshellfie(execSync(\"ls -la --color=always\").toString());\n```\n\n## Utilities\n\n```typescript\nimport { parse, render, stripAnsi, getMaxWidth } from \"shellfie\";\n\nconst lines = parse(\"\\x1b[31mred\\x1b[0m text\");\nconst svg = render(lines, options);\n\nstripAnsi(\"\\x1b[31mred\\x1b[0m\"); // 'red'\ngetMaxWidth(lines); // 80\n```\n\n## Related\n\n- See [shellfie-cli](https://github.com/tool3/shellfie-cli) for shellfie on command line.\n- See [vctrfx](https://github.com/tool3/vctrfx) for the post-processing behind `effects`.\n- See [shellfied](https://github.com/tool3/shellfied) for the shellfie on web.\n - See [dvd](https://github.com/tool3/dvd) for shellfie on drugs !\n\n## License\n\nMIT\n","publish_time":1777581808818,"_cnpm_publish_time":1777581808818,"dist-tags":{"latest":"2.5.3"}}