# @guysherman/treecat

> A react-like wrapper around https://github.com/chjj/blessed

Latest version **0.1.3** (published 2022-01-09) · 0 weekly downloads

## Install

```sh
npm install @guysherman/treecat
pnpm add @guysherman/treecat
yarn add @guysherman/treecat
bun add @guysherman/treecat
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2022-01-09 |
| First published | 2021-12-25 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 230.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | guysherman |

## Links

- npm: https://www.npmjs.com/package/@guysherman/treecat
- npm.io page: https://npm.io/package/@guysherman/treecat

## Dependencies (2)

- [blessed](https://npm.io/package/blessed.md) ^0.1.81
- [@types/blessed](https://npm.io/package/@types/blessed.md) ^0.1.17

## Recent versions

- 0.1.3 (latest) — 2022-01-09
- 0.1.2 — 2022-01-02
- 0.1.1 — 2022-01-02
- 0.0.3 — 2021-12-27
- 0.0.2 — 2021-12-25
- 0.0.1 — 2021-12-25

## README

# Treecat

A react-like wrapper around https://github.com/chjj/blessed

*WARNING!!* This is a very early/rough project right now, the update implementation is far from complete, which makes it pretty hard to use stuff I haven't already handled.

Issues and comments welcome :)

## Get Started

### Install treecat and its peer dependencies
```
npm i @guysherman/treecat blessed @types/blessed
```

### Basic use-case

```
/** @jsx TreeCat.createElement **/
import * as TreeCat from '@guysherman/treecat';
import * as blessed from 'blessed';
import { MainScreen } from './screens/MainScreen';

const main = async () => {
  const rootScreen: blessed.Widgets.Screen = TreeCat.createRootScreen();
  rootScreen.program.on('keypress', (_ch: string, key: blessed.Widgets.Events.IKeyEventArg) => {
    if (key.full === 'C-c') {
      process.exit(0);
    }
  });

  TreeCat.render(<box>Hello Treecat</box>, rootScreen);
};

main().catch((e) => {
  console.error('Fatal Error', { error: e });
  process.exit(1);
});

```
### More Advanced Use-cases

See [kittymux](https://github.com/guysherman/kittymux) for a slightly more advanced use-case

## Tests

```
yarn test
```

## Build
```
yarn build
```

## Using locally

From here:
```
yarn link
```
Then in the project that uses treecat (assuming you've already added treecat as a dep)

```
yarn link treecat
```

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