diff --git a/lib/cli.js b/lib/cli.js index 0a37ec3..cce1e03 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -1,10 +1,13 @@ +#!/usr/bin/env node const controller = require('./controller') +const yargs = require('yargs/yargs') +const { hideBin } = require('yargs/helpers') -module.exports = require('yargs').command( +module.exports = yargs(hideBin(process.argv)).command( '$0 [input]', 'Insert your Apple Watch Workouts data in an InfluxDB database', (yargs) => { - yargs.positional('input', { + return yargs.positional('input', { alias: 'i', describe: 'path to your Apple Watch Health export.zip file', normalize: true,