I accidentally found this short and concise tutorial on how to setup your wifi using the command-line interface. You may think that the GUI tool definitely makes it easier but I do not agree with you entirely. Why? Well, if you have a ultra-mobile portable computer ( ) like the Asus Eee PC with a very small screen, the CLI is a better alternative. Not that it does not support the GUI but the small screen makes the CLI easier.
Here's the summary:
Image from Flickr:jem.