Setup a OnLoad event and add some thing like:
-- setup slash command
SlashCmdList["MYADDON"] = MyAddon_Commandline; -- MyAddon_Commandline is a function to take care of the /command parsing.
SLASH_MYADDON1="/myaddon"; -- setup /myaddon as the command players will use to view options etc.
Then the function to parse the command line slash command looks something like:
local lowerargs = strlower(args);
if(lowerargs == "debug") then
-- we get here if the player typed /myaddon debug
-- show options here since the /myaddon was provided on its own.
MyOptions:Show(); -- if u have a xml file for your options screen you can show it like this
Id also like to point you in the direction of
http://wowprogramming.com/ since this is an excellent website for beginners.
Hope this helps a little. Good Luck.