Skip to content
/ hey Public

💬 Friendly command-line HTTP client.

License

Notifications You must be signed in to change notification settings

DFurnes/hey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hey (n.) – A friendly command-line tool for making HTTP requests.

Build Status NPM


Installation

You can install Hey using npm:

npm install -g @dfurnes/hey

Customization

You can set aliases and default request options by creating a .hey.js file in your home directory. For example:

module.exports = function(hey) {
  return {
    sites: {
      'www.example.com': {
        // ↓ You can add aliases for favorite sites, so you can just
        //   type `hey get example/page` to load "www.example.com/page`!
        alias: 'example',
        
        // ↓ If a site should always use HTTPS, set the `forceSecure` flag!
        forceSecure: true,

        // ↓ You can set default headers to be used on all requests:
        headers: {
          'X-Secret-API-Key': '5RROHSzXQwJ9douud9u5Ln4BR'
        },
      },
   
      'www.example.org': {
        alias: 'auth-example',
        forceSecure: true,
        
        // ↓ Automatically load password from the system keychain and set HTTP Basic Auth
        //   header by using `hey.basicauth('<username>')`. Will prompt on first request.
        auth: hey.basicauth('username@example.com'),
      },
    },
  };
};

License

MIT © David Furnes