WiFiCli's an open source command shell wireless network manager for Linux. It supports scanning, WEP & WPA-PSK connections, and manages a list of favorite Wi-Fi nets on disk. It installs with almost no dependencies. See http://wificli.sourceforge.net