# pageterm

> Display help in a terminal

Latest version **1.1.1** (published 2022-10-20) · MIT license · 0 weekly downloads

## Install

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

Provides the command `pageterm`.

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-10-20 |
| First published | 2022-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 27.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Patrice Thimothee |
| Maintainers | thimpat |
| Keywords | terminal, help, display, term |

## Links

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

## Dependencies (8)

- [marked](https://npm.io/package/marked.md) ^4.1.1
- [to-ansi](https://npm.io/package/to-ansi.md) ^1.4.3
- [commander](https://npm.io/package/commander.md) ^9.4.1
- [term-size](https://npm.io/package/term-size.md) ^3.0.2
- [window-size](https://npm.io/package/window-size.md) ^1.1.1
- [term-size-cjs](https://npm.io/package/term-size-cjs.md) npm:term-size@^2.2.1
- [marked-terminal](https://npm.io/package/marked-terminal.md) ^5.1.1
- [@thimpat/libutils](https://npm.io/package/@thimpat/libutils.md) ^1.11.0

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2022-10-20
- 1.1.0 — 2022-10-06
- 1.0.5 — 2022-10-06
- 1.0.4 — 2022-09-21
- 1.0.3 — 2022-09-20
- 1.0.2 — 2022-08-30
- 1.0.1 — 2022-08-30
- 1.0.0 — 2022-08-30

## README

> ###### PageTerm displays file content in a terminal

---

## Installation

```shell
npm install pageterm -g
```

<br/>

---

## Demo

![PageTerm Demo](https://github.com/thimpat/pageterm/blob/main/documentation/images/pageterm-demo.gif)

<br/>

---

## Usage


#### CLI

```shell
$> pageterm [options] <filepath>
```


--
#### Programmatically [CommonJs]



```shell
const {showHelp} = require("pageterm");
```

--
#### Programmatically [ESM]

```shell
import {showHelp} from "pageterm";
```

---

## Examples

```shell
const displayHelpFile = async function ()
{
    const content = fs.readFileSync("./my-help-file", "utf-8");
    await showHelp(content, {
        windowTitle: "My Application Name - Help ❔",
        topText: "Press CTRL + C or Q to Quit | Page Down or Any key to scroll down",
        topTextBg: "",
        topTextReversed: true,
        colorify: true
    });
};

```

**filepath**                      File path to content to show

<br/>

---

## Arguments

```shell
$> pageterm <filepath>
```

**filepath**                      File path to content to show

<br/>

---

## Options:


| Options             | Description                                        | Default |
|---------------------|----------------------------------------------------|---------|
| -v, --version       | output the current version                         |         |
| -m, --markdown      | Display file content with partial Markdown support | true    |
| -c, --colorify      | Display file content with colors                   | false   |
| -c, --colorify      | Display file content with colors                   | false   |
| -p, --progress      | Show progress bar                                  | true    |
| -s, --smooth        | Enable smooth scrolling                            | true    |
| -s, --latencyScroll | Smooth scrolling latency                           | 10      |
| -t, --windowTitle   | Set text in Terminal title bar                     |         |
| --topText           | Change the top menu text                           |         |
| -h, --help          | display help for command                           |         |


<br/>                    


---

### Package

```
📁 package                
│
└───📁 cjs
│   │ 📝 index.cjs               ⇽ CJS version      - Node (9.6kB unminified)
└───📁 dist
│   │ 📝 index.mjs               ⇽ ESM version      - Node (9.7kB unminified)

```

<br/>

---

## Changelog

##### current:
*  Display entire help without interruption when TTY is not available


##### 1.1.0:
*  Display help with PageTerm
*  Update code for the ESM file


##### 1.0.5:
*  Restore the initial color on quitting
*  Display content left on quitting
*  Fix lines wrapped incorrectly


##### 1.0.4:
*  Don't display the top text when the console display is wide enough.



---

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