In case you didn't realize the pfSense packages that you load up through the webgui are different to the FreeBSD packages loaded via pkg_add. Loading FreeBSD packages is not really recommended. Mostly they work, especially small stand-alone stuff, but it's also possible to completely break pfSense by accidentally overwriting some component due to a dependency.
The command line shell in pfSense, TCSH, is basically a complete FreeBSD shell. Unlike many other *BSD or Linux based firewalls there is no restricted environment with limited ability. This also means there is no easy to work with set of custom commands, though there are some. As such start reading the FreeBSD user guide! ;)
http://www.freebsd.org/doc/en/articles/new-users/index.html
Others have made some lists of useful CLI commands in pfSense, for example:
https://www.linuxnet.ch/pfsense-important-cli-commands/
I don't recommend using viconfig as listed there unless you're already familiar with vi and it's weirdness! ;)
The ee editor in included for mortals.
You can download things directly from the CLI using the fetch command. E.g.
fetch -o /tmp http://www.someurl.com/somefile.txt
Downloads the file somefile.txt to the /tmp directory.
I don't think that's going to help you though.
Steve