[go: up one dir, main page]

node-snapd

1.0.1 • Public • Published

node-snapd

nodejs client interface to ubuntu core snapd rest api

With node-snapd, you can now easily introspect the Snapd host and the installed Snap packages.

API Documentation

const Snapd = require('node-snapd')

let snapd = new Snapd()

const snapList = await snapd.listSnaps()
console.log(snapList)

const coreInfo = await snapd.info({name: 'core'})
console.log(coreInfo)

When run with elevated permissions you can also install and configure applications in the system.

const vectrId = await snapd.install({name: 'vectr'})

Defaults

  • SnapClient.authFile: $HOME/.snap/auth.json
  • SnapClient.socketPath: /run/snapd.socket

Developing

To develop you will need to install

  • nodejs
  • yarn
  • snapd

To interactively develop run:

yarn
yarn watch

Tests

To run tests:

yarn test

Further Reading

Credits

node-snapd is open source software developed by RosHub Inc.

  • Philetus Weller
  • Alan Meekins

Package Sidebar

Install

npm i node-snapd

Weekly Downloads

5

Version

1.0.1

License

Apache-2.0

Unpacked Size

146 kB

Total Files

28

Last publish

Collaborators

  • alanm
  • nickzat