https://github.com/alvarezmauro/styled-printf
Do you want to add some styles 🎨 to the output of your bash printf commands? Use this custom script and make the output of that printf look fanzy :bowtie:
https://github.com/alvarezmauro/styled-printf
bash bash-script
Last synced: 5 months ago
JSON representation
Do you want to add some styles 🎨 to the output of your bash printf commands? Use this custom script and make the output of that printf look fanzy :bowtie:
- Host: GitHub
- URL: https://github.com/alvarezmauro/styled-printf
- Owner: alvarezmauro
- License: apache-2.0
- Created: 2021-06-06T14:28:39.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-12T08:07:44.000Z (almost 5 years ago)
- Last Synced: 2025-08-19T10:05:30.223Z (11 months ago)
- Topics: bash, bash-script
- Language: Shell
- Homepage:
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# styled-printf
[](https://github.com/bvanhoekelen/terminal-style/blob/master/LICENSE)
[](https://www.npmjs.com/package/https://www.npmjs.com/package/styled-printf)
Do you want to add some styles 🎨 to the output of your bash **printf** commands? Use this custom script and make the output of that **printf** look fanzy :bowtie:
## How install
Using Yarn
```Shell
yarn add styled-printf
```
Using NPM:
```Shell
npm i styled-printf
```
## How to use
The `styled-printf` command is like `printf` (in fact it's a function wrapping `printf`) that allows you to easily set the text styling, color and background color for the output.
### Usage:
```Shell
styled-printf [-s ] [--style ]
[-c ] [--color ]
[-b ] [-background-color ]
format [argument]
```
### Options:
| Option | Description | Values |
| ------ | --- | --- |
| `-s` \| `--style` | Text formatting | `normal` \| `bold` \| `dim` \| `italics` \| `underline` \|
`blink` \| `reverse` \| `hidden` \| `password` |
| `-c` \| `--color` | Text color | `default` \| `white` \| `black` \| `red` \| `green` \|
`yellow` \| `blue` \| `magenta` \| `cyan` \| `gray` \|
`light-red` \| `light-green` \| `light-yellow` \|
`light-blue` \| `light-magenta` \| `light-cyan` \|
`light-gray` \|
or a number between`0` and `256` | |
| `-b` \| `--background-color` | Background color | `default` \| `white` \| `black` \| `red` \| `green` \|
`yellow` \| `blue` \| `magenta` \| `cyan` \| `gray` \|
`light-red` \| `light-green` \| `light-yellow` \|
`light-blue` \| `light-magenta` \| `light-cyan` \|
`light-gray` \|
or a number between`0` and `256` | |
### Example
```Shell
styled-printf -s bold -c blue -b yellow "%s\n" "This text is bold, red and has a blue background"
```

### Other flags:
| `-h` \| `--help` | Display the help documentation |
| ------- | ------- |
| `-t` \| `--test` | Test all the different styles in your bash terminal |