Skip to content

Commit

Permalink
Implement cli version of z2m (Koenkk#5034)
Browse files Browse the repository at this point in the history
  • Loading branch information
nurikk authored Nov 21, 2020
1 parent 5f7553f commit c1f7ce7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env node
const path = require('path');
process.env['ZIGBEE2MQTT_DATA'] = process.env['ZIGBEE2MQTT_DATA'] || path.join(process.env['HOME'], '.z2m');
require('./index');
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,8 @@
"collectCoverageFrom": [
"lib/**"
]
},
"bin": {
"zigbee2mqtt": "./cli.js"
}
}

0 comments on commit c1f7ce7

Please sign in to comment.