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 (UMPC) 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:
$ iwlist wlan0 scanning
$ sudo iwconfig wlan0 essid ACCESSPOINT
$ sudo iwconfig wlan0 key PASSPHRASE
$ sudo dhclient
Image from Flickr:jem.