 #!/usr/bin/env node
const program = require('commander');
const {addContact,getContact} = require("./logic1");
program
  .version('0.1.0')
  .description('Contact management system');

  program
    .command('addContact <firstame> <lastname> <phone> <email>')
    .alias('a')
    .description('Add a contact')
    .action((fname, lname, phone, email) => {
      addContact({firstname, lastname, phone, email});
    //  console.log(`User: ${fname} ${lname} ${phone} ${email} `);
    });

    program
      .command('programmer')
      .alias('p')
      .description('ดูข้อมูลโปรแกรมเมอร์')
      .action(() => {
        //addContact({firstname, lastname, phone, email});
        console.log(`programer  คือ  amamp`);
      });


console.log(process.argv);
