text: module.exports.usage = `Logout the current user
  
  Usage: api logout`;
  module.exports.weight = 4;
  
  module.exports.category = 'utility';
  
  const fs = require('fs');
  
  const request = require('../lib/request');
  const console = require('../utils/console');
  
  const { credPath } = require('../utils/utils');
  
  module.exports.run = () => {
    return request.post('/logout').then(() => {
      console.log('You have been logged out.');
  
      try {
        fs.unlinkSync(credPath);
      } catch (e) {
        //
      }
    });
  };