npm.io
0.0.9 • Published 3 years ago

pinokiojs

Licence
ISC
Version
0.0.9
Deps
1
Size
31 kB
Vulns
0
Weekly
0

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

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()