# @pika/plugin-simple-bin

> A @pika/pack plugin: Adds a simple CLI wrapper.

Latest version **0.9.2** (published 2020-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pika/plugin-simple-bin
pnpm add @pika/plugin-simple-bin
yarn add @pika/plugin-simple-bin
bun add @pika/plugin-simple-bin
```

## 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.9.2 |
| Published | 2020-02-13 |
| First published | 2019-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 159 |
| Maintainers | fredkschott |

## Links

- npm: https://www.npmjs.com/package/@pika/plugin-simple-bin
- Repository: https://github.com/pikapkg/builders
- Homepage: https://www.pikapkg.com
- Issues: https://github.com/pikapkg/builders/issues
- npm.io page: https://npm.io/package/@pika/plugin-simple-bin

## Dependencies (1)

- [@pika/types](https://npm.io/package/@pika/types.md) ^0.9.2

## Recent versions

- 0.9.2 (latest) — 2020-02-13
- 0.9.1 — 2020-02-13
- 0.8.3 — 2020-02-13
- 0.9.0 — 2020-02-13
- 0.8.2 — 2020-02-13
- 0.8.1 — 2019-11-25
- 0.8.0 — 2019-11-25
- 0.7.1 — 2019-10-24
- 0.7.0 — 2019-10-23
- 0.6.1 — 2019-09-14
- 0.6.0 — 2019-08-05
- 0.5.1 — 2019-07-25
- 0.5.0 — 2019-07-25
- 0.4.0 — 2019-05-20
- 0.3.16 — 2019-04-25
- … 13 more at https://npm.io/package/@pika/plugin-simple-bin/versions

## README

# @pika/plugin-simple-bin

> A [@pika/pack](https://github.com/pikapkg/pack) build plugin.
> Adds a simple CLI wrapper to your package and properly configures your package.json `"bin"` field to point to it. Useful for quickly adding a command line interface to your library.


## Install

```sh
# npm:
npm install @pika/plugin-simple-bin --save-dev
# yarn:
yarn add @pika/plugin-simple-bin --dev
```


## Usage

```json
{
  "name": "example-package-json",
  "version": "1.0.0",
  "@pika/pack": {
    "pipeline": [
      ["@pika/plugin-standard-pkg"],
      ["@pika/plugin-build-node"],
      ["@pika/plugin-simple-bin", {"bin": "my-cli"}]
    ]
  }
}
```

For more information about @pika/pack & help getting started, [check out the main project repo](https://github.com/pikapkg/pack).


## Result

1. Adds a simple bin/CLI wrapper to your built package: `dist-node/index.bin.js`
  1. Built for Node.js
  1. Loads your library, and calls an exported `run()` method with the CLI args.
  1. Will load a bundled Node.js distribution if one exists.
1. Configures the built package.json with a new `"bin"` entrypoint, so that npm knows to install your package as a CLI.

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