# foton-terminal

> A CLI formatting tool

Latest version **0.0.7** (published 2021-12-04) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install foton-terminal
pnpm add foton-terminal
yarn add foton-terminal
bun add foton-terminal
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2021-12-04 |
| First published | 2021-12-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | CasperSocio |
| Maintainers | caspersocio |
| Keywords | CLI, Command, Formatting, Interface, Line, Terminal, Text |

## Links

- npm: https://www.npmjs.com/package/foton-terminal
- npm.io page: https://npm.io/package/foton-terminal

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.0.7 (latest) — 2021-12-04

## README

# Foton Terminal

Foton Terminal is a CLI formatting tool that structures output in a similar way to React elements.


## Getting started

### Install

```bash
npm i -D foton-terminal
```


### Add a new element

```typescript
import Foton from 'foton-terminal'

const greeting = new Foton.Element('p')
greeting.content = 'Hello World!'

greeting.print()
// Prints 'Hello World!' to the CLI
```


### Apply styling to element

```typescript
import Foton from 'foton-terminal'

const status = new Foton.Element('p')
status.content = 'Passing'

status.style = {
  backgroundColor: 'green',
  color: 'black',
  margin: 2,
  textTransform: 'uppercase',
}

status.print()
```

<img width="388" alt="Screenshot 2021-12-03 at 14 25 50" src="https://user-images.githubusercontent.com/74550679/144610089-7c56f686-037c-448d-88f8-a92b2b8b047b.png">

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