{"id":13454147,"url":"https://github.com/dominikwilkowski/cfonts","last_synced_at":"2025-04-09T03:09:23.855Z","repository":{"id":25672562,"uuid":"29108449","full_name":"dominikwilkowski/cfonts","owner":"dominikwilkowski","description":"Sexy fonts for the console","archived":false,"fork":false,"pushed_at":"2024-06-17T02:00:37.000Z","size":7452,"stargazers_count":1598,"open_issues_count":3,"forks_count":59,"subscribers_count":16,"default_branch":"released","last_synced_at":"2024-10-29T15:28:44.784Z","etag":null,"topics":["ansi","ascii","ascii-art","chalk","cli","font","generator","nodejs","sexy","sexy-fonts","shell"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cfonts","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dominikwilkowski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-11T22:27:44.000Z","updated_at":"2024-10-28T16:59:35.000Z","dependencies_parsed_at":"2023-02-18T23:31:09.526Z","dependency_job_id":"7419e5ee-9fef-47ca-b44d-e1446c7c35b4","html_url":"https://github.com/dominikwilkowski/cfonts","commit_stats":{"total_commits":379,"total_committers":11,"mean_commits":34.45454545454545,"dds":0.07387862796833777,"last_synced_commit":"baa0ac04fa66f41fde0e7acb9711adc2b36ece92"},"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fcfonts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fcfonts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fcfonts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fcfonts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dominikwilkowski","download_url":"https://codeload.github.com/dominikwilkowski/cfonts/tar.gz/refs/heads/released","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247968280,"owners_count":21025822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansi","ascii","ascii-art","chalk","cli","font","generator","nodejs","sexy","sexy-fonts","shell"],"created_at":"2024-07-31T08:00:51.335Z","updated_at":"2025-04-09T03:09:23.830Z","avatar_url":"https://github.com/dominikwilkowski.png","language":"Rust","funding_links":[],"categories":["Packages","Rust","Applications","应用程序 Applications","包","目录","cli","JavaScript","Command-line utilities","\u003ca name=\"font\"\u003e\u003c/a\u003eFont management",":books: Libraries"],"sub_categories":["Command-line utilities","Text processing","文本处理 Text processing","命令行工具","命令行实用工具","Node"],"readme":"```sh\n     ██████╗ ███████╗  ██████╗  ███╗   ██╗ ████████╗ ███████╗\n    ██╔════╝ ██╔════╝ ██╔═══██╗ ████╗  ██║ ╚══██╔══╝ ██╔════╝\n    ██║      █████╗   ██║   ██║ ██╔██╗ ██║    ██║    ███████╗\n    ██║      ██╔══╝   ██║   ██║ ██║╚██╗██║    ██║    ╚════██║\n    ╚██████╗ ██║      ╚██████╔╝ ██║ ╚████║    ██║    ███████║\n     ╚═════╝ ╚═╝       ╚═════╝  ╚═╝  ╚═══╝    ╚═╝    ╚══════╝\n```\n\n![cfont styles](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/example1.png)\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/example2.png\" alt=\"api example\"\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://crates.io/crates/cfonts\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/cfonts.svg\" alt=\"crates badge\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://crates.io/crates/cfonts\"\u003e\u003cimg src=\"https://docs.rs/cfonts/badge.svg\" alt=\"crates docs tests\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://github.com/dominikwilkowski/cfonts/actions/workflows/testing.yml\"\u003e\u003cimg src=\"https://github.com/dominikwilkowski/cfonts/actions/workflows/testing.yml/badge.svg\" alt=\"build status\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://www.npmjs.com/package/cfonts\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/cfonts\"\u003e\u003c/a\u003e\n\t\u003ca href='https://coveralls.io/github/dominikwilkowski/cfonts?branch=released'\u003e\u003cimg src='https://coveralls.io/repos/github/dominikwilkowski/cfonts/badge.svg?branch=released' alt='cfonts Coverage Status' /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eThis is a silly little command line tool for sexy ANSI fonts in the console. \u003cstrong\u003eGive your cli some love.\u003c/strong\u003e\u003c/p\u003e\n\n## Implementations\n\n### Rust\n\nRead more in the [Rust folder](https://github.com/dominikwilkowski/cfonts/tree/released/rust).\n\n### Nodejs\n\nRead more in the [Nodejs folder](https://github.com/dominikwilkowski/cfonts/tree/released/nodejs).\n\n\n## Install\n\u003c!--\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003eUnix\u003ch3\u003e\u003c/summary\u003e\n\n#### [snapcraft](https://snapcraft.io/cfonts)\n\n```sh\nsudo snap install cfonts\n```\n\n#### [Alpine Linux repository](https://pkgs.alpinelinux.org/packages?name=cfonts)\n\n_💡  The correct repository (see above link for the most up-to-date information) should be enabled before `apk add`._\n\n```sh\nsudo apk add cfonts\n```\n\n#### [Scoop](https://scoop.sh/)\n\n```sh\nscoop install cfonts\n```\n\n#### RPM\n\n```sh\nTODO\n```\n\n\u003c/details\u003e\n\n--\u003e\n### Rust\n\n#### [homebrew](https://formulae.brew.sh/formula/cfonts)\n\n```sh\nbrew install cfonts\n```\n\n#### [Arch User Repository](https://aur.archlinux.org/packages/cfonts)\n\n```sh\nyay -S cfonts\n```\n\n#### [Fedora](https://src.fedoraproject.org/rpms/rust-cfonts)\n\n```sh\nsudo dnf install cfonts\n```\n\n#### [NixOS](https://search.nixos.org/packages?show=cfonts)\n\n``` sh\nnix-env -iA nixos.cfonts\n```\n\n#### [MacPorts](https://ports.macports.org/port/cfonts/)\n\n```sh\nsudo port install cfonts\n```\n\n#### [cargo](https://crates.io/crates/cfonts)\n\n```sh\ncargo install cfonts\n```\n\n### NodeJs\n\n#### [npm](https://www.npmjs.com/package/cfonts)\n\n```sh\nnpm i cfonts -g\n```\n\n#### [yarn](https://yarnpkg.com/package/cfonts)\n\n```sh\nyarn global add cfonts\n```\n\n\n## Usage\n\nUsing the CLI is easy.\n\n```\nUsage: cfonts  \"\u003cvalue\u003e\" [option1] \u003cinput1\u003e [option2] \u003cinput1\u003e,\u003cinput2\u003e [option3] etc...\n```\n\nAt any point you can run the *help* command to get a full list of commands and\nhow to use them.\n\n```sh\n$ cfonts --help\n```\n\n\n## Supported Characters\n\n|     |     |     |             |\n|-----|-----|-----|-------------|\n| `A` | `P` | `4` | `$`         |\n| `B` | `Q` | `5` | `%`         |\n| `C` | `R` | `6` | `\u0026`         |\n| `D` | `S` | `7` | `(`         |\n| `E` | `T` | `8` | `)`         |\n| `F` | `U` | `9` | `/`         |\n| `G` | `V` | `!` | `:`         |\n| `H` | `W` | `?` | `;`         |\n| `I` | `X` | `.` | `,`         |\n| `J` | `Y` | `+` | `'`         |\n| `K` | `Z` | `-` | `\"`         |\n| `L` | `0` | `_` | ` ` (space) |\n| `M` | `1` | `=` |             |\n| `N` | `2` | `@` |             |\n| `O` | `3` | `#` |             |\n\n_The `|` character will be replaced with a line break_\n\n\n## Options\n\n#### -h, --help\nType: `\u003ccommand\u003e`  \nDefault value: `none`\n\nThis shows a list of all available options.\n\n```sh\n$ cfonts --help\n```\n\n![Help command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/help.png)\n\n\n#### -V, --version\nType: `\u003ccommand\u003e`  \nDefault value: `none`\n\nThis shows the installed version.\n\n```sh\n$ cfonts --version\n```\n\n![Version command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/version.png)\n\n\n#### text\nType: `\u003cstring\u003e`  \nDefault value: `\"\"`\n\nThis is the \"text input\" to be converted into a nice font.  \nThe `|` character will be replaced with a line break.\n\n```sh\n$ cfonts \"Hello world\"\n```\n\n![Text command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/text.png)\n\n\n#### -f, --font\nType: `\u003cstring\u003e`  \nDefault value: `\"block\"`\n\nThis is the font face you want to use. So far this plugin ships with with following font faces:\n\n```sh\n$ cfonts \"text\" --font \"chrome\"\n```\n\n![Font command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/font.png)\n\n- `block`       [colors: 2] _(default)_\n\t![block font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/block.png)\n- `slick`       [colors: 2]\n\t![slick font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/slick.png)\n- `tiny`        [colors: 1]\n\t![tiny font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/tiny.png)\n- `grid`        [colors: 2]\n\t![grid font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/grid.png)\n- `pallet`      [colors: 2]\n\t![pallet font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/pallet.png)\n- `shade`       [colors: 2]\n\t![shade font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/shade.png)\n- `chrome`      [colors: 3]\n\t![chrome font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/chrome.png)\n- `simple`      [colors: 1]\n\t![simple font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/simple.png)\n- `simpleBlock` [colors: 1]\n\t![simple-block font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/simple-block.png)\n- `3d`          [colors: 2]\n\t![3d font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/3d.png)\n- `simple3d`    [colors: 1]\n\t![simple-3d font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/simple-3d.png)\n- `huge`        [colors: 2]\n\t![huge font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/huge.png)\n- `console`     [colors: 1]\n\t![console font style](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/console.png)\n\n\n#### -a, --align\nType: `\u003cstring\u003e`  \nDefault value: `\"left\"`\n\nYou can align your text in the terminal with this option. Use the keywords below:\n\n- `left` _(default)_\n- `center`\n- `right`\n- `top` _(Will be ignored if used with the spaceless option)_\n- `bottom` _(Will be ignored if used with the spaceless option)_\n\n```sh\n$ cfonts \"text\" --align \"center\"\n```\n\n![Align command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/align.png)\n\n\n#### -c, --colors\nType: `\u003cstring list\u003e`  \nDefault value: `['system']`\n\nWith this setting you can set the colors for your font.\nUse the below color strings or a hex color.  \nProvide colors in a comma-separated string, eg: `red,blue`. _(no spaces)_  \nIf you use a hex color make sure you include the `#` prefix. _(In most terminals wrap the hex in quotes)_  \nThe `system` color falls back to the system color of your terminal.\n\n💡  There are [environment variables](#consistency) that can affect the display of colors in your terminal.\n\n- `system` _(default)_\n- `black`\n- `red`\n- `green`\n- `yellow`\n- `blue`\n- `magenta`\n- `cyan`\n- `white`\n- `gray`\n- `redBright`\n- `greenBright`\n- `yellowBright`\n- `blueBright`\n- `magentaBright`\n- `cyanBright`\n- `whiteBright`\n- `#ff8800` _(any valid hex color)_\n- `#f80` _(short form is supported as well)_\n\n```sh\n$ cfonts \"text\" --colors white,\"#f80\"\n```\n\n![Colors command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/colors.png)\n\n\n#### -g, --gradient\nType: `\u003cstring list\u003e`  \nDefault value: `false`\n\nWith this setting you can set a gradient over your output.  \nThis setting supersedes the color open.  \nThe gradient requires two colors, a start color and an end color from left to right.  \n_(If you want to set your own colors for the gradient, use the [transition](#-t---transition-gradient) option.)_  \n`cfonts` will then generate a gradient through as many colors as it can find to make the output most impressive.  \nProvide two colors in a comma-separated string, eg: `red,blue`. _(no spaces)_  \nIf you use a hex color make sure you include the `#` prefix. _(In the terminal wrap the hex in quotes)_  \n\n- `black`\n- `red`\n- `green`\n- `yellow`\n- `blue`\n- `magenta`\n- `cyan`\n- `white`\n- `gray`\n- `grey`\n- `#ff8800` _(any valid hex color)_\n- `#f80` _(short form is supported as well)_\n\n```sh\n$ cfonts \"text\" --gradient red,\"#f80\"\n```\n\n![Gradient command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/gradient.png)\n\n\n#### -i, --independent-gradient\nType: `\u003cboolean\u003e`  \nDefault value: `false`\n\nSet this option to re-calculate the gradient colors for each new line.  \nOnly works in combination with the [gradient](#-g---gradient) option.\n\n```sh\n$ cfonts \"text|next line\" --gradient red,\"#f80\" --independent-gradient\n```\n\n![Independent gradient command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/independent-gradient.png)\n\n\n#### -t, --transition-gradient\nType: `\u003cboolean\u003e`  \nDefault value: `false`\n\nSet this option to generate your own gradients.\nEach color set in the gradient option will then be transitioned to directly.\nThis option allows you to specify more than just two colors for your gradient.  \nOnly works in combination with the [gradient](#-g---gradient) option.\n\n```sh\n$ cfonts \"text\" --gradient red,\"#f80\",green,blue --transition-gradient\n```\n\n![Independent gradient command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/transition-gradient.png)\n\n\n#### -b, --background\nType: `\u003cstring\u003e`  \nDefault value: `\"transparent\"`\n\nWith this setting you can set the background colors for the output. Use the below color strings.\nProvide the background color from the below supported list, eg: 'white'\n\n- `transparent` _(default)_\n- `black`\n- `red`\n- `green`\n- `yellow`\n- `blue`\n- `magenta`\n- `cyan`\n- `white`\n- `blackBright`\n- `redBright`\n- `greenBright`\n- `yellowBright`\n- `blueBright`\n- `magentaBright`\n- `cyanBright`\n- `whiteBright`\n- `#ff8800` _(any valid hex color)_\n- `#f80` _(short form is supported as well)_\n\n```sh\n$ cfonts \"text\" --background \"Green\"\n```\n\n![Background command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/background.png)\n\n\n#### -l, --letter-spacing\nType: `\u003cinteger\u003e`  \nDefault value: `1`\n\nSet this option to widen the space between characters.\n\n```sh\n$ cfonts \"text\" --letter-spacing 2\n```\n\n![Letter spacing command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/letter-spacing.png)\n\n\n#### -z, --line-height\nType: `\u003cinteger\u003e`  \nDefault value: `1`\n\nSet this option to widen the space between lines.\n\n```sh\n$ cfonts \"text\" --line-height 2\n```\n\n![Line height command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/line-height.png)\n\n\n#### -s, --spaceless\nType: `\u003cboolean\u003e`  \nDefault value: `false`\n\nSet this option to false if you don't want the plugin to insert two empty lines on top and on the bottom of the output.\n\n```sh\n$ cfonts \"text\" --spaceless\n```\n\n![Spaceless command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/spaceless.png)\n\n\n#### -m, --max-length\nType: `\u003cinteger\u003e`  \nDefault value: `0`\n\nThis option sets the maximum characters that will be printed on one line.  \n`cfonts` detects the size of your terminal but you can opt out and determine your own max width.  \n`0` means no max width and the text will break at the edge of the terminal window.\n\n```sh\n$ cfonts \"text\" --max-length 15\n```\n\n![Max length command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/max-length.png)\n\n\n#### -r, --raw-mode\nType: `\u003cboolean\u003e`  \nDefault value: `false`\n\nSet this option to make sure `cfonts` used `CRLF` (`\\r\\n`) over the default `LF` (`\\n`) [line breaks](https://en.wikipedia.org/wiki/Newline).  \nThis could be useful for terminal raw modes or on older windows machines.  \n\n\n```rust\nuse crossterm::terminal;\nuse std::io::Write;\nuse cfonts;\n\nfn main() -\u003e std::io::Result\u003c()\u003e {\n\tterminal::enable_raw_mode()?;\n\n\tcfonts::say(cfonts::Options {\n\t\ttext: String::from(\"Hello|world\"),\n\t\traw_mode: true,\n\t\t..cfonts::Options::default()\n\t});\n\n\tstd::io::stdout().flush()?;\n\tterminal::disable_raw_mode()?;\n\tOk(())\n}\n```\n\n![Raw mode command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/raw-mode.png)\n\n\n#### -e, --env\nType: `\u003cstring\u003e`  \nDefault value: `cli`\n\nThis option lets you use `cfonts` to generate HTML instead of ANSI code.  \nNote that `max-length` will be set to very large.  \n\n```sh\n$ cfonts \"text\" --env browser\n```\n\n![Max length command](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/env.png)\n\n\n## Consistency\n`cfonts` detects what colors are supported on your platform.\nIt sets a level of support automatically.\nIn `cfonts` you can override this by passing in the `FORCE_COLOR` environment variable.\n\n```sh\nFORCE_COLOR=3 cfonts \"hello world\" -c \"#0088ff\"\n```\n\nYou can also use the `NO_COLOR` environment variable to set no color output for environments like CI.\n\n```sh\nNO_COLOR=\"\" cfonts \"hello world\" -c \"#0088ff\"\n```\n\n💡  `FORCE_COLOR` overrides `NO_COLOR` if both are set.\n\n![Color consistency via env vars](https://raw.githubusercontent.com/dominikwilkowski/cfonts/released/img/color-consistency.png)\n\n\n## License\nCopyleft (c) 2023 Dominik Wilkowski.\nLicensed under the [GNU GPL-3.0-or-later](https://github.com/dominikwilkowski/cfonts/blob/released/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominikwilkowski%2Fcfonts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdominikwilkowski%2Fcfonts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominikwilkowski%2Fcfonts/lists"}