# pinokiojs

> Interact with Pinokio over WebSocket, using JavaScript.

Latest version **0.0.9** (published 2023-07-25) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2023-07-25 |
| First published | 2023-07-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 30.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | cocktailpeanut |

## Links

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

## Dependencies (1)

- [unws](https://npm.io/package/unws.md) ^0.2.3

## Recent versions

- 0.0.9 (latest) — 2023-07-25
- 0.0.8 — 2023-07-25
- 0.0.7 — 2023-07-25
- 0.0.6 — 2023-07-24
- 0.0.5 — 2023-07-24
- 0.0.4 — 2023-07-24
- 0.0.3 — 2023-07-23
- 0.0.2 — 2023-07-23
- 0.0.1 — 2023-07-17

## README

# Pinokio.js

Interact with Pinokio over WebSocket, using JavaScript.

# API

1. `shell`: access to the pinokio shell
2. `fs`: acccess to the pinokio file system
3. `port()`: get an available port

## 1. Shell

```javascript
const pinokio = new Pinokio()
const shell = pinokio.shell()
await shell.run({
  uri: ...
}, (packet) => {
  // realtime packet
})
```

## 2. FS

```
const fs = pinokio.fs("https://github.com/cocktailpeanut/automatic1111.pinokio.git")
await fs.writeFile(...)
```

## 3. port()

```
const available_port = await pinokio.port()
```

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