# redstd

> read stin

Latest version **1.0.2** (published 2026-04-15) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 50/100 (C)** — status: active.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2026-04-15 |
| First published | 2026-04-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 0 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | coderaiser |
| Maintainers | coderaiser |
| Keywords | commandline, pipe, stdin |

## Links

- npm: https://www.npmjs.com/package/redstd
- Repository: https://github.com/coderaiser/redstd
- Issues: https://github.com/coderaiser/redstd/issues
- npm.io page: https://npm.io/package/redstd

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2026-04-15
- 1.0.1 — 2026-04-15
- 1.0.0 — 2026-04-15

## README

# redstd [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]

[NPMURL]: https://npmjs.org/package/redstd "npm"
[NPMIMGURL]: https://img.shields.io/npm/v/redstd.svg?style=flat
[BuildStatusURL]: https://github.com/coderaiser/redstd/actions?query=workflow%3A%22Node+CI%22 "Build Status"
[BuildStatusIMGURL]: https://github.com/coderaiser/redstd/workflows/Node%20CI/badge.svg
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
[CoverageURL]: https://coveralls.io/github/coderaiser/redstd?branch=master
[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/redstd/badge.svg?branch=master&service=github

Read `stdin` to have ability to use pipes like: `cat README.md | less` or

```sh
cat README.md | node -e "const {readStdin} = await import('redstd'); console.log(await readStdin())"
```

When you pass nothing to stdin - everything just works, so you can read from stdout or from file

## Install

```
npm i redstd
```

# Usage

```js
import {readFile} from 'node:fs/promises';
import {readStdin} from 'redstd';

const input = await readStdin();

if (!input) {
    console.log(await readFile('./README.md'));
    process.exit();
}

console.log(input);
```

## License

MIT

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