diff --git a/bun/soupclown/index.ts b/bun/soupclown/index.ts index b378c90..539a416 100644 --- a/bun/soupclown/index.ts +++ b/bun/soupclown/index.ts @@ -1,21 +1,3 @@ -import { Command, program } from "commander"; -import { SC_CONFIG } from "./src/interface/config"; +import { RUN_CLI } from "./src/interface/cli"; -const c = new Command(); - -export function RUN_CLI(){ - c - .name('soupclown') - .description('Soupclown system') - .option('--showConfig', 'display the configured config') - .parse(); - - const options = c.opts(); - - if(options.showConfig){ - console.log(JSON.stringify(SC_CONFIG, null, 2)) - return; - } -} - -RUN_CLI(); +RUN_CLI() \ No newline at end of file diff --git a/bun/soupclown/src/interface/cli.ts b/bun/soupclown/src/interface/cli.ts new file mode 100644 index 0000000..6e00251 --- /dev/null +++ b/bun/soupclown/src/interface/cli.ts @@ -0,0 +1,28 @@ +import { Command, program } from "commander"; +import { SC_CONFIG } from "./config"; + +export function RUN_CLI(){ + const c = new Command(); + + c + .name('soupclown') + .description('Soupclown system') + + c + .command('host ') + .action((action, opts) => { + console.log(opts) + switch(action){ + + case 'init': + console.log('init action!') + break; + + default: + console.log('fool!') + break; + } + }) + + c.parse(); +} \ No newline at end of file