code: async function listModuleOptions() {
    let options = ['Add a module']
  
    let unpausedModules = allModules.filter(m => m.paused == false);
    if (unpausedModules.length > 0) {
      options.push('Pause a module');
    }
  
    let pausedModules = allModules.filter(m => m.paused == true);
    if (pausedModules.length > 0) {
      options.push('Unpause a module');
    }
  
    let unarchivedModules = allModules.filter(m => !m.archived);
    if (unarchivedModules.length > 0) {
      options.push('Archive a module');
    }
  
    let archivedModules = allModules.filter(m => m.archived);
    if (archivedModules.length > 0) {
      options.push('Unarchive a module', 'Remove a module');
    }
  
    if (allModules.length > 0) {
      options.push('Change module budget');
    }
  
    let index = readlineSync.keyInSelect(options, chalk.yellow('What do you want to do?'), { cancel: 'Return' });
    let selected = index == -1 ? 'Exit' : options[index];
    console.log('Selected:', selected);
    switch (selected) {
      case 'Add a module':
        await addModule();
        break;
      case 'Pause a module':
        await pauseModule(unpausedModules);
        break;
      case 'Unpause a module':
        await unpauseModule(pausedModules);
        break;
      case 'Archive a module':
        await archiveModule(unarchivedModules);
        break;
      case 'Unarchive a module':
        await unarchiveModule(archivedModules);
        break;
      case 'Remove a module':
        await removeModule(archivedModules);
        break;
      case 'Change module budget':
        await changeBudget(allModules);
        break;
    }
  }
docs: /