# yayfetch

> A Multi-platform screenfetch/neofetch

Latest version **2.1.0** (published 2023-12-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install yayfetch
pnpm add yayfetch
yarn add yayfetch
bun add yayfetch
```

Provides the command `yayfetch`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2023-12-19 |
| First published | 2019-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 17 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | Szymon Wiszczuk |
| Maintainers | golota60 |
| Keywords | screenfetch, neofetch, environment, info, system, sysinf, systeminformation |

## Links

- npm: https://www.npmjs.com/package/yayfetch
- Repository: https://github.com/golota60/yayfetch
- Homepage: https://github.com/golota60/yayfetch#readme
- Issues: https://github.com/golota60/yayfetch/issues
- npm.io page: https://npm.io/package/yayfetch

## Dependencies (6)

- [chalk](https://npm.io/package/chalk.md) ^5.3.0
- [yargs](https://npm.io/package/yargs.md) ^17.7.2
- [inquirer](https://npm.io/package/inquirer.md) ^9.2.12
- [log-update](https://npm.io/package/log-update.md) ^5.0.1
- [terminal-image](https://npm.io/package/terminal-image.md) ^2.0.0
- [systeminformation](https://npm.io/package/systeminformation.md) ^5.21.20

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 2.1.0 (latest) — 2023-12-19
- 2.0.6 — 2022-06-18
- 2.0.5 — 2022-03-29
- 2.0.4 — 2022-03-29
- 2.0.2 — 2022-03-29
- 2.0.1 — 2021-11-20
- 2.0.0 — 2021-09-26
- 1.4.3 — 2021-06-09
- 1.4.2 — 2021-06-09
- 1.4.1 — 2021-05-31
- 1.4.0 — 2021-05-31
- 1.3.0 — 2021-04-10
- 1.2.5 — 2020-07-14
- 1.2.4 — 2020-07-14
- 1.2.3 — 2020-07-14
- … 28 more at https://npm.io/package/yayfetch/versions

## README

<a href="https://www.npmjs.com/package/yayfetch">
    <img alt="downloads" src="https://img.shields.io/npm/dm/yayfetch.svg" target="_blank" />
  </a>
<br>

<p align="center">
</p>

<div align="center">
<img src="https://github.com/golota60/yayfetch/blob/master/assets/logo.svg" width="200">
	<h1>Yayfetch</h1>
	<p>
		<b>🧁Multi-platform customizable screenfetch tool🧁</b>
	</p>
	<br>
</div>

<p align="center">
<img src="https://github.com/golota60/yayfetch/blob/master/assets/examplegif.gif" width="600">
</p>

<br>

Yayfetch is a tool similar to screenfetch, it just displays info about your computer in a prettified format - except you can use it on a non-linux machine via npx, thanks to the wonders of node

## Usage

Yayfetch works both with `npx` and `bunx`

- npm - `npx yayfetch`

- bun -`bunx yayfetch`


_or_ install it globally:

`bun install --global yayfetch`/`npm install -g yayfetch` and then just call `yayfetch`!

## Flag-defined features

`-p` or `--pick` - first asks you what information you want to display, then displays it

`-c <color>` or `--color <color>` - allows to specify in which color the data will be shown in predefined colors. Cannot be used with --rgb flag. Available predefined colors:
`pink`(default), `orange`, `green`, `white`, `black`, `red`, `blue`, `yellow`, `violet`, `rainbow`

`--rgb r,g,b` - specify RGB values in which data will be shown. Cannot be used with -c(--color) flag. Example `npx yayfetch --rgb 125,25,78`

`--no-logo` - prints data without ASCII art

`--custom-lines {[key]: value, [key2]: value2, ...}` - object with {[key]: value} string pairs separated by spaces ex.
`'{"Funny:": "joke", "exampleline:": "examplevalue"}'`. This is being parsed using JSON.parse, so if you encounter any problem, make sure that string you provided can be parsed by it.

`--no-colored-boxes` - hides the colored boxes underneath the information.

`-h` or `--help` - shows available flags.

`--config <path_to_file>` - specify a file path to a custom config. See [here](#example-config)

## Config-specific features

Some more advanced features are almost impossible to implement through flags(to be quite honest, some are already pushing it e.g. `--custom-lines`).

- ### Custom ASCIIs

To customize the ASCIIs just define `"ascii"` line in the config. It should be an `Array<string>` with path(s) to the ASCII(s).

Example:

```json
{
  "ascii": ["./path/to/file.txt", "./path/to/2nd/file.txt"]
}
```

- ### Custom images

You can also defined iamges instead of ASCIIs, by defining `images` field. Note that this flag is mutually exclusive with `ascii` flag.
Uses [terminal-image](https://github.com/sindresorhus/terminal-image) underneath, so refer to it when specifying `options`.

```ts
interface ImageOptions {
  path: string;
  options?: {
    width?: string | number | undefined;
    height?: string | number | undefined;
    preserveAspectRatio?: boolean | undefined;
  };
}
```

Example:

```json
{
  "image": {
    "path": "./path/to/file.img",
    "options": { "preserveAspectRatio": false }
  }
}
```

- ### Line Animations

Output can be animated by `line-animations` flag in the config file. It should be an `AnimationOptions` object.

```ts
type Animations = 'colors' | 'flowing-rainbow';
interface AnimationOptions {
  type: Animations; // Animations - applied per column basis
  msFrequency: number; // How fast should the animation be
}
```

**Note: Printing to stdout is not performant, so it may not work well with less performant console environments**

Example:

```json
{
  "line-animations": {
    "type": "flowing-rainbow",
    "msFrequency": 150
  }
}
```

## Example config

You can specify options through a file and use them by using `--config <path_to_file>`. Config file should contain a JSON object with keys representing flags.

Note that every flag with a prefix of `--no-` just negates the flag that is on by default. For example CLI flag `--no-colored-boxes` negates `colored-boxes` flag, which is `true` by default. This is important for creating a config, because if you want to invoke `--no-colored-boxes` through config, you would provide a `"colored-boxes": false` in JSON object.

Example config:

```
{
	"color": "blue",
	"colored-boxes": false,
	"logo": false,
	"custom-lines": {"Funny:": "joke", "exampleline:": "examplevalue"}
}
```

## It doesn't work!

If it doesn't work for you make sure that you have the newest node(it's developed using node 18.18.0).

If you came here because of the `'Error - check https://www.npmjs.com/package/yayfetch for more'` error, then most likely the software just can't detect the information. Why? Because of the system you use. It may not work when:

1. You're using linux subsystem for windows
2. Your system is within virtual machine

---
_Source: https://npm.io/package/yayfetch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
