/ agent / index.ts
index.ts
 1  import { Command } from 'commander';
 2  import config from './config';
 3  import {
 4    generateWalletCommand,
 5    startAgentCommand
 6  } from './commands';
 7  
 8  async function main() {
 9    const program = new Command();
10  
11    program
12      .name('ae-carbon-nft')
13      .description('CLI to manage AE Carbon NFTs')
14      .version('0.0.1');
15  
16    program.command('hello')
17      .description('Prints a hello message')
18      .action(() => {
19        console.log('Hello, world!');
20        console.log(`API Key: ${config.get('secrets.apiKey')}`);
21        console.log(`Server Port: ${config.get('server.port')}`);
22      });
23  
24    program.addCommand(generateWalletCommand());
25    program.addCommand(startAgentCommand());
26  
27    program.parse(process.argv);
28  }
29  
30  main();