node-snapd
v1.0.1
Published
nodejs client interface to ubuntu core snapd api
Downloads
40
Readme
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.
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