diff --git a/packages/cli/bin/index.js b/packages/cli/bin/index.js new file mode 100755 index 00000000..ff28e96b --- /dev/null +++ b/packages/cli/bin/index.js @@ -0,0 +1,25 @@ +#!/usr/bin/env node + +import { program } from "commander"; +import { VERSION } from "@aedart/cli"; + +// TODO: Incomplete... how to obtain additional commands? Should this be wrapped? + +program + .version(VERSION) + .description(`Ion CLI v${VERSION}`) + .command('fisk', ) + .description('Bla bla') + .argument('name', 'More bla bla') + .action((name) => { + console.info('Sweet', name); + }); + +// TODO: Add commands... + +// Display help automatically, when no command is requested. +if (process.argv.length < 3) { + program.help(); +} + +await program.parseAsync(); \ No newline at end of file diff --git a/packages/cli/package.json b/packages/cli/package.json index 88d96f52..2ce184ae 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -31,6 +31,9 @@ "require": "./dist/cjs/cli.cjs" } }, + "bin": { + "ion": "./bin/index.js" + }, "files": [ "dist", "!dist/**/*.map",